configfiles/scripts/cpustat.sh
2015-06-19 05:18:27 +02:00

6 lines
155 B
Bash
Executable file

#!/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