1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-09-19 00:53:19 +00:00

Fix bug with Gibibyte

This commit is contained in:
northox 2011-09-26 14:16:21 +02:00 committed by Steve Schnepp
parent 617994ca9d
commit 7a05e29c76

View file

@ -13,14 +13,14 @@ fi
top -un | nawk ' top -un | nawk '
function scale(v) { function scale(v) {
if (value ~ /G$/) { sub("G", "", v); v *= 1024 } if (v ~ /G$/) { sub("G", "", v);v *= 1024 }
else if (v ~ /M$/) sub("M", "", v) else if (v ~ /M$/) sub("M", "", v)
else if (v ~ /K$/) { sub("K", "", v); v /= 1024 } else if (v ~ /K$/) { sub("K", "", v);v /= 1024 }
else v /= 1024 * 1024; else v /= 1024 * 1024;
return v; return v;
} }
function spliter(v, i) { function spliter(v, i) {
split(v,a,"/"); split(v, a, "/");
return(a[i]); return(a[i]);
} }
/^Memory/ { /^Memory/ {