diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-08 01:22:58 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-02-08 01:22:58 +0200 |
commit | 7c0ba6a675cbca3a6fa1a0b79a37259ad4b52aee (patch) | |
tree | 8c29ac1d6ef26cffab549f2da21cde1ca12b41f2 /src | |
parent | 20051bfef74b701d5e67af84eca8b416bc5f5e2a (diff) |
added a new element on all charts: context, which is the template upon the chart is build, changed the meaning of element: family, which now reflects the submenu of the dashboard; changed the priorities of most charts to allow the dashboard have dynamic sorting; added submenus to most categories of the main menu; now the dashboard is completely dynamic (except the top key charts)
Diffstat (limited to 'src')
-rwxr-xr-x | src/apps_plugin.c | 34 | ||||
-rwxr-xr-x | src/main.c | 4 | ||||
-rwxr-xr-x | src/plugin_checks.c | 6 | ||||
-rwxr-xr-x | src/plugin_idlejitter.c | 2 | ||||
-rwxr-xr-x | src/plugin_proc.c | 10 | ||||
-rwxr-xr-x | src/plugin_tc.c | 6 | ||||
-rwxr-xr-x | src/plugins_d.c | 14 | ||||
-rwxr-xr-x | src/proc_diskstats.c | 20 | ||||
-rwxr-xr-x | src/proc_interrupts.c | 7 | ||||
-rwxr-xr-x | src/proc_meminfo.c | 20 | ||||
-rwxr-xr-x | src/proc_net_dev.c | 14 | ||||
-rwxr-xr-x | src/proc_net_ip_vs_stats.c | 6 | ||||
-rwxr-xr-x | src/proc_net_netstat.c | 12 | ||||
-rw-r--r-- | src/proc_net_rpc_nfsd.c | 26 | ||||
-rwxr-xr-x | src/proc_net_snmp.c | 20 | ||||
-rwxr-xr-x | src/proc_net_stat_conntrack.c | 12 | ||||
-rwxr-xr-x | src/proc_softirqs.c | 7 | ||||
-rwxr-xr-x | src/proc_stat.c | 16 | ||||
-rwxr-xr-x | src/proc_sys_kernel_random_entropy_avail.c | 2 | ||||
-rwxr-xr-x | src/proc_vmstat.c | 8 | ||||
-rwxr-xr-x | src/rrd.c | 21 | ||||
-rwxr-xr-x | src/rrd.h | 18 | ||||
-rwxr-xr-x | src/rrd2json.c | 4 | ||||
-rwxr-xr-x | src/sys_kernel_mm_ksm.c | 6 | ||||
-rwxr-xr-x | src/unit_test.c | 4 |
25 files changed, 162 insertions, 137 deletions
diff --git a/src/apps_plugin.c b/src/apps_plugin.c index b572bb2927..39adaba2f0 100755 --- a/src/apps_plugin.c +++ b/src/apps_plugin.c @@ -1751,116 +1751,116 @@ void show_charts(void) // we have something new to show // update the charts - fprintf(stdout, "CHART apps.cpu '' 'Apps CPU Time (%ld%% = %ld core%s)' 'cpu time %%' apps apps stacked 20001 %d\n", (processors * 100), processors, (processors>1)?"s":"", update_every); + fprintf(stdout, "CHART apps.cpu '' 'Apps CPU Time (%ld%% = %ld core%s)' 'cpu time %%' cpu apps.cpu stacked 20001 %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 %s\n", w->name, 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); + fprintf(stdout, "CHART apps.mem '' 'Apps Dedicated Memory (w/o shared)' 'MB' mem apps.mem stacked 20003 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute %ld %ld noreset\n", w->name, sysconf(_SC_PAGESIZE), 1024L*1024L); } - fprintf(stdout, "CHART apps.threads '' 'Apps Threads' 'threads' apps apps stacked 20005 %d\n", update_every); + fprintf(stdout, "CHART apps.threads '' 'Apps Threads' 'threads' processes apps.threads stacked 20005 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute 1 1 noreset\n", w->name); } - fprintf(stdout, "CHART apps.processes '' 'Apps Processes' 'processes' apps apps stacked 20004 %d\n", update_every); + fprintf(stdout, "CHART apps.processes '' 'Apps Processes' 'processes' processes apps.processes stacked 20004 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute 1 1 noreset\n", w->name); } - fprintf(stdout, "CHART apps.cpu_user '' 'Apps CPU User Time (%ld%% = %ld core%s)' 'cpu time %%' apps none stacked 20020 %d\n", (processors * 100), processors, (processors>1)?"s":"", update_every); + fprintf(stdout, "CHART apps.cpu_user '' 'Apps CPU User Time (%ld%% = %ld core%s)' 'cpu time %%' cpu apps.cpu_user stacked 20020 %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); } - 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); + fprintf(stdout, "CHART apps.cpu_system '' 'Apps CPU System Time (%ld%% = %ld core%s)' 'cpu time %%' cpu apps.cpu_system 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); } - fprintf(stdout, "CHART apps.major_faults '' 'Apps Major Page Faults (swaps in)' 'page faults/s' apps apps stacked 20010 %d\n", update_every); + fprintf(stdout, "CHART apps.major_faults '' 'Apps Major Page Faults (swap read)' 'page faults/s' swap apps.major_faults 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 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); + fprintf(stdout, "CHART apps.minor_faults '' 'Apps Minor Page Faults' 'page faults/s' mem apps.minor_faults 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 1 noreset\n", w->name); } - fprintf(stdout, "CHART apps.lreads '' 'Apps Disk Logical Reads' 'kilobytes/s' apps none stacked 20042 %d\n", update_every); + fprintf(stdout, "CHART apps.lreads '' 'Apps Disk Logical Reads' 'kilobytes/s' disk apps.lreads 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); } - fprintf(stdout, "CHART apps.lwrites '' 'Apps I/O Logical Writes' 'kilobytes/s' apps none stacked 20042 %d\n", update_every); + fprintf(stdout, "CHART apps.lwrites '' 'Apps I/O Logical Writes' 'kilobytes/s' disk apps.lwrites 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); } - fprintf(stdout, "CHART apps.preads '' 'Apps Disk Reads' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every); + fprintf(stdout, "CHART apps.preads '' 'Apps Disk Reads' 'kilobytes/s' disk apps.preads 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); } - fprintf(stdout, "CHART apps.pwrites '' 'Apps Disk Writes' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every); + fprintf(stdout, "CHART apps.pwrites '' 'Apps Disk Writes' 'kilobytes/s' disk apps.pwrites 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); } - fprintf(stdout, "CHART apps.files '' 'Apps Open Files' 'open files' apps apps stacked 20050 %d\n", update_every); + fprintf(stdout, "CHART apps.files '' 'Apps Open Files' 'open files' disk apps.files stacked 20050 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute 1 1 noreset\n", w->name); } - fprintf(stdout, "CHART apps.sockets '' 'Apps Open Sockets' 'open sockets' apps apps stacked 20051 %d\n", update_every); + fprintf(stdout, "CHART apps.sockets '' 'Apps Open Sockets' 'open sockets' net apps.sockets stacked 20051 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute 1 1 noreset\n", w->name); } - fprintf(stdout, "CHART apps.pipes '' 'Apps Pipes' 'open pipes' apps none stacked 20053 %d\n", update_every); + fprintf(stdout, "CHART apps.pipes '' 'Apps Pipes' 'open pipes' processes apps.pipes stacked 20053 %d\n", update_every); for (w = target_root; w ; w = w->next) { if(w->target || (!w->processes && !w->exposed)) continue; fprintf(stdout, "DIMENSION %s '' absolute 1 1 noreset\n", w->name); } - fprintf(stdout, "CHART netdata.apps_cpu '' 'Apps Plugin CPU' 'milliseconds/s' netdata netdata stacked 10000 %d\n", update_every); + fprintf(stdout, "CHART netdata.apps_cpu '' 'Apps Plugin CPU' 'milliseconds/s' apps.plugin netdata.apps_cpu stacked 140000 %d\n", 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, "CHART netdata.apps_files '' 'Apps Plugin Files' 'files/s' apps.plugin netdata.apps_files line 140001 %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"); diff --git a/src/main.c b/src/main.c index 38d84db0f0..a29757358a 100755 --- a/src/main.c +++ b/src/main.c @@ -41,8 +41,8 @@ int netdata_exit = 0; void netdata_cleanup_and_exit(int ret) { netdata_exit = 1; - rrdset_free_all(); - kill_childs(); + rrdset_save_all(); + // kill_childs(); unlink("/var/run/netdata.pid"); info("NetData exiting. Bye bye..."); exit(ret); diff --git a/src/plugin_checks.c b/src/plugin_checks.c index 62cc31da4b..379fb9a846 100755 --- a/src/plugin_checks.c +++ b/src/plugin_checks.c @@ -30,15 +30,15 @@ void *checks_main(void *ptr) RRDSET *check1, *check2, *check3, *apps_cpu = NULL; - check1 = rrdset_create("netdata", "check1", NULL, "netdata", "Caller gives microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE); + check1 = rrdset_create("netdata", "check1", NULL, "netdata", NULL, "Caller gives microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(check1, "absolute", NULL, -1, 1, RRDDIM_ABSOLUTE); rrddim_add(check1, "incremental", NULL, 1, 1, RRDDIM_INCREMENTAL); - check2 = rrdset_create("netdata", "check2", NULL, "netdata", "Netdata calcs microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE); + check2 = rrdset_create("netdata", "check2", NULL, "netdata", NULL, "Netdata calcs microseconds", "a million !", 99999, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(check2, "absolute", NULL, -1, 1, RRDDIM_ABSOLUTE); rrddim_add(check2, "incremental", NULL, 1, 1, RRDDIM_INCREMENTAL); - check3 = rrdset_create("netdata", "checkdt", NULL, "netdata", "Clock difference", "microseconds diff", 99999, rrd_update_every, RRDSET_TYPE_LINE); + check3 = rrdset_create("netdata", "checkdt", NULL, "netdata", NULL, "Clock difference", "microseconds diff", 99999, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(check3, "caller", NULL, 1, 1, RRDDIM_ABSOLUTE); rrddim_add(check3, "netdata", NULL, 1, 1, RRDDIM_ABSOLUTE); rrddim_add(check3, "apps.plugin", NULL, 1, 1, RRDDIM_ABSOLUTE); diff --git a/src/plugin_idlejitter.c b/src/plugin_idlejitter.c index a7197330c1..56c22a1601 100755 --- a/src/plugin_idlejitter.c +++ b/src/plugin_idlejitter.c @@ -36,7 +36,7 @@ void *cpuidlejitter_main(void *ptr) RRDSET *st = rrdset_find("system.idlejitter"); if(!st) { - st = rrdset_create("system", "idlejitter", NULL, "cpu", "CPU Idle Jitter", "microseconds lost/s", 9999, rrd_update_every, RRDSET_TYPE_LINE); + st = rrdset_create("system", "idlejitter", NULL, "processes", NULL, "CPU Idle Jitter", "microseconds lost/s", 9999, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(st, "jitter", NULL, 1, 1, RRDDIM_ABSOLUTE); } diff --git a/src/plugin_proc.c b/src/plugin_proc.c index ac96cb50b2..21aeecfb99 100755 --- a/src/plugin_proc.c +++ b/src/plugin_proc.c @@ -149,7 +149,7 @@ void *proc_main(void *ptr) if(!stcpu_thread) stcpu_thread = rrdset_find("netdata.plugin_proc_cpu"); 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); + stcpu_thread = rrdset_create("netdata", "plugin_proc_cpu", NULL, "proc.internal", NULL, "NetData Proc Plugin CPU usage", "milliseconds/s", 131000, rrd_update_every, RRDSET_TYPE_STACKED); rrddim_add(stcpu_thread, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL); rrddim_add(stcpu_thread, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL); @@ -164,7 +164,7 @@ void *proc_main(void *ptr) if(!stcpu) stcpu = rrdset_find("netdata.server_cpu"); if(!stcpu) { - stcpu = rrdset_create("netdata", "server_cpu", NULL, "netdata", "NetData CPU usage", "milliseconds/s", 2000, rrd_update_every, RRDSET_TYPE_STACKED); + stcpu = rrdset_create("netdata", "server_cpu", NULL, "netdata", NULL, "NetData CPU usage", "milliseconds/s", 130000, rrd_update_every, RRDSET_TYPE_STACKED); rrddim_add(stcpu, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL); rrddim_add(stcpu, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL); @@ -179,7 +179,7 @@ void *proc_main(void *ptr) if(!stclients) stclients = rrdset_find("netdata.clients"); if(!stclients) { - stclients = rrdset_create("netdata", "clients", NULL, "netdata", "NetData Web Clients", "connected clients", 3000, rrd_update_every, RRDSET_TYPE_LINE); + stclients = rrdset_create("netdata", "clients", NULL, "netdata", NULL, "NetData Web Clients", "connected clients", 131000, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(stclients, "clients", NULL, 1, 1, RRDDIM_ABSOLUTE); } @@ -192,7 +192,7 @@ void *proc_main(void *ptr) if(!streqs) streqs = rrdset_find("netdata.requests"); if(!streqs) { - streqs = rrdset_create("netdata", "requests", NULL, "netdata", "NetData Web Requests", "requests/s", 3001, rrd_update_every, RRDSET_TYPE_LINE); + streqs = rrdset_create("netdata", "requests", NULL, "netdata", NULL, "NetData Web Requests", "requests/s", 131100, rrd_update_every, RRDSET_TYPE_LINE); rrddim_add(streqs, "requests", NULL, 1, 1, RRDDIM_INCREMENTAL); } @@ -205,7 +205,7 @@ void *proc_main(void *ptr) if(!stbytes) stbytes = rrdset_find("netdata.net"); if(!stbytes) { - stbytes = rrdset_create("netdata", "net", NULL, "netdata", "NetData Network Traffic", "kilobits/s", 3002, rrd_update_every, RRDSET_TYPE_AREA); + stbytes = rrdset_create("netdata", "net", NULL, "netdata", NULL, "NetData Network Traffic", "kilobits/s", 131200, rrd_update_every, RRDSET_TYPE_AREA); rrddim_add(stbytes, "in", NULL, 8, 1024, RRDDIM_INCREMENTAL); rrddim_add(stbytes, "out", NULL, -8, 1024, RRDDIM_INCREMENTAL); diff --git a/src/plugin_tc.c b/src/plugin_tc.c index 5ed9140505..32c6dc1158 100755 --- a/src/plugin_tc.c +++ b/src/plugin_tc.c @@ -235,7 +235,7 @@ static void tc_device_commit(struct tc_device *d) if(!st) { debug(D_TC_LOOP, "TC: Creating new chart for device '%s'", d->name?d->name:d->id); - st = rrdset_create(RRD_TYPE_TC, d->id, d->name?d->name:d->id, d->family?d->family:d->id, "Class Usage", "kilobits/s", 1000, rrd_update_every, RRDSET_TYPE_STACKED); + st = rrdset_create(RRD_TYPE_TC, d->id, d->name?d->name:d->id, d->family?d->family:d->id, RRD_TYPE_TC ".qos", "Class Usage", "kilobits/s", 7000, rrd_update_every, RRDSET_TYPE_STACKED); for(c = d->classes ; c ; c = c->next) { if(!c->updated) continue; @@ -626,7 +626,7 @@ void *tc_main(void *ptr) if(!stcpu) stcpu = rrdset_find("netdata.plugin_tc_cpu"); if(!stcpu) { - stcpu = rrdset_create("netdata", "plugin_tc_cpu", NULL, "netdata", "NetData TC CPU usage", "milliseconds/s", 10000, rrd_update_every, RRDSET_TYPE_STACKED); + stcpu = rrdset_create("netdata", "plugin_tc_cpu", NULL, "tc.helper", NULL, "NetData TC CPU usage", "milliseconds/s", 135000, rrd_update_every, RRDSET_TYPE_STACKED); rrddim_add(stcpu, "user", NULL, 1, 1000, RRDDIM_INCREMENTAL); rrddim_add(stcpu, "system", NULL, 1, 1000, RRDDIM_INCREMENTAL); } @@ -638,7 +638,7 @@ void *tc_main(void *ptr) if(!sttime) stcpu = rrdset_find("netdata.plugin_tc_time"); if(!sttime) { - sttime = rrdset_create("netdata", "plugin_tc_time", NULL, "netdata", "NetData TC script execution", "milliseconds/run", 10001, rrd_update_every, RRDSET_TYPE_AREA); + sttime = rrdset_create("netdata", "plugin_tc_time", NULL, "tc.helper", NULL, "NetData TC script execution", "milliseconds/run", 135001, rrd_update_every, RRDSET_TYPE_AREA); rrddim_add(sttime, "run_time", "run time", 1, 1, RRDDIM_ABSOLUTE); } else rrdset_next(sttime); diff --git a/src/plugins_d.c b/src/plugins_d.c index b4cb57888d..eb8f141b89 100755 --- a/src/plugins_d.c +++ b/src/plugins_d.c @@ -244,7 +244,7 @@ void *pluginsd_worker_thread(void *arg) char *title = words[3]; char *units = words[4]; char *family = words[5]; - char *category = words[6]; + char *context = words[6]; char *chart = words[7]; char *priority_s = words[8]; char *update_every_s = words[9]; @@ -267,25 +267,23 @@ void *pluginsd_worker_thread(void *arg) if(unlikely(chart)) chart_type = rrdset_type_id(chart); if(unlikely(noname || !name || !*name || strcasecmp(name, "NULL") == 0 || strcasecmp(name, "(NULL)") == 0)) name = NULL; - if(unlikely(!family || !*family)) family = id; - if(unlikely(!category || !*category)) category = type; + if(unlikely(!family || !*family)) family = NULL; + if(unlikely(!context || !*context)) context = NULL; st = rrdset_find_bytype(type, id); if(unlikely(!st)) { - debug(D_PLUGINSD, "PLUGINSD: Creating chart type='%s', id='%s', name='%s', family='%s', category='%s', chart='%s', priority=%d, update_every=%d" + debug(D_PLUGINSD, "PLUGINSD: Creating chart type='%s', id='%s', name='%s', family='%s', context='%s', chart='%s', priority=%d, update_every=%d" , type, id , name?name:"" , family?family:"" - , category?category:"" + , context?context:"" , rrdset_type_name(chart_type) , priority , update_every ); - st = rrdset_create(type, id, name, family, title, units, priority, update_every, chart_type); + st = rrdset_create(type, id, name, family, context, title, units, priority, update_every, chart_type); cd->update_every = update_every; - - if(unlikely(strcmp(category, "none") == 0)) st->isdetail = 1; } else debug(D_PLUGINSD, "PLUGINSD: Chart '%s' already exists. Not adding it again.", st->id); } diff --git a/src/proc_diskstats.c b/src/proc_diskstats.c index 5a61e9f09c..f404118fa8 100755 --- a/src/proc_diskstats.c +++ b/src/proc_diskstats.c @@ -299,7 +299,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { } else error("Cannot read sector size for device %s from %s. Assuming 512.", disk, ssfilename); - st = rrdset_create(RRD_TYPE_DISK, disk, NULL, disk, "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA); + st = rrdset_create(RRD_TYPE_DISK, disk, NULL, disk, "disk.io", "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA); rrddim_add(st, "reads", NULL, sector_size, 1024, RRDDIM_INCREMENTAL); rrddim_add(st, "writes", NULL, sector_size * -1, 1024, RRDDIM_INCREMENTAL); @@ -316,7 +316,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_ops) { st = rrdset_find_bytype("disk_ops", disk); if(!st) { - st = rrdset_create("disk_ops", disk, NULL, disk, "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_ops", disk, NULL, disk, "disk.ops", "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL); @@ -334,7 +334,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_qops) { st = rrdset_find_bytype("disk_qops", disk); if(!st) { - st = rrdset_create("disk_qops", disk, NULL, disk, "Disk Current I/O Operations", "operations", 2002, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_qops", disk, NULL, disk, "disk.qops", "Disk Current I/O Operations", "operations", 2002, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "operations", NULL, 1, 1, RRDDIM_ABSOLUTE); @@ -350,7 +350,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_backlog) { st = rrdset_find_bytype("disk_backlog", disk); if(!st) { - st = rrdset_create("disk_backlog", disk, NULL, disk, "Disk Backlog", "backlog (ms)", 2003, update_every, RRDSET_TYPE_AREA); + st = rrdset_create("disk_backlog", disk, NULL, disk, "disk.backlog", "Disk Backlog", "backlog (ms)", 2003, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; rrddim_add(st, "backlog", NULL, 1, 10, RRDDIM_INCREMENTAL); @@ -366,7 +366,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_util) { st = rrdset_find_bytype("disk_util", disk); if(!st) { - st = rrdset_create("disk_util", disk, NULL, disk, "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA); + st = rrdset_create("disk_util", disk, NULL, disk, "disk.util", "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; rrddim_add(st, "utilization", NULL, 1, 10, RRDDIM_INCREMENTAL); @@ -382,7 +382,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_mops) { st = rrdset_find_bytype("disk_mops", disk); if(!st) { - st = rrdset_create("disk_mops", disk, NULL, disk, "Disk Merged Operations", "merged operations/s", 2021, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_mops", disk, NULL, disk, "disk.mops", "Disk Merged Operations", "merged operations/s", 2021, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL); @@ -400,7 +400,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_iotime) { st = rrdset_find_bytype("disk_iotime", disk); if(!st) { - st = rrdset_create("disk_iotime", disk, NULL, disk, "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_iotime", disk, NULL, disk, "disk.iotime", "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL); @@ -421,7 +421,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_iotime && ddo_ops) { st = rrdset_find_bytype("disk_await", disk); if(!st) { - st = rrdset_create("disk_await", disk, NULL, disk, "Average Completed I/O Operation Time", "ms per operation", 2005, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_await", disk, NULL, disk, "disk.await", "Average Completed I/O Operation Time", "ms per operation", 2005, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_ABSOLUTE); @@ -437,7 +437,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_io && ddo_ops) { st = rrdset_find_bytype("disk_avgsz", disk); if(!st) { - st = rrdset_create("disk_avgsz", disk, NULL, disk, "Average Completed I/O Operation Bandwidth", "kilobytes per operation", 2006, update_every, RRDSET_TYPE_AREA); + st = rrdset_create("disk_avgsz", disk, NULL, disk, "disk.avgsz", "Average Completed I/O Operation Bandwidth", "kilobytes per operation", 2006, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; rrddim_add(st, "reads", NULL, sector_size, 1024, RRDDIM_ABSOLUTE); @@ -453,7 +453,7 @@ int do_proc_diskstats(int update_every, unsigned long long dt) { if(ddo_util && ddo_ops) { st = rrdset_find_bytype("disk_svctm", disk); if(!st) { - st = rrdset_create("disk_svctm", disk, NULL, disk, "Average Service Time", "ms per operation", 2007, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("disk_svctm", disk, NULL, disk, "disk.svctm", "Average Service Time", "ms per operation", 2007, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "svctm", NULL, 1, 1, RRDDIM_ABSOLUTE); diff --git a/src/proc_interrupts.c b/src/proc_interrupts.c index e955b80eea..25482dfa7e 100755 --- a/src/proc_interrupts.c +++ b/src/proc_interrupts.c @@ -116,7 +116,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) { st = rrdset_find_bytype("system", "interrupts"); if(!st) { - st = rrdset_create("system", "interrupts", NULL, "system", "System interrupts", "interrupts/s", 1000, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("system", "interrupts", NULL, "interrupts", NULL, "System interrupts", "interrupts/s", 1000, update_every, RRDSET_TYPE_STACKED); for(l = 0; l < lines ;l++) { if(!irrs[l].used) continue; @@ -135,9 +135,6 @@ int do_proc_interrupts(int update_every, unsigned long long dt) { int c; for(c = 0; c < cpus ; c++) { - char family[256]; - snprintf(family, 256, "cpu%d", c); - char id[256]; snprintf(id, 256, "cpu%d_interrupts", c); @@ -146,7 +143,7 @@ int do_proc_interrupts(int update_every, unsigned long long dt) { char name[256], title[256]; snprintf(name, 256, "cpu%d_interrupts", c); snprintf(title, 256, "CPU%d Interrupts", c); - st = rrdset_create("cpu", id, name, family, title, "interrupts/s", 2000 + c, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("cpu", id, name, "interrupts", "cpu.interrupts", title, "interrupts/s", 2000 + c, update_every, RRDSET_TYPE_STACKED); for(l = 0; l < lines ;l++) { if(!irrs[l].used) continue; diff --git a/src/proc_meminfo.c b/src/proc_meminfo.c index a109e2365f..dbd43369fd 100755 --- a/src/proc_meminfo.c +++ b/src/proc_meminfo.c @@ -22,7 +22,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_ram == -1) do_ram = config_get_boolean("plugin:proc:/proc/meminfo", "system ram", 1); if(do_swap == -1) do_swap = config_get_boolean("plugin:proc:/proc/meminfo", "system swap", 1); - if(do_hwcorrupt == -1) do_hwcorrupt = config_get_boolean("plugin:proc:/proc/meminfo", "hardware corrupted ECC", 1); + if(do_hwcorrupt == -1) do_hwcorrupt = config_get_boolean_ondemand("plugin:proc:/proc/meminfo", "hardware corrupted ECC", CONFIG_ONDEMAND_ONDEMAND); if(do_committed == -1) do_committed = config_get_boolean("plugin:proc:/proc/meminfo", "committed memory", 1); if(do_writeback == -1) do_writeback = config_get_boolean("plugin:proc:/proc/meminfo", "writeback memory", 1); if(do_kernel == -1) do_kernel = config_get_boolean("plugin:proc:/proc/meminfo", "kernel memory", 1); @@ -115,7 +115,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_ram) { st = rrdset_find("system.ram"); if(!st) { - st = rrdset_create("system", "ram", NULL, "mem", "System RAM", "MB", 200, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("system", "ram", NULL, "ram", NULL, "System RAM", "MB", 200, update_every, RRDSET_TYPE_STACKED); rrddim_add(st, "buffers", NULL, 1, 1024, RRDDIM_ABSOLUTE); rrddim_add(st, "used", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -138,7 +138,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_swap) { st = rrdset_find("system.swap"); if(!st) { - st = rrdset_create("system", "swap", NULL, "mem", "System Swap", "MB", 201, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("system", "swap", NULL, "swap", NULL, "System Swap", "MB", 201, update_every, RRDSET_TYPE_STACKED); st->isdetail = 1; rrddim_add(st, "free", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -153,10 +153,12 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { // -------------------------------------------------------------------- - if(hwcorrupted && do_hwcorrupt) { + if(hwcorrupted && do_hwcorrupt && HardwareCorrupted > 0) { + do_hwcorrupt = CONFIG_ONDEMAND_YES; + st = rrdset_find("mem.hwcorrupt"); if(!st) { - st = rrdset_create("mem", "hwcorrupt", NULL, "mem", "Hardware Corrupted ECC", "MB", 9000, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("mem", "hwcorrupt", NULL, "errors", NULL, "Hardware Corrupted ECC", "MB", 9000, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "HardwareCorrupted", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -172,7 +174,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_committed) { st = rrdset_find("mem.committed"); if(!st) { - st = rrdset_create("mem", "committed", NULL, "mem", "Committed (Allocated) Memory", "MB", 5000, update_every, RRDSET_TYPE_AREA); + st = rrdset_create("mem", "committed", NULL, "system", NULL, "Committed (Allocated) Memory", "MB", 5000, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; rrddim_add(st, "Committed_AS", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -188,7 +190,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_writeback) { st = rrdset_find("mem.writeback"); if(!st) { - st = rrdset_create("mem", "writeback", NULL, "mem", "Writeback Memory", "MB", 4000, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("mem", "writeback", NULL, "kernel", NULL, "Writeback Memory", "MB", 4000, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "Dirty", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -212,7 +214,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_kernel) { st = rrdset_find("mem.kernel"); if(!st) { - st = rrdset_create("mem", "kernel", NULL, "mem", "Memory Used by Kernel", "MB", 6000, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("mem", "kernel", NULL, "kernel", NULL, "Memory Used by Kernel", "MB", 6000, update_every, RRDSET_TYPE_STACKED); st->isdetail = 1; rrddim_add(st, "Slab", NULL, 1, 1024, RRDDIM_ABSOLUTE); @@ -234,7 +236,7 @@ int do_proc_meminfo(int update_every, unsigned long long dt) { if(do_slab) { st = rrdset_find("mem.slab"); if(!st) { - st = rrdset_create("mem", "slab", NULL, "mem", "Reclaimable Kernel Memory", "MB", 6500, update_every, RRDSET_TYPE_STACKED); + st = rrdset_create("mem", "slab", NULL, "slab", NULL, "Reclaimable Kernel Memory", "MB", 6500, update_every, RRDSET_TYPE_STACKED); st->isdetail = 1; rrddim_add(st, "reclaimable", NULL, 1, 1024, RRDDIM_ABSOLUTE); diff --git a/src/proc_net_dev.c b/src/proc_net_dev.c index ac52ceeb0d..5070ab8175 100755 --- a/src/proc_net_dev.c +++ b/src/proc_net_dev.c @@ -118,7 +118,7 @@ int do_proc_net_dev(int update_every, unsigned long long dt) { if(ddo_bandwidth) { st = rrdset_find_bytype("net", iface); if(!st) { - st = rrdset_create("net", iface, NULL, iface, "Bandwidth", "kilobits/s", 1000, update_every, RRDSET_TYPE_AREA); + st = rrdset_create("net", iface, NULL, iface, "net.net", "Bandwidth", "kilobits/s", 7000, update_every, RRDSET_TYPE_AREA); rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL); rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL); @@ -135,7 +135,7 @@ int do_proc_net_dev(int update_every, unsigned long long dt) { if(ddo_packets) { st = rrdset_find_bytype("net_packets", iface); if(!st) { - st = rrdset_create("net_packets", iface, NULL, iface, "Packets", "packets/s", 1001, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("net_packets", iface, NULL, iface, "net.packets", "Packets", "packets/s", 7001, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL); @@ -155,7 +155,7 @@ int do_proc_net_dev(int update_every, unsigned long long dt) { if(ddo_errors) { st = rrdset_find_bytype("net_errors", iface); if(!st) { - st = rrdset_create("net_errors", iface, NULL, iface, "Interface Errors", "errors/s", 1002, update_every, RRDSET_TYPE_LINE); + st = rrdset_create("net_errors", iface, NULL, iface, "net.errors", "Interface Errors", "errors/s", 7002, update_every, RRDSET_TYPE_LINE); |