memory_usage: assume buffers and cached to be free

respondd
Nils Schneider 2015-07-13 17:43:28 +02:00
parent f2214ab130
commit 823b64b8ba
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ def import_statistics(nodes, stats):
add(node, stats, 'uptime', ['uptime']) add(node, stats, 'uptime', ['uptime'])
add(node, stats, 'loadavg', ['loadavg']) add(node, stats, 'loadavg', ['loadavg'])
add(node, stats, 'memory_usage', ['memory'], add(node, stats, 'memory_usage', ['memory'],
lambda d: 1 - d['free'] / d['total']) lambda d: 1 - (d['free'] + d['buffers'] + d['cached']) / d['total'])
add(node, stats, 'rootfs_usage', ['rootfs_usage']) add(node, stats, 'rootfs_usage', ['rootfs_usage'])
add(node, stats, 'traffic', ['traffic']) add(node, stats, 'traffic', ['traffic'])