提交 66a07939 编写于 作者: J Johan Walles

Fix memory stats on Linux

上级 44381591
......@@ -51,7 +51,7 @@ func VirtualMemory() (*VirtualMemoryStat, error) {
if !memavail {
ret.Available = ret.Free + ret.Buffers + ret.Cached
}
ret.Used = ret.Total - ret.Free
ret.Used = ret.Total - ret.Available
ret.UsedPercent = float64(ret.Total-ret.Available) / float64(ret.Total) * 100.0
return ret, nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册