Skip to content

Instantly share code, notes, and snippets.

@defulmere
Last active December 27, 2022 09:08
Show Gist options
  • Save defulmere/438b3cf94cc725c6a67e40888e1e280a to your computer and use it in GitHub Desktop.
Save defulmere/438b3cf94cc725c6a67e40888e1e280a to your computer and use it in GitHub Desktop.
colored bar graph of system load over time in terminal with atopsar
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 ""
@defulmere
Copy link
Author

Screenshot 2021-05-25 at 15 38 45

@kondor6c
Copy link

very nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment