Adding cpu to awesome
This commit is contained in:
parent
2c45b82785
commit
7b173db93d
6 changed files with 18 additions and 15 deletions
3
scripts/cpu
Executable file
3
scripts/cpu
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \
|
||||
<(rg 'cpu ' /proc/stat) <(sleep 1;rg 'cpu ' /proc/stat)
|
Loading…
Add table
Add a link
Reference in a new issue