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/slice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/slice.c') diff --git a/src/core/slice.c b/src/core/slice.c index 4d2eaf7ed6..0bebdbcbc6 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -181,7 +181,8 @@ static int slice_start(Unit *u) { assert(t); assert(t->state == SLICE_DEAD); - unit_realize_cgroup(u); + (void) unit_realize_cgroup(u); + (void) unit_reset_cpu_usage(u); slice_set_state(t, SLICE_ACTIVE); return 1; -- cgit v1.2.3-54-g00ecf