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 |
||
|---|---|---|
| .. | ||
| assets | ||
| integration | ||
| mix/tasks | ||
| snmpkit | ||
| support | ||
| towerops | ||
| towerops_web | ||
| test_helper.exs | ||
| towerops_native_test.exs | ||