This commit is contained in:
JiXieShi
2024-11-14 23:32:08 +08:00
parent 421cfb8cfa
commit f722153536
7 changed files with 70 additions and 24 deletions

View File

@@ -198,20 +198,13 @@ func (s *MonitorService) getDiskInfo(status *model.SystemStatus) error {
}
status.Disk.Partitions = append(status.Disk.Partitions, model.DiskPartition{
Device: partition.Device,
Device: partition.Device,
Mountpoint: partition.Mountpoint,
Fstype: partition.Fstype,
Total: usage.Total,
Used: usage.Used,
Free: usage.Free,
UsageRate: usage.UsedPercent,
Fstype: partition.Fstype,
Total: usage.Total,
Used: usage.Used,
Free: usage.Free,
UsageRate: usage.UsedPercent,
})
}
@@ -247,13 +240,9 @@ func (s *MonitorService) getNetworkInfo(status *model.SystemStatus) error {
for _, io := range ioCounters {
if io.Name == iface.Name {
counter = io
break
}
}
// 获取接口的地址列表