Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue where CPU usage only shows a % #11614

Merged
merged 1 commit into from
Oct 22, 2023
Merged

Fixed the issue where CPU usage only shows a % #11614

merged 1 commit into from
Oct 22, 2023

Conversation

cjpjxjx
Copy link
Contributor

@cjpjxjx cjpjxjx commented Oct 22, 2023

Q:你知道这是pull request吗?(使用 "x" 选择)

  • 我知道

之前提过 issues #11603

经过不断尝试,发现在 package/lean/autocore/files/x86/index.htm 文件中匹配 CPU 使用率所在行的命令 top -n 1 | grep 'CPU:' 会获取到两行数据,而另一行是 grep CPU: 进程自身,最终导致 CPU 使用率计算报错,如下所示

root@OpenWrt:~# top -n 1 | grep 'CPU:' 
CPU:   0% usr   9% sys   0% nic  90% idle   0% io   0% irq   0% sirq
 2813  6672 root     S     1124   0%   0% grep CPU:

由于 x86 平台和 arm 平台使用的是不同的 index.htm 文件,获取 CPU 使用率的命令也不一样,再结合其他人的反馈,所以这个问题应该是只出现在 x86 平台上

虽然我也还是不知道为啥在编译时取消 autosamba 就会出现这个问题,但是修改匹配条件使用 grep -E '^CPU:' 匹配 CPU 使用率所在行可修复此问题

修复 CPU 使用率只显示一个 % 的问题
@aiamadeus aiamadeus merged commit d18c930 into coolsnowwolf:master Oct 22, 2023
github-actions bot added a commit to qingxiwanjia/lede-openwrt that referenced this pull request Oct 22, 2023
github-actions bot added a commit to BCYDTZ/lede that referenced this pull request Oct 22, 2023
github-actions bot added a commit to Kirie233/lede that referenced this pull request Oct 22, 2023
github-actions bot added a commit to zhuan-zhu/MyRouter that referenced this pull request Oct 22, 2023
github-actions bot added a commit to xiaohong001/lede that referenced this pull request Oct 22, 2023
github-actions bot pushed a commit to UtMetoo/OpenWRT_Lede that referenced this pull request Oct 22, 2023
github-actions bot pushed a commit to zesming/lede that referenced this pull request Oct 23, 2023
github-actions bot added a commit to caixlcq/lede that referenced this pull request Oct 23, 2023
github-actions bot added a commit to DeakeyTan/openwrt that referenced this pull request Oct 23, 2023
github-actions bot added a commit to dycfan/lede that referenced this pull request Oct 23, 2023
github-actions bot added a commit to oldskooler/lede that referenced this pull request Oct 27, 2023
* https://github.com/coolsnowwolf/lede:
  openssl: update to 3.0.12
  kernel: bump 6.1 to 6.1.60 (coolsnowwolf#11620)
  dnsmasq: add support for RA option 31
  kernel: fix linux 5.4 hash typo
  Version: Celebrate 1024 Programmers Day
  kernel: bump version
  autocore/x86: Fixes CPU usage display issue (coolsnowwolf#11614)
  kernel: fix kmod-video-core on linux kernel 6.1+
  kernel: bump 5.15 to 5.15.136
yjh126yjh pushed a commit to yjh126yjh/lede that referenced this pull request Oct 28, 2023
* https://github.com/coolsnowwolf/lede:
  openssl: update to 3.0.12
  kernel: bump 6.1 to 6.1.60 (coolsnowwolf#11620)
  dnsmasq: add support for RA option 31
  kernel: fix linux 5.4 hash typo
  Version: Celebrate 1024 Programmers Day
  kernel: bump version
  autocore/x86: Fixes CPU usage display issue (coolsnowwolf#11614)
github-actions bot added a commit to cayercarelys/lede that referenced this pull request Oct 28, 2023
* https://github.com/coolsnowwolf/lede:
  openssl: update to 3.0.12
  kernel: bump 6.1 to 6.1.60 (coolsnowwolf#11620)
  dnsmasq: add support for RA option 31
  kernel: fix linux 5.4 hash typo
  Version: Celebrate 1024 Programmers Day
  kernel: bump version
  autocore/x86: Fixes CPU usage display issue (coolsnowwolf#11614)
  kernel: fix kmod-video-core on linux kernel 6.1+
  kernel: bump 5.15 to 5.15.136
  kernel: bump 6.1 to 6.1.57
  kernel: bump 5.15 to 5.15.135
  generic: backport fix for Winbond SPI NAND
  generic: 6.1: re-add two Winbond nand fixes
  arm-trusted-firmware-rockchip-vendor: update PKG_MIRROR_HASH
  base-files: create empty coremark file
  base-files: fix OpenWrt with Docker will cause NAT loopback (coolsnowwolf#11588)
  mbedtls: Update to version 2.28.5
  config-6.1: disable CONFIG_ARM64_ERRATUM_2966298
  meson: Kernel supports docker (coolsnowwolf#11591)
yuos-bit added a commit to yuos-bit/other that referenced this pull request Oct 30, 2023
github-actions bot added a commit to jmmes/lede that referenced this pull request Nov 5, 2023
* https://github.com/coolsnowwolf/lede: (38 commits)
  kernel: bump 6.1 to 6.1.61 (coolsnowwolf#11637)
  autocore: unify wifi signal view
  mediatek: add led aliases for GL.iNet GL-MT6000
  base-files: Align rootfs_data upgrades to 64KiB on eMMC
  Version update to R23.11.11
  mediatek: add default package
  mediatek: improve GL-MT6000 support (coolsnowwolf#11636)
  kernel: bump 5.10 to 5.10.199
  mediatek: add Netcore N60 support
  mediatek: add TP-Link TL-XTR8488 support
  kernel/video: add ARM GPU drivers
  kernel: usb-audio remove Kconfig USB_AUDIO
  kernel: Enable hwmon for nvme
  openssl: update to 3.0.12
  kernel: bump 6.1 to 6.1.60 (coolsnowwolf#11620)
  dnsmasq: add support for RA option 31
  kernel: fix linux 5.4 hash typo
  Version: Celebrate 1024 Programmers Day
  kernel: bump version
  autocore/x86: Fixes CPU usage display issue (coolsnowwolf#11614)
  ...
724399396 pushed a commit to 724399396/lede that referenced this pull request Nov 7, 2023
467815891a pushed a commit to 467815891a/lede that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants