Created
September 1, 2016 17:27
-
-
Save johnl/a98b73847ed29b766562eaafc8aa8ae2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat /proc/stat | grep "cpu " | perl -e 'use List::Util qw(sum); @cols = split /\s+/, <>; shift @cols; $total = sum(@cols); $steal = ($cols[7] / $total) * 100; printf("%0.5f%\n", $steal)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment