Bug
Same root cause as #65, but in process_pidstat (around line 514) instead of process_mpstat.
desc = {"source": "pidstat", "class": "percentage", "default-aggregation": "avg"}
fields = {"usr": ..., "system": ..., "guest": ..., "wait": ...}
for field_name, val in fields.items():
names = {"cmd": command, "pid": pid, "type": field_name}
desc["type"] = "NonBusy-CPU" if field_name == "wait" else "Busy-CPU"
sample = {"end": time_ms, "value": val / 100}
metrics.log_sample("pidstat", desc, names, sample)
usr, system, guest (mapped to Busy-CPU) and wait (mapped to NonBusy-CPU) are mutually-exclusive per-process CPU time slices, identical in structure to mpstat's per-CPU type breakdown. Collapsing across the type breakout with avg produces the same kind of wrong result as #65 — e.g. a process that's 100% usr + 0% system + 0% guest would show as ~33% Busy-CPU instead of 100%.
Fix
desc["type"] = "NonBusy-CPU" if field_name == "wait" else "Busy-CPU"
desc["class"] = "throughput"
desc["default-aggregation"] = "sum"
Matches the pattern used by sar-net (class: "throughput", default-aggregation: "sum") and the revised fix proposed in #65.
Related
Companion bug to #65 (mpstat), same file (sysstat-post-process.py).
Bug
Same root cause as #65, but in
process_pidstat(around line 514) instead ofprocess_mpstat.usr,system,guest(mapped toBusy-CPU) andwait(mapped toNonBusy-CPU) are mutually-exclusive per-process CPU time slices, identical in structure to mpstat's per-CPU type breakdown. Collapsing across thetypebreakout withavgproduces the same kind of wrong result as #65 — e.g. a process that's 100% usr + 0% system + 0% guest would show as ~33% Busy-CPU instead of 100%.Fix
Matches the pattern used by
sar-net(class: "throughput",default-aggregation: "sum") and the revised fix proposed in #65.Related
Companion bug to #65 (mpstat), same file (
sysstat-post-process.py).