From: Chris Down Date: Sat, 17 Nov 2018 11:47:44 +0000 (+0000) Subject: cgtop: Still try to get CPU statistics if controller-free X-Git-Tag: v240~286^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94ddb08;p=thirdparty%2Fsystemd.git cgtop: Still try to get CPU statistics if controller-free If CPU accounting is cheap, no controller necessarily needs to be enabled here for us to be able to read statistics. --- diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index efbfd240a6b..af2ef853bd5 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -231,7 +231,7 @@ static int process( if (g->n_tasks > 0) g->n_tasks_valid = true; - } else if (STR_IN_SET(controller, "cpu", "cpuacct")) { + } else if (STR_IN_SET(controller, "cpu", "cpuacct") || cpu_accounting_is_cheap()) { _cleanup_free_ char *p = NULL, *v = NULL; uint64_t new_usage; nsec_t timestamp;