This commit is contained in:
Linux User
2022-08-13 18:10:53 +00:00
parent c3bb83fe14
commit 2db42127d0
11 changed files with 71 additions and 12 deletions

5
.local/scripts/9995_cpu Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 0.3 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%"
echo " $usage"