[modules/memory] Show used instead of free RAM
This commit is contained in:
parent
29131e2f65
commit
6e8acc2765
1 changed files with 2 additions and 3 deletions
|
@ -22,10 +22,9 @@ class Module(bumblebee.module.Module):
|
||||||
def data(self):
|
def data(self):
|
||||||
self._mem = psutil.virtual_memory()
|
self._mem = psutil.virtual_memory()
|
||||||
|
|
||||||
free = self._mem.available
|
used = self._mem.total - self._mem.available
|
||||||
total = self._mem.total
|
|
||||||
|
|
||||||
return "{}/{} ({:05.02f}%)".format(bumblebee.util.bytefmt(self._mem.available), bumblebee.util.bytefmt(self._mem.total), 100.0 - self._mem.percent)
|
return "{}/{} ({:05.02f}%)".format(bumblebee.util.bytefmt(used), bumblebee.util.bytefmt(self._mem.total), self._mem.percent)
|
||||||
|
|
||||||
def warning(self):
|
def warning(self):
|
||||||
return self._mem.percent < 20
|
return self._mem.percent < 20
|
||||||
|
|
Loading…
Reference in a new issue