]> git.ipfire.org Git - thirdparty/systemd.git/commit
report: add cgroup metrics in a separate varlink service (#41489) main
authorLennart Poettering <lennart@amutable.com>
Fri, 10 Apr 2026 10:10:06 +0000 (12:10 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Apr 2026 10:10:06 +0000 (12:10 +0200)
commit554ba32d3083c05e996a3ac0335dfb3da5f81a8a
tree209a4b7dd4d471717085250a87252d66425a5133
parentdd80e5a348bdb8185e040f66ede00fd4ffdee777
parent8c65fe4fa11d9476558aa6c54d9e26db8cc80f32
report: add cgroup metrics in a separate varlink service (#41489)

Add CpuUsage, MemoryUsage, IOReadBytes, IOReadOperations, and
TasksCurrent in a standalone socket-activated varlink service. These
metrics are gathered from the kernel via cgroup files and PID1's only
role is mapping unit names to cgroup paths — a separate process can
query PID1 once for that mapping and then read the cgroup files
directly, minimizing PID1 involvement.

The new systemd-report-cgroup-metrics service listens at
/run/systemd/report/io.systemd.CGroup and exposes:
  - io.systemd.CGroup.CpuUsage
  - io.systemd.CGroup.IOReadBytes
  - io.systemd.CGroup.IOReadOperations
  - io.systemd.CGroup.MemoryUsage (with type=current/available/peak)
  - io.systemd.CGroup.TasksCurrent

This is spun out of #41078 and based on top of it. Will rebase once
that's merged.
src/core/cgroup.c
units/meson.build