2021-11-13 19:24:20 +01:00
|
|
|
#!/bin/sh
|
|
|
|
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
|
|
|
CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
|
2021-11-14 20:22:42 +01:00
|
|
|
#CPU_USAGE=$(mpstat | tr -s " " | cut -d " " -f 13 | tail -1)
|
2021-11-13 19:24:20 +01:00
|
|
|
echo "$CPU_USAGE $TEMP" | awk '{ printf(" CPU:%6s% @ %s \n"), $1, $2 }'
|