4 ms·
My favorite is piping stuff into awk to make bar graphs. Here's system load from atopsar for the current day: atopsar -p | tail -n +7 | grep '\S' | awk '{pri
by defulmere 5y ago
My favorite is piping stuff into awk to make bar graphs. Here's system load from atopsar for the current day:
atopsar -p | tail -n +7 | grep '\S' | awk '{printf("\n%s %6.2f ",$1, $5); for (i = 0; i<$5; i++) {printf("")}}'; echo
sample: https://gist.github.com/defulmere/bec1aef40ca4cddb5c421ffa5f9b9e1f/edit https://gist.github.com/defulmere/bec1aef40ca4cddb5c421ffa5f...
- rhn_mk1 5y agoFixed link: https://gist.github.com/defulmere/bec1aef40ca4cddb5c421ffa5f9b9e1f https://gist.github.com/defulmere/bec1aef40ca4cddb5c421ffa5f...
- defulmere 5y agogracias
- defulmere 5y agoDangit, there should have been an ASCII block character in that second printf. Here's a version with an asterisk instead: atopsar -p | grep ":[0-9]\{2\}\s\+[0-9]" | awk '{printf("\n%s %6.2f ",$1, $5); for (i = 0; i<$5; i++) {printf("*")}}'; echo