Skip to content

Commit

Permalink
Fixed bug in fs usage calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Nov 16, 2015
1 parent eacfca7 commit c14cfbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func GetFSInfo() (map[string]*FSInfo, error) {

fsInfo.Total = stats.Blocks * uint64(stats.Bsize)
fsInfo.Free = stats.Bavail * uint64(stats.Bsize)
fsInfo.Used = fsInfo.Total - fsInfo.Free
fsInfo.Used = fsInfo.Total - (stats.Bfree * uint64(stats.Bsize))
fsInfo.IOStats = ios[strings.Replace(fsInfo.Device, "/dev/", "", 1)]

result[path] = fsInfo
Expand Down

0 comments on commit c14cfbc

Please sign in to comment.