mirror of
https://github.com/systemd/systemd.git
synced 2025-08-31 09:49:54 +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:
@ -231,7 +231,7 @@ static int process(
|
|||||||
if (g->n_tasks > 0)
|
if (g->n_tasks > 0)
|
||||||
g->n_tasks_valid = true;
|
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;
|
_cleanup_free_ char *p = NULL, *v = NULL;
|
||||||
uint64_t new_usage;
|
uint64_t new_usage;
|
||||||
nsec_t timestamp;
|
nsec_t timestamp;
|
||||||
|
Reference in New Issue
Block a user