diff --git a/bin/cpu-usage b/bin/cpu-usage index dc3a9b62..e106c39f 100755 --- a/bin/cpu-usage +++ b/bin/cpu-usage @@ -4,4 +4,4 @@ # CAVEAT: it is not realtime, and takes ~1 second cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | \ - awk -v RS="" '{printf "%.2f", ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5) "%"}' + awk -v RS="" '{printf "%.2f", ($13-$2+$14-$3+$15-$4+$18-$7+$19-$8+$20-$9)*100/($13-$2+$14-$3+$15-$4+$16-$5+$17-$6+$18-$7+$19-$8+$20-$9) "%"}'