fillInDiskStatus: update function to calculate new stats

This commit is contained in:
LazyDBA247-Anyvision 2020-02-23 23:25:56 +02:00
parent ec8619176a
commit ab91dbe1d7

View file

@ -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
}