disabled checks charts by default; set isdetail=1 to nfsd.rpc nfsd.net nfsd.filehandles
Costa Tsaousis (ktsaou) committed
Mar 18, 2015 at 19:51 UTC
671427b533473af742e8295b551c8b3b6ee5f97e
2 files changed
+14
-10
src/main.c
+11
-10
@@ -34,18 +34,20 @@ struct netdata_static_thread {
34
char *config_section;
35
char *config_name;
36
37
+ int enabled;
38
+
39
pthread_t *thread;
40
void *(*start_routine) (void *);
41
};
42
43
struct netdata_static_thread static_threads[] = {
42
- {"tc", "plugins", "tc", NULL, tc_main},
43
- {"idlejitter", "plugins", "idlejitter", NULL, cpuidlejitter_main},
44
- {"proc", "plugins", "proc", NULL, proc_main},
45
- {"plugins.d", NULL, NULL, NULL, pluginsd_main},
46
- {"check", "plugins", "checks", NULL, checks_main},
47
- {"web", NULL, NULL, NULL, socket_listen_main},
48
- {NULL, NULL, NULL, NULL, NULL}
44
+ {"tc", "plugins", "tc", 1, NULL, tc_main},
45
+ {"idlejitter", "plugins", "idlejitter", 1, NULL, cpuidlejitter_main},
46
+ {"proc", "plugins", "proc", 1, NULL, proc_main},
47
+ {"plugins.d", NULL, NULL, 1, NULL, pluginsd_main},
48
+ {"check", "plugins", "checks", 0, NULL, checks_main},
49
+ {"web", NULL, NULL, 1, NULL, socket_listen_main},
50
+ {NULL, NULL, NULL, 0, NULL, NULL}
51
};
52
53
void kill_childs()
@@ -282,11 +284,10 @@ int main(int argc, char **argv)
284
285
for (i = 0; static_threads[i].name != NULL ; i++) {
286
struct netdata_static_thread *st = &static_threads[i];
285
- int doit = 1;
287
287
- if(st->config_name) doit = config_get_boolean(st->config_section, st->config_name, doit);
288
+ if(st->config_name) st->enabled = config_get_boolean(st->config_section, st->config_name, st->enabled);
289
289
- if(doit) {
290
+ if(st->enabled) {
291
st->thread = malloc(sizeof(pthread_t));
292
293
if(pthread_create(st->thread, NULL, st->start_routine, NULL))
src/proc_net_rpc_nfsd.c
+3
@@ -422,6 +422,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
422
st = rrd_stats_find_bytype("nfsd", "filehandles");
423
if(!st) {
424
st = rrd_stats_create("nfsd", "filehandles", NULL, "nfsd", "File Handles", "handles/s", 5001, update_every, CHART_TYPE_LINE);
425
+ st->isdetail = 1;
426
427
rrd_stats_dimension_add(st, "stale", NULL, 1, update_every, RRD_DIMENSION_ABSOLUTE);
428
rrd_stats_dimension_add(st, "total_lookups", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL);
@@ -555,6 +556,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
556
st = rrd_stats_find_bytype("nfsd", "net");
557
if(!st) {
558
st = rrd_stats_create("nfsd", "net", NULL, "nfsd", "Network Reads", "reads/s", 5007, update_every, CHART_TYPE_STACKED);
559
+ st->isdetail = 1;
560
561
rrd_stats_dimension_add(st, "udp", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL);
562
rrd_stats_dimension_add(st, "tcp", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL);
@@ -576,6 +578,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) {
578
st = rrd_stats_find_bytype("nfsd", "rpc");
579
if(!st) {
580
st = rrd_stats_create("nfsd", "rpc", NULL, "nfsd", "Remote Procedure Calls", "calls/s", 5008, update_every, CHART_TYPE_LINE);
581
+ st->isdetail = 1;
582
583
rrd_stats_dimension_add(st, "all", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL);
584
rrd_stats_dimension_add(st, "bad_format", NULL, -1, update_every, RRD_DIMENSION_INCREMENTAL);