mirror of
https://github.com/nicolargo/glances.git
synced 2026-09-17 15:49:34 -04:00
The rx/tx thresholds describe a bitrate, but update_views measured them against read_bytes / write_bytes -- the lifetime counters psutil returns. Those only grow, so on any machine with uptime a configured threshold latched on within seconds and never came back down, whatever the disk was doing. The network plugin next door already alerts on bytes_recv_rate_per_sec. The decoration also went only to the counter keys. The TUI prints the rate and reads read_bytes' decoration, so it showed a colour derived from the wrong quantity; the WebUI asks for read_bytes_rate_per_sec, which nothing set, so it showed no colour at all. Both keys now carry it, matching network again. The rate view exists only once there is a timespan to divide by, so the rate key is set when present -- setting it unconditionally raises KeyError on the first sample, which the existing view tests catch.