Merge pull request #255 from lberruti/fix_swap_mem_linux

Fix: wrong swap values on i686 / 4GB ram.
pull/256/head
shirou 9 years ago committed by GitHub
commit f20771d32a

@ -70,8 +70,8 @@ func SwapMemory() (*SwapMemoryStat, error) {
return nil, err
}
ret := &SwapMemoryStat{
Total: uint64(sysinfo.Totalswap),
Free: uint64(sysinfo.Freeswap),
Total: uint64(sysinfo.Totalswap) * uint64(sysinfo.Unit),
Free: uint64(sysinfo.Freeswap) * uint64(sysinfo.Unit),
}
ret.Used = ret.Total - ret.Free
//check Infinity

Loading…
Cancel
Save