mirror of
https://github.com/pstadler/metrics.sh.git
synced 2025-02-28 22:09:11 -05:00
fix metrics on Ubuntu
This commit is contained in:
parent
ff5bc25eec
commit
470ed0a828
@ -21,7 +21,9 @@ if is_osx; then
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
__disk_io_bgproc () {
|
__disk_io_bgproc () {
|
||||||
echo $(iostat -y -d 1 $DISK_IO_MOUNTPOINT)
|
iostat -y -m -d 1 $DISK_IO_MOUNTPOINT | while read line; do
|
||||||
|
echo $line | awk '/[0-9.]/{ print $3 }' > $__disk_io_fifo
|
||||||
|
done
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ if is_osx; then
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
collect () {
|
collect () {
|
||||||
report $(free | awk '/buffers\/cache/
|
report $(free | awk '/buffers\/cache/ {
|
||||||
{ printf "%.1f", 100 - $4 / ($3 + $4) * 100.0 }')
|
printf "%.1f", 100 - $4 / ($3 + $4) * 100.0 }')
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user