diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2023-07-27 18:05:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 18:05:17 +0300 |
commit | c6e954d130dcaff72c895b0a4bb5901452b5033b (patch) | |
tree | 86025275278d708591250a87e1ede6689d1845bb /daemon | |
parent | fa43e99f98f39af38874181d81249d4796fb3026 (diff) |
fix cpu MHz from /proc/cpuinfo (#15584)
Diffstat (limited to 'daemon')
-rwxr-xr-x | daemon/system-info.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh index 43f761c2dc..2a3ba7d768 100755 --- a/daemon/system-info.sh +++ b/daemon/system-info.sh @@ -313,7 +313,7 @@ elif [ -r /proc/cpuinfo ]; then if (echo "${CPU_INFO_SOURCE}" | grep -qv procfs); then CPU_INFO_SOURCE="${CPU_INFO_SOURCE} procfs" fi - value=$(grep "cpu MHz" /proc/cpuinfo 2>/dev/null | grep -o "[0-9]*" | head -n 1 | awk '{print int($0*1000000)}') + value=$(grep "cpu MHz" /proc/cpuinfo 2>/dev/null | grep -o "[0-9]*" | head -n 1 | awk '{printf "%0.f",int($0*1000000)}') [ -n "$value" ] && CPU_FREQ="$value" fi |