CPU usage is the average since boot #10

Closed
opened 2026-10-14 08:58:51 +00:00 by christianmanivong · 0 comments
Owner

system_mixin.py ~40-46: the docstring promises "two samples 1 second apart", but the awk reads /proc/stat once and computes 1 - idle/total over the counters since boot. A box at 100 % for the last minute shows its lifetime average.

Fix: two reads one second apart, difference of the counters.

Prio P3: wrong figure on every OpenWrt device.

`system_mixin.py` ~40-46: the docstring promises "two samples 1 second apart", but the awk reads `/proc/stat` once and computes `1 - idle/total` over the counters since boot. A box at 100 % for the last minute shows its lifetime average. Fix: two reads one second apart, difference of the counters. Prio P3: wrong figure on every OpenWrt device.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-openwrt#10