1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

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.
This commit is contained in:
Chris Down 2018-11-17 11:47:44 +00:00
parent f98c25850f
commit 94ddb08d74

View File

@ -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;