]> arthur.barton.de Git - netdata.git/blobdiff - src/apps_plugin.c
fixed a bug in the incremental calculations where the exact duration (in nanoseconds...
[netdata.git] / src / apps_plugin.c
index 9b761c65b2d4524b76152f2983a7668eccb86142..e3ec2a20a4bbc0a30260d2aaed74b24a6f7bc975 100755 (executable)
@@ -1743,7 +1743,7 @@ void show_charts(void)
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu %s\n", w->name, (unsigned long long)(Hertz * update_every), w->hidden?"hidden,noreset":"noreset");
+               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu %s\n", w->name, (unsigned long long)(Hertz), w->hidden?"hidden,noreset":"noreset");
        }
 
        fprintf(stdout, "CHART apps.mem '' 'Apps Dedicated Memory (w/o shared)' 'MB' apps apps stacked 20003 %d\n", update_every);
@@ -1771,56 +1771,56 @@ void show_charts(void)
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors);
        }
 
        fprintf(stdout, "CHART apps.cpu_system '' 'Apps CPU System Time (%ld%% = %ld core%s)' 'cpu time %%' apps none stacked 20021 %d\n", (processors * 100), processors, (processors>1)?"s":"", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 100 %llu noreset\n", w->name, Hertz * processors);
        }
 
        fprintf(stdout, "CHART apps.major_faults '' 'Apps Major Page Faults (swaps in)' 'page faults/s' apps apps stacked 20010 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 1 noreset\n", w->name);
        }
 
        fprintf(stdout, "CHART apps.minor_faults '' 'Apps Minor Page Faults' 'page faults/s' apps none stacked 20011 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 1 noreset\n", w->name);
        }
 
        fprintf(stdout, "CHART apps.lreads '' 'Apps Disk Logical Reads' 'kilobytes/s' apps none stacked 20042 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
        }
 
        fprintf(stdout, "CHART apps.lwrites '' 'Apps I/O Logical Writes' 'kilobytes/s' apps none stacked 20042 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
        }
 
        fprintf(stdout, "CHART apps.preads '' 'Apps Disk Reads' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
        }
 
        fprintf(stdout, "CHART apps.pwrites '' 'Apps Disk Writes' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
        for (w = target_root; w ; w = w->next) {
                if(w->target || (!w->processes && !w->exposed)) continue;
 
-               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024 * update_every);
+               fprintf(stdout, "DIMENSION %s '' incremental 1 %d noreset\n", w->name, 1024);
        }
 
        fprintf(stdout, "CHART apps.files '' 'Apps Open Files' 'open files' apps apps stacked 20050 %d\n", update_every);
@@ -1845,11 +1845,11 @@ void show_charts(void)
        }
 
        fprintf(stdout, "CHART netdata.apps_cpu '' 'Apps Plugin CPU' 'milliseconds/s' netdata netdata stacked 10000 %d\n", update_every);
-       fprintf(stdout, "DIMENSION user '' incremental 1 %d\n", 1000 * update_every);
-       fprintf(stdout, "DIMENSION system '' incremental 1 %d\n", 1000 * update_every);
+       fprintf(stdout, "DIMENSION user '' incremental 1 %d\n", 1000);
+       fprintf(stdout, "DIMENSION system '' incremental 1 %d\n", 1000);
 
        fprintf(stdout, "CHART netdata.apps_files '' 'Apps Plugin Files' 'files/s' netdata netdata line 10001 %d\n", update_every);
-       fprintf(stdout, "DIMENSION files '' incremental 1 %d\n", update_every);
+       fprintf(stdout, "DIMENSION files '' incremental 1 1\n");
        fprintf(stdout, "DIMENSION pids '' absolute 1 1\n");
        fprintf(stdout, "DIMENSION fds '' absolute 1 1\n");
        fprintf(stdout, "DIMENSION targets '' absolute 1 1\n");