projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcc7aac
)
cgtop: IO readings are valid if any data is available, even if unchanged since last...
author
Charles Duffy
<chaduffy@cisco.com>
Tue, 2 Jun 2015 22:38:49 +0000
(17:38 -0500)
committer
Charles Duffy
<chaduffy@cisco.com>
Wed, 10 Jun 2015 23:06:28 +0000
(18:06 -0500)
Emit "0" rather than "-" if no change in IO values are seen for a process since
last tick, so long as accounting has registered content at all.
src/cgtop/cgtop.c
patch
|
blob
|
history
diff --git
a/src/cgtop/cgtop.c
b/src/cgtop/cgtop.c
index
3a2842d
..
d630e35
100644
(file)
--- a/
src/cgtop/cgtop.c
+++ b/
src/cgtop/cgtop.c
@@
-281,11
+281,10
@@
static int process(const char *controller, const char *path, Hashmap *a, Hashmap
yr = rd - g->io_input;
yw = wr - g->io_output;
- if (
yr > 0 || yw
> 0) {
+ if (
g->io_input > 0 || g->io_output
> 0) {
g->io_input_bps = (yr * 1000000000ULL) / x;
g->io_output_bps = (yw * 1000000000ULL) / x;
g->io_valid = true;
-
}
}