]> git.ipfire.org Git - thirdparty/systemd.git/commit
report: report user and system CPU time per cgroup
authorYaping Li <202858510+YapingLi04@users.noreply.github.com>
Wed, 29 Apr 2026 22:17:22 +0000 (15:17 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 Apr 2026 18:08:39 +0000 (20:08 +0200)
commitf78ba86d262adee5720a704fd6049db6354d9048
tree15fddf4cb6a38b4e2e79cd0eab132fc81f596969
parent4ce8cd17da3c5688a36106a1af48a16dd13daae6
report: report user and system CPU time per cgroup

Extend io.systemd.CGroup.CpuUsage from a single per-unit nanosecond
counter to three rows distinguished by a "type" field of "total",
"user", or "system". The values come from cpu.stat's usage_usec,
user_usec and system_usec keys, read in a single keyed-attribute
fetch and cached on each CGroupInfo so each scrape only opens
cpu.stat once per cgroup.
src/report/report-cgroup.c
test/units/TEST-74-AUX-UTILS.report.sh