diff options
Diffstat (limited to 'status')
| -rw-r--r-- | status/03-mem.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/status/03-mem.go b/status/03-mem.go index c566c4c..89dbb59 100644 --- a/status/03-mem.go +++ b/status/03-mem.go @@ -37,8 +37,8 @@ func mem(name string) error { if err := checkMemField(mem, "MemAvailable"); err != nil { return err } total := mem["MemTotal"] - avail := mem["MemAvailable"] - p := int(float64(avail) / float64(total) * 100.0) + used := total - mem["MemAvailable"] + p := int(float64(used) / float64(total) * 100.0) cx := 0 cx += u.drawPercentBar(cx, p) |