public void Refresh() { Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); RuntimeInfo.Refresh(); OSInfo.Refresh(); DiskInfoList.Clear(); var drives = DriveInfo.GetDrives().ToList(); drives.ForEach(drive => { if (drive.IsReady) { DiskInfoList.Add(new DiskInfo() { Id = drive.Name, Free = drive.AvailableFreeSpace / 1024, Total = drive.TotalSize / 1024, Use = (drive.TotalSize - drive.AvailableFreeSpace) / 1024 }); } }); MemoryInfo.Refresh(); ThreadInfo.Refresh(); MessageInfo.Refresh(); HeartbeatExtensions.ForEach(item => item.Refresh()); }
public NodeStatusInfo(IMessageStatistics statistics) { RuntimeInfo = new RuntimeInfo(); OSInfo = new OSInfo(); DiskInfoList = new List <DiskInfo>(); MemoryInfo = new MemoryInfo(); ThreadInfo = new ThreadInfo(); MessageInfo = new MessageInfo(statistics); HeartbeatExtensions = new List <HeartbeatExtention>(); Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); ns.Add("", ""); }
public NodeStatusInfo(IMessageStatistics statistics) { RuntimeInfo = new RuntimeInfo(); OSInfo = new OSInfo(); DiskInfoList = new List<DiskInfo>(); MemoryInfo = new MemoryInfo(); ThreadInfo = new ThreadInfo(); MessageInfo = new MessageInfo(statistics); HeartbeatExtensions = new List<HeartbeatExtention>(); Timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); ns.Add("", ""); }