From 223c8092349316c50eef561fabb4a4eebd325263 Mon Sep 17 00:00:00 2001 From: Shirou WAKAYAMA Date: Tue, 1 Dec 2015 23:29:15 +0900 Subject: [PATCH] disk[unix]: revert 61cb121. psutil uses Available as Free. --- disk/disk_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk/disk_unix.go b/disk/disk_unix.go index f006c1a..e081b9d 100644 --- a/disk/disk_unix.go +++ b/disk/disk_unix.go @@ -16,7 +16,7 @@ func DiskUsage(path string) (*DiskUsageStat, error) { Path: path, Fstype: getFsType(stat), Total: (uint64(stat.Blocks) * uint64(bsize)), - Free: (uint64(stat.Bfree) * uint64(bsize)), + Free: (uint64(stat.Bavail) * uint64(bsize)), InodesTotal: (uint64(stat.Files)), InodesFree: (uint64(stat.Ffree)), }