Created attachment 252486 [details] screenshot of htop that shows the 8 CPU usage meters all at about 1 to 0 percent while stress is running a stress test on each of the 8 CPU cores and has them all at about 100 percent CPU usage The CPU usage meters in htop are showing very low CPU usage no matter what I am doing and regardless of the actual reported CPU usage by processes or by other utilities such as top.
It seems that error is introduced with commit c803ec6dae5556fa35d6bd8124aa536633887f77 Small diff will fix it: --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -210,7 +210,7 @@ double Platform_setCPUValues(Meter* this, unsigned int cpu) { this->curItems = 4; percent = v[CPU_METER_NICE] + v[CPU_METER_NORMAL] + v[CPU_METER_KERNEL] + v[CPU_METER_IRQ]; } else { - v[CPU_METER_NORMAL] = cpuData->systemAllPercent; + v[CPU_METER_KERNEL] = cpuData->systemAllPercent; this->curItems = 3; percent = v[CPU_METER_NICE] + v[CPU_METER_NORMAL] + v[CPU_METER_KERNEL]; } I'll report it to the upstream.
Fixed, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=ef1b781fb1d88ba11cadc4f35bb398bea2378aef commit ef1b781fb1d88ba11cadc4f35bb398bea2378aef Author: Fernando Apesteguía <fernape@FreeBSD.org> AuthorDate: 2024-08-23 10:57:48 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2024-08-28 06:35:26 +0000 sysutils/htop: Fix CPU usage in FreeBSD Cherry pick fix from upstream. PR: 280600 281014 Approved by: gaod@hychen.org (maintainer, timeout > 2 weeks) Differential Revision: https://reviews.freebsd.org/D46401 sysutils/htop/Makefile | 5 ++++- sysutils/htop/distinfo | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-)