summaryrefslogtreecommitdiffstats
path: root/src/core/cgroup.h
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2023-11-06 13:15:55 +0100
committerFlorian Schmaus <flo@geekplace.eu>2023-11-06 18:08:33 +0100
commit6c71db763cb482c30870359dd3d188a6aa23c4da (patch)
treeb26f3a77e6c876670c09d8236a252fc8943b96cb /src/core/cgroup.h
parentMerge pull request #29873 from yuwata/network-revert-hop-limit (diff)
downloadsystemd-6c71db763cb482c30870359dd3d188a6aa23c4da.tar.xz
systemd-6c71db763cb482c30870359dd3d188a6aa23c4da.zip
cgroup: add support for memory.peak
Linux's Control Group v2 interfaces exposes memory.peak, which contains the "max memory usage recorded for the cgroup and its descendants since the creation of the cgroup." This commit adds a new property "MemoryPeak" for units and makes "systemctl show" display this value if it is available. Fixes #29878. Signed-off-by: Florian Schmaus <flo@geekplace.eu>
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r--src/core/cgroup.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index d7cc842835..0b073672a3 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -353,6 +353,7 @@ int unit_watch_all_pids(Unit *u);
int unit_synthesize_cgroup_empty_event(Unit *u);
int unit_get_memory_current(Unit *u, uint64_t *ret);
+int unit_get_memory_peak(Unit *u, uint64_t *ret);
int unit_get_memory_available(Unit *u, uint64_t *ret);
int unit_get_tasks_current(Unit *u, uint64_t *ret);
int unit_get_cpu_usage(Unit *u, nsec_t *ret);