]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
report: add cgroup metrics in a separate varlink service (#41489)
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)
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.

1  2 
src/core/cgroup.c
units/meson.build

Simple merge
Simple merge