elenapan/Scripts/cpu.sh
elena e43cf1ccde updated scripts, added configs, new screenshot
Former-commit-id: 80e5a611d9
Former-commit-id: d6d963dd470140b7a955399ff22fec885ddace30
2017-08-29 02:28:24 +03:00

11 lines
No EOL
247 B
Bash
Executable file

#!/bin/bash
#   
CPU="$[100-$(vmstat 1 2|tail -1|awk '{printf "%d", $15}')]"
GOVERNOR="$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)"
if [[ "$GOVERNOR" == "performance" ]]; then
echo "$CPU%"
else
echo "$CPU%"
fi