mirror of
https://github.com/pstadler/metrics.sh.git
synced 2025-11-22 02:35:26 -05:00
Fix memory metric on *NIX
This commit is contained in:
@@ -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."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user