From 5ad096b3f1331b175340129a8c9a5a9d711e5415 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 1 Mar 2015 16:24:19 +0100 Subject: core: expose consumed CPU time per unit This adds support for showing the accumulated consumed CPU time per-unit in the "systemctl status" output. The property is also readable via the bus. --- src/core/scope.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/scope.c') diff --git a/src/core/scope.c b/src/core/scope.c index a0e4732533..1c3c6bb540 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -286,6 +286,9 @@ static int scope_start(Unit *u) { if (!u->transient && UNIT(s)->manager->n_reloading <= 0) return -ENOENT; + (void) unit_realize_cgroup(u); + (void) unit_reset_cpu_usage(u); + r = unit_attach_pids_to_cgroup(u); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf