Commit 02dfc664 authored by David Bauer's avatar David Bauer

gluon-status-page: update memory usage estimation

Let gluon-respondd expose "MemAvailable" from /proc/meminfo to allow for
a more realistic memory-usage estimation.

Information on MemAvailable can be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
parent 44c70ca4
......@@ -74,7 +74,7 @@
return _['%s used'].sprintf(formatNumber(100 * value, 3) + '%');
},
'memory': function(memory) {
var usage = 1 - (memory.free + memory.buffers + memory.cached) / memory.total
var usage = 1 - memory.available / memory.total
return formats.percent(usage);
},
'time': function(seconds) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment