Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  autocore/x86: Fixes CPU usage display issue (coolsnowwolf#11614)
  • Loading branch information
UtMetoo committed Oct 22, 2023
2 parents 13907c3 + d18c930 commit 29bfc6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/lean/autocore/files/x86/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

local user_info = luci.sys.exec("cat /proc/net/arp | grep '0x2' | wc -l") or 0

local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep 'CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}' | awk '{print int($1 + 0.5)}')") or "6") .. "%"
local cpu_usage = (luci.sys.exec("expr 100 - $(top -n 1 | grep -E '^CPU:' | awk -F '%' '{print$4}' | awk -F ' ' '{print$2}' | awk '{print int($1 + 0.5)}')") or "6") .. "%"

local rv = {
cpuusage = cpu_usage,
Expand Down

0 comments on commit 29bfc6d

Please sign in to comment.