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
This commit is contained in:
David Bauer 2018-08-24 02:22:11 +02:00
parent 44c70ca4d6
commit 02dfc66438

View File

@ -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) {