[fix] mem_used_perc returns percentage of used mem

This commit is contained in:
mced 2015-09-12 19:11:40 +02:00
parent bd00f46d8b
commit a1405a63fb
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func VirtualMemory() (*VirtualMemoryStat, error) {
}
ret.Available = ret.Free + ret.Buffers + ret.Cached
ret.Used = ret.Total - ret.Free
ret.UsedPercent = float64(ret.Total-ret.Available) / float64(ret.Total) * 100.0
ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0
return ret, nil
}