From be4039d647b99b6b24653b3253ccc59f049f7163 Mon Sep 17 00:00:00 2001 From: Patrick Stadler Date: Mon, 9 Oct 2017 14:54:57 +0200 Subject: [PATCH] Fix memory metric on *NIX --- metrics/memory.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metrics/memory.sh b/metrics/memory.sh index cb63146..1b3999f 100644 --- a/metrics/memory.sh +++ b/metrics/memory.sh @@ -13,11 +13,11 @@ if is_osx; then } else collect () { - report $(free | awk '/buffers\/cache/ { - printf "%.1f", 100 - $4 / ($3 + $4) * 100.0 }') + report $(free | awk '/Mem:/ { + printf "%.1f", 100 - $4 / ($3 + $4) * 100}') } fi docs () { echo "Percentage of used memory." -} \ No newline at end of file +}