From a6a4d3c46bd41e2f33e8eb61ac53b3c79049f167 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 Nov 2015 00:36:57 +0100 Subject: cgls: suppress output of controller name, if it's the systemd one --- src/cgls/cgls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cgls/cgls.c') diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 4e9a76a100..a5a580438a 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -165,8 +165,10 @@ static int get_cgroup_root(char **ret) { } static void show_cg_info(const char *controller, const char *path) { - if (cg_unified() <= 0) + + if (cg_unified() <= 0 && controller && !streq(controller, SYSTEMD_CGROUP_CONTROLLER)) printf("Controller %s; ", controller); + printf("Control group %s:\n", isempty(path) ? "/" : path); fflush(stdout); } -- cgit v1.2.3-54-g00ecf From b1f044bbc45cc05049eed9c483a2d6bef73c0adc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 Nov 2015 00:37:19 +0100 Subject: cgls: when showing root slice, put -.slice at top of tree --- src/cgls/cgls.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/cgls/cgls.c') diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index a5a580438a..22efc58ac9 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -272,6 +272,7 @@ int main(int argc, char *argv[]) { show_cg_info(SYSTEMD_CGROUP_CONTROLLER, root); + printf("-.slice\n"); r = show_cgroup(SYSTEMD_CGROUP_CONTROLLER, root, NULL, 0, arg_kernel_threads, output_flags); } } -- cgit v1.2.3-54-g00ecf