mem: Change used_mem semantics, so that it matches vm.percent and htop's memory usage report
This commit is contained in:
parent
c43a22c46d
commit
a4e6e540dc
@ -24,9 +24,11 @@ class Mem(IntervalModule):
|
||||
|
||||
def run(self):
|
||||
vm = virtual_memory()
|
||||
# This follows the same algorithm used for vm-percent
|
||||
used = vm.used - vm.cached
|
||||
self.output = {
|
||||
"full_text": self.format.format(
|
||||
used_mem=int(round(vm.used / MEGABYTE, 0)),
|
||||
used_mem=int(round(used / MEGABYTE, 0)),
|
||||
avail_mem=int(round(vm.available / MEGABYTE, 0)),
|
||||
total_mem=int(round(vm.total / MEGABYTE, 0)),
|
||||
percent_used_mem=vm.percent)
|
||||
|
Loading…
Reference in New Issue
Block a user