diff --git a/scripts/cpustat.sh b/scripts/cpustat.sh new file mode 100755 index 0000000..ca63422 --- /dev/null +++ b/scripts/cpustat.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +while true; do + idle=$(mpstat 2 1 | tail -n 1 | awk '{print int($12)}') + echo $[ 100 - $idle ] +done | stag -t "CPU usage" -s 0,100 -w 1