mirror of
https://github.com/nicolargo/glances.git
synced 2026-06-03 03:15:09 -04:00
Three orthogonal improvements bundled under the processlist v5 surface:
1) Categorical thresholds (framework-level)
- thresholds_v5 grows compute_level_categorical + read_thresholds_categorical:
value-set membership instead of numeric comparison. Walked
most-severe-first so misconfigured overlaps escalate to the higher
bucket. Unmatched values return "ok" (v4 parity).
- base_v5._compute_levels_for_item dispatches on schema flag
``threshold_type: "categorical"``; numeric path unchanged.
- 8 new threshold unit tests (incl. CSV parsing, whitespace, pk-prefix).
2) processlist status + nice as categorical fields
- status (R/W/Z/D/...) and nice (-20..19) become watched with
``threshold_type: "categorical"``, no defaults — operators opt in:
[processlist]
status_ok=R,W,P,I
status_critical=Z,D
nice_warning=-20,...,-1,1,...,19
Without configuration: no _levels entry (no false positives).
3) processlist renderer: VIRT/RES + R/s/W/s + bold cmd
- Adds VIRT (memory_info.vms) and RES (memory_info.rss) columns.
- Adds R/s and W/s columns computed from io_counters
([r_new, w_new, r_old, w_old, io_tag]) / time_since_update;
io_tag != 1 renders "?" (access denied or first cycle).
- Status / nice cells inherit categorical _levels colour.
- Command rendering ports v4 split_cmdline:
/usr/bin/python3 myscript.py
→ "/usr/bin/" + **"python3"** + " myscript.py"
Kthreads (empty cmdline) keep the [name] fallback.
v4 catalogue updated accordingly. Suite v5: 1370+30 green, lint clean.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>