cpu usage script changes
This commit is contained in:
parent
7a57e1280d
commit
9149ffe4e2
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ esac
|
||||||
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
|
||||||
[ ! -f $cache ] && echo "$stats" > "$cache"
|
[ ! -f $cache ] && echo "$stats" > "$cache"
|
||||||
old=$(cat "$cache")
|
old=$(cat "$cache")
|
||||||
printf "🪨"
|
printf "🖥️ "
|
||||||
echo "$stats" | while read -r row; do
|
echo "$stats" | while read -r row; do
|
||||||
id=${row%% *}
|
id=${row%% *}
|
||||||
rest=${row#* }
|
rest=${row#* }
|
||||||
|
|
Loading…
Reference in a new issue