towerops/lib/towerops_web/live/device_live
Graham McIntire f0fe3c025c fix: recover correct bandwidth rate when 32-bit SNMP counters wrap (#161)
Standard ifInOctets/ifOutOctets are 32-bit counters that wrap around
4,294,967,296 bytes (~4.3 GB). At 1 Gbps this wraps every ~34 seconds,
causing brief drops to 0 bps in traffic charts and capacity reports.

When prev > 2^31 and delta is negative, add 2^32 to recover the correct
rate. If the result is still negative (HC 64-bit counter after reboot),
clamp to 0. Small-value decreases (prev < 2^31) continue to clamp to 0
since they cannot be real 32-bit wraps.

Fixes both capacity.ex (utilization reports) and device_live/show.ex
(per-device traffic chart).

Reviewed-on: graham/towerops-web#161
2026-03-25 09:52:15 -05:00
..
form.ex fix: remove device_role_source from form params (#110) 2026-03-22 12:27:41 -05:00
form.html.heex feat: simplify device type to manual-only with 6 options (#109) 2026-03-22 11:24:53 -05:00
index.ex fix/critical-logic-and-memory-bugs (#159) 2026-03-25 09:50:21 -05:00
index.html.heex fix-sticky-header-overlap (#60) 2026-03-17 13:21:58 -05:00
show.ex fix: recover correct bandwidth rate when 32-bit SNMP counters wrap (#161) 2026-03-25 09:52:15 -05:00
show.html.heex update more (#146) 2026-03-24 16:32:09 -05:00