summaryrefslogtreecommitdiffstats
path: root/src/plugin_proc.c
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2015-11-26 01:30:57 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2015-11-26 01:30:57 +0200
commit171a60571572067aad59fbee9f975b05b8663001 (patch)
tree82b6756bf87354155c0dd842fa30687f2688cc71 /src/plugin_proc.c
parent62aac417f30aba33549f4e706b43f685d988a58d (diff)
fixed a bug in the incremental calculations where the exact duration (in nanoseconds) between incremental updates was not taken into account, so the values were always calculated using the pre-agreed update_every duration
Diffstat (limited to 'src/plugin_proc.c')
-rwxr-xr-xsrc/plugin_proc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugin_proc.c b/src/plugin_proc.c
index 4201a6fb56..91646eb719 100755
--- a/src/plugin_proc.c
+++ b/src/plugin_proc.c
@@ -136,8 +136,8 @@ void *proc_main(void *ptr)
if(!stcpu_thread) {
stcpu_thread = rrdset_create("netdata", "plugin_proc_cpu", NULL, "netdata", "NetData Proc Plugin CPU usage", "milliseconds/s", 9999, rrd_update_every, RRDSET_TYPE_STACKED);
- rrddim_add(stcpu_thread, "user", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
- rrddim_add(stcpu_thread, "system", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
+ rrddim_add(stcpu_thread, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL);
+ rrddim_add(stcpu_thread, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL);
}
else rrdset_next(stcpu_thread);
@@ -151,8 +151,8 @@ void *proc_main(void *ptr)
if(!stcpu) {
stcpu = rrdset_create("netdata", "server_cpu", NULL, "netdata", "NetData CPU usage", "milliseconds/s", 2000, rrd_update_every, RRDSET_TYPE_STACKED);
- rrddim_add(stcpu, "user", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
- rrddim_add(stcpu, "system", NULL, 1, 1000 * rrd_update_every, RRDDIM_INCREMENTAL);
+ rrddim_add(stcpu, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL);
+ rrddim_add(stcpu, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL);
}
else rrdset_next(stcpu);
@@ -179,7 +179,7 @@ void *proc_main(void *ptr)
if(!streqs) {
streqs = rrdset_create("netdata", "requests", NULL, "netdata", "NetData Web Requests", "requests/s", 3001, rrd_update_every, RRDSET_TYPE_LINE);
- rrddim_add(streqs, "requests", NULL, 1, 1 * rrd_update_every, RRDDIM_INCREMENTAL);
+ rrddim_add(streqs, "requests", NULL, 1, 1, RRDDIM_INCREMENTAL);
}
else rrdset_next(streqs);
@@ -192,8 +192,8 @@ void *proc_main(void *ptr)
if(!stbytes) {
stbytes = rrdset_create("netdata", "net", NULL, "netdata", "NetData Network Traffic", "kilobits/s", 3002, rrd_update_every, RRDSET_TYPE_AREA);
- rrddim_add(stbytes, "in", NULL, 8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
- rrddim_add(stbytes, "out", NULL, -8, 1024 * rrd_update_every, RRDDIM_INCREMENTAL);
+ rrddim_add(stbytes, "in", NULL, 8, 1024, RRDDIM_INCREMENTAL);
+ rrddim_add(stbytes, "out", NULL, -8, 1024, RRDDIM_INCREMENTAL);
}
else rrdset_next(stbytes);