projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f98c258
)
cgtop: Still try to get CPU statistics if controller-free
author
Chris Down
<chris@chrisdown.name>
Sat, 17 Nov 2018 11:47:44 +0000
(11:47 +0000)
committer
Chris Down
<chris@chrisdown.name>
Sun, 18 Nov 2018 12:21:41 +0000
(12:21 +0000)
If CPU accounting is cheap, no controller necessarily needs to be
enabled here for us to be able to read statistics.
src/cgtop/cgtop.c
patch
|
blob
|
history
diff --git
a/src/cgtop/cgtop.c
b/src/cgtop/cgtop.c
index efbfd240a6bfd05b2d6dca833b349ca070640021..af2ef853bd5ac5562603487dc444c01361391940 100644
(file)
--- 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;