Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Alliline/f70b0567a6ad2f08af56d7aa1263539a to your computer and use it in GitHub Desktop.
Save Alliline/f70b0567a6ad2f08af56d7aa1263539a to your computer and use it in GitHub Desktop.

Revisions

  1. @defulmere defulmere revised this gist May 25, 2021. No changes.
  2. @defulmere defulmere created this gist May 25, 2021.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    np=$( nproc ); atopsar -p | grep ":[0-9]\{2\}\s\+[0-9]" | awk '{printf("\n%s %6.2f ",$1, $5); for (i = 0; i<$5; i++) {if (i<'$np'*.7) {printf "\033[32m"} else if (i<'$np') {printf "\033[33m"} else {printf "\033[31m"}; printf("█")}; printf "\033[0m"}'; echo ""