Browse Source

fillInDiskStatus: update function to calculate new stats

pull/1207/head
LazyDBA247-Anyvision 5 years ago
parent
commit
ab91dbe1d7
  1. 2
      weed/stats/disk_supported.go

2
weed/stats/disk_supported.go

@ -17,5 +17,7 @@ func fillInDiskStatus(disk *volume_server_pb.DiskStatus) {
disk.All = fs.Blocks * uint64(fs.Bsize)
disk.Free = fs.Bfree * uint64(fs.Bsize)
disk.Used = disk.All - disk.Free
disk.PercentFree = float32((float64(disk.Free) / float64(disk.All)) * 100)
disk.PercentUsed = float32((float64(disk.Used) / float64(disk.All)) * 100)
return
}
Loading…
Cancel
Save