Skip to content

Commit

Permalink
[energizta.sh] Added cpu_freq_mhz variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Subiron committed Aug 4, 2023
1 parent 1edffac commit 509ab12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions energizta/energizta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ compute_state() {
state[energizta_version]="$VERSION"

state[load1]=$(cut -d ' ' -f 1 < /proc/loadavg)
state[cpu_freq_mhz]=$(grep "^cpu MHz" /proc/cpuinfo | awk '{x+=$4} END {printf "%.0f\n", x/NR}')

# Procstat
if [ -f "/proc/stat" ]; then
Expand Down

0 comments on commit 509ab12

Please sign in to comment.