# CPU load stats are incorrect in macOS

**URL:** <https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723>\
**Category:** Webmin\
**Created:** [August 20, 2025, 3:50pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723 "2025-08-20T15:50:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlgtx](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jlgtx/32/21091_2.png) [@jlgtx](https://forum.virtualmin.com/u/jlgtx)\
**Post date:** [August 20, 2025, 3:50pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/1 "2025-08-20T15:50:34Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | macOS 15.6 on Intel |
| Webmin version | 2.402 |

I’ve been scratching my head over the fact that the CPU load stat on the Webmin dashboard is always way too high, and never matches the CPU load shown in Activity Monitor. It looks to me like Webmin is using an additive load across all CPU cores (six in this case) to arrive at its load value; e.g., if one core is at 100% and the rest are at 5% each, Webmin will show 125% CPU load. In reality, it should probably divide that by the number of cores to get the average CPU load.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [August 20, 2025, 4:14pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/2 "2025-08-20T16:14:12Z")

</div>

Hello,

On macOS, we get data about the CPU load average from the `uptime` command output.

Does the `uptime` output also seem wrong to you?

---

<div class="post-metadata">

**Author:** ![jlgtx](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jlgtx/32/21091_2.png) [@jlgtx](https://forum.virtualmin.com/u/jlgtx)\
**Post date:** [August 20, 2025, 5:00pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/3 "2025-08-20T17:00:06Z")

</div>

The numbers for “CPU load averages” match uptime, but the CPU graph doesn’t seem to be tied to those numbers, it looks more like it’s doing an aggregate of percentages from top or some such. It’s obviously not considering the number of available cores. That number is available via “sysctl -n hw.ncpu” so it could be utilized for an accurate graph.

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [August 20, 2025, 10:21pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/4 "2025-08-20T22:21:52Z")

</div>

That can’t be right! This is how we get CPU load on macOS:

> <https://github.com/webmin/webmin/blob/591dda719990064d68c1782cd36238f83be0f00e/proc/macos-lib.pl#L191-L208>

And, `iostat` does aggregate all cores. I’m not sure what’s really wrong on your end.

---

<div class="post-metadata">

**Author:** ![jlgtx](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jlgtx/32/21091_2.png) [@jlgtx](https://forum.virtualmin.com/u/jlgtx)\
**Post date:** [August 21, 2025, 1:39am UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/5 "2025-08-21T01:39:01Z")

</div>

From the “keeps getting weirder” department, now the graph shows zero. It was something like 130% when I first opened the window, then it went to zero and is staying there. You can see that iostat, Activity Monitor, and the “CPU load averages” are tracking, but that graph has a mind of its own.

 ![Screenshot 2025-08-20 at 8.32.54 PM](https://cdn.forum.virtualmin.com/uploads/default/original/3X/2/9/2919665df70930989e0396cfdfc90834510ca844.jpeg)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [August 21, 2025, 8:23am UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/6 "2025-08-21T08:23:14Z")

</div>

The confusing part may be here is that unless the browser window is focused (in the foreground) the stats won’t update.

The updating of the stats stops about 3-5 seconds after the window loses focus.

What you can do to test it is run a CPU-intensive process in the background, then focus back on the browser window to see if they are updating correctly.

---

<div class="post-metadata">

**Author:** ![jlgtx](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/jlgtx/32/21091_2.png) [@jlgtx](https://forum.virtualmin.com/u/jlgtx)\
**Post date:** [August 21, 2025, 2:58pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/7 "2025-08-21T14:58:29Z")

</div>

Here’s the more typical scenario.

Focus doesn’t seem to matter, as I can refresh the browser window to no effect.

At the end of the day, this issue probably isn’t worth any of our time; if I’m concerned about CPU stats, I’ll be using top or iostat, not this graph. It’s just one of those “if it’s there, it ought to at least be sort of accurate” things.

 ![Screenshot 2025-08-21 at 9.56.57 AM](https://cdn.forum.virtualmin.com/uploads/default/original/3X/1/1/1138f151124a360f86836c8f1ce1b3edaf6d31ee.jpeg)

---

<div class="post-metadata">

**Author:** ![Ilia](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/ilia/32/10185_2.png) [@Ilia](https://forum.virtualmin.com/u/Ilia)\
**Post date:** [August 21, 2025, 5:44pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/8 "2025-08-21T17:44:13Z")

</div>

Oh, thanks! I see the issue now!

Apply this patch and give it another try:

```auto
webmin patch https://github.com/webmin/webmin/commit/ef55f00

```

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [October 20, 2025, 5:44pm UTC](https://forum.virtualmin.com/t/cpu-load-stats-are-incorrect-in-macos/134723/9 "2025-10-20T17:44:17Z")

</div>

Closed on October 20, 2025, 5:44pm UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
