Last active
November 19, 2024 21:30
-
-
Save defulmere/438b3cf94cc725c6a67e40888e1e280a to your computer and use it in GitHub Desktop.
colored bar graph of system load over time in terminal with atopsar
This file contains hidden or 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
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 "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment