implement parallel collecting. add keen_io reporter. several fixes

This commit is contained in:
Patrick Stadler
2015-03-12 20:59:09 +01:00
parent 5c65c6646f
commit 88318c64c4
6 changed files with 73 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ else
fi
collect () {
report $(cat < $__disk_io_fifo)
report $(cat $__disk_io_fifo)
}
terminate () {

View File

@@ -3,11 +3,12 @@
if is_osx; then
collect () {
report $(sysctl -n vm.swapusage |
awk '{ if ($3 == 0) exit; printf "%.1f", $6 / $3 * 100.0 }')
awk '{ if (int($3) == 0) exit; printf "%.1f", $6 / $3 * 100.0 }')
}
else
collect () {
report $(free | awk '/Swap/{ printf "%.1f", $3/$2 * 100.0 }')
report $(free |
awk '/Swap/{ if (int($2) == 0) exit; printf "%.1f", $3 / $2 * 100.0 }')
}
fi