summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-01 16:24:19 +0100
committerLennart Poettering <lennart@poettering.net>2015-03-02 12:15:25 +0100
commit5ad096b3f1331b175340129a8c9a5a9d711e5415 (patch)
tree41896760dde9b0ca2d45d04484c4a2308a600b0e /src/core/mount.c
parent606303a93ea52a70ebba55bb3152820e630f2164 (diff)
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.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 8e4a376944..5ee679da7c 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -706,7 +706,11 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) {
assert(c);
assert(_pid);
- unit_realize_cgroup(UNIT(m));
+ (void) unit_realize_cgroup(UNIT(m));
+ if (m->reset_cpu_usage) {
+ (void) unit_reset_cpu_usage(UNIT(m));
+ m->reset_cpu_usage = false;
+ }
r = unit_setup_exec_runtime(UNIT(m));
if (r < 0)
@@ -1030,6 +1034,7 @@ static int mount_start(Unit *u) {
m->result = MOUNT_SUCCESS;
m->reload_result = MOUNT_SUCCESS;
+ m->reset_cpu_usage = true;
mount_enter_mounting(m);
return 1;