@cryptotaxi247 / netdata-1 / commits / 42b8b5dd7

apps.plugin memory excludes shared memory. apps.plugin now reports I/O per application group

Costa Tsaousis (ktsaou) committed May 10, 2014 at 00:07 UTC 42b8b5dd75ac30a062489a53525398b67c0ae675
4 files changed +288 -32
Makefile
+5 -3
@@ -14,13 +14,15 @@ plugins: plugins.d/apps.plugin
14
15 plugins.d/apps.plugin: apps_plugin.c
16 $(CC) $(CFLAGS) -o plugins.d/apps.plugin apps_plugin.c
17 + @echo
18 + @echo "apps.plugin requires root access to access files in /proc"
19 + @echo "Please authorize it."
20 + sudo chown root plugins.d/apps.plugin
21 + sudo chmod 4775 plugins.d/apps.plugin
22
23 clean:
24 rm -f *.o netdata plugins.d/apps.plugin core
25
21 -install: plugins
22 - cp apps.plugin plugins.d/
23 -
26 getconf:
27 mv conf.d/netdata.conf conf.d/netdata.conf.old
28 wget -O conf.d/netdata.conf "http://localhost:19999/netdata.conf"
apps_plugin.c
+266 -22
@@ -56,6 +56,30 @@ struct wanted {
56 unsigned long long fix_cutime;
57 unsigned long long fix_cstime;
58
59 + unsigned long long statm_size;
60 + unsigned long long statm_resident;
61 + unsigned long long statm_share;
62 + unsigned long long statm_text;
63 + unsigned long long statm_lib;
64 + unsigned long long statm_data;
65 + unsigned long long statm_dirty;
66 +
67 + unsigned long long io_logical_bytes_read;
68 + unsigned long long io_logical_bytes_written;
69 + unsigned long long io_read_calls;
70 + unsigned long long io_write_calls;
71 + unsigned long long io_storage_bytes_read;
72 + unsigned long long io_storage_bytes_written;
73 + unsigned long long io_cancelled_write_bytes;
74 +
75 + unsigned long long fix_io_logical_bytes_read;
76 + unsigned long long fix_io_logical_bytes_written;
77 + unsigned long long fix_io_read_calls;
78 + unsigned long long fix_io_write_calls;
79 + unsigned long long fix_io_storage_bytes_read;
80 + unsigned long long fix_io_storage_bytes_written;
81 + unsigned long long fix_io_cancelled_write_bytes;
82 +
83 unsigned long processes; // how many processes have been merged to this
84 int exposed; // if set, we have sent this to netdata
85
@@ -64,6 +88,7 @@ struct wanted {
88 } *wanted_root = NULL, *default_target = NULL;
89
90 int update_every = 1;
91 +unsigned long long file_counter = 0;
92
93 struct wanted *get_wanted(const char *id, struct wanted *target)
94 {
@@ -176,6 +201,22 @@ struct pid_stat {
201 uint64_t guest_time;
202 int64_t cguest_time;
203
204 + unsigned long long statm_size;
205 + unsigned long long statm_resident;
206 + unsigned long long statm_share;
207 + unsigned long long statm_text;
208 + unsigned long long statm_lib;
209 + unsigned long long statm_data;
210 + unsigned long long statm_dirty;
211 +
212 + unsigned long long io_logical_bytes_read;
213 + unsigned long long io_logical_bytes_written;
214 + unsigned long long io_read_calls;
215 + unsigned long long io_write_calls;
216 + unsigned long long io_storage_bytes_read;
217 + unsigned long long io_storage_bytes_written;
218 + unsigned long long io_cancelled_write_bytes;
219 +
220 /* unsigned long long old_utime;
221 unsigned long long old_stime;
222 unsigned long long old_minflt;
@@ -209,7 +250,7 @@ struct pid_stat {
250
251 struct pid_stat **all_pids;
252
212 -#define PID_STAT_LINE_MAX 4096
253 +#define PROC_BUFFER 4096
254
255 struct pid_stat *get_entry(pid_t pid)
256 {
@@ -249,8 +290,10 @@ void del_entry(pid_t pid)
290
291 int update_from_proc(void)
292 {
252 - char buffer[PID_STAT_LINE_MAX + 1];
253 - char name[PID_STAT_LINE_MAX + 1];
293 + static long count_open_errors = 0;
294 +
295 + char buffer[PROC_BUFFER + 1];
296 + char name[PROC_BUFFER + 1];
297 char filename[FILENAME_MAX+1];
298 DIR *dir = opendir("/proc");
299 if(!dir) return 0;
@@ -272,25 +315,32 @@ int update_from_proc(void)
315 pid_t pid = strtoul(file->d_name, &endptr, 10);
316 if(pid <= 0 || pid > pid_max || endptr == file->d_name || *endptr != '\0') continue;
317
275 - snprintf(filename, FILENAME_MAX, "/proc/%s/stat", file->d_name);
318
319 + // --------------------------------------------------------------------
320 + // /proc/<pid>/stat
321 +
322 + snprintf(filename, FILENAME_MAX, "/proc/%s/stat", file->d_name);
323 int fd = open(filename, O_RDONLY);
324 if(fd == -1) {
279 - if(errno != ENOENT && errno != ESRCH) fprintf(stderr, "Cannot open file '%s' for reading (%d, %s).\n", filename, errno, strerror(errno));
325 + if(errno != ENOENT && errno != ESRCH) {
326 + if(!count_open_errors) fprintf(stderr, "Cannot open file '%s' for reading (%d, %s).\n", filename, errno, strerror(errno));
327 + count_open_errors++;
328 + }
329 continue;
330 }
331 + file_counter++;
332 +
333 + int bytes = read(fd, buffer, PROC_BUFFER);
334 + close(fd);
335
283 - int bytes = read(fd, buffer, PID_STAT_LINE_MAX);
336 if(bytes == -1) {
337 fprintf(stderr, "Cannot read from file '%s' (%s).\n", filename, strerror(errno));
286 - close(fd);
338 continue;
339 }
340
290 - close(fd);
291 - if(bytes < 100) continue;
341 + if(bytes < 10) continue;
342 buffer[bytes] = '\0';
293 - if(debug) fprintf(stderr, "READ: %s", buffer);
343 + if(debug) fprintf(stderr, "READ stat: %s", buffer);
344
345 p = get_entry(pid);
346 if(!p) continue;
@@ -357,9 +407,95 @@ int update_from_proc(void)
407 // just a few checks
408 if(p->ppid < 0 || p->ppid > pid_max) p->ppid = 0;
409
410 +
411 + // --------------------------------------------------------------------
412 + // /proc/<pid>/statm
413 +
414 + snprintf(filename, FILENAME_MAX, "/proc/%s/statm", file->d_name);
415 + fd = open(filename, O_RDONLY);
416 + if(fd == -1) {
417 + if(errno != ENOENT && errno != ESRCH) {
418 + if(!count_open_errors) fprintf(stderr, "Cannot open file '%s' for reading (%d, %s).\n", filename, errno, strerror(errno));
419 + count_open_errors++;
420 + }
421 + }
422 + else {
423 + file_counter++;
424 + bytes = read(fd, buffer, PROC_BUFFER);
425 + close(fd);
426 +
427 + if(bytes == -1) {
428 + fprintf(stderr, "Cannot read from file '%s' (%s).\n", filename, strerror(errno));
429 + }
430 + else if(bytes > 10) {
431 + buffer[bytes] = '\0';
432 + if(debug) fprintf(stderr, "READ statm: %s", buffer);
433 +
434 + parsed = sscanf(buffer,
435 + "%llu %llu %llu %llu %llu %llu %llu"
436 + , &p->statm_size
437 + , &p->statm_resident
438 + , &p->statm_share
439 + , &p->statm_text
440 + , &p->statm_lib
441 + , &p->statm_data
442 + , &p->statm_dirty
443 + );
444 +
445 + if(parsed < 7) fprintf(stderr, "file %s gave %d results (expected 7)\n", filename, parsed);
446 + }
447 + }
448 +
449 + // --------------------------------------------------------------------
450 + // /proc/<pid>/io
451 +
452 + snprintf(filename, FILENAME_MAX, "/proc/%s/io", file->d_name);
453 + fd = open(filename, O_RDONLY);
454 + if(fd == -1) {
455 + if(errno != ENOENT && errno != ESRCH) {
456 + if(!count_open_errors) fprintf(stderr, "Cannot open file '%s' for reading (%d, %s).\n", filename, errno, strerror(errno));
457 + count_open_errors++;
458 + }
459 + }
460 + else {
461 + file_counter++;
462 + bytes = read(fd, buffer, PROC_BUFFER);
463 + close(fd);
464 +
465 + if(bytes == -1) {
466 + fprintf(stderr, "Cannot read from file '%s' (%s).\n", filename, strerror(errno));
467 + }
468 + else if(bytes > 10) {
469 + buffer[bytes] = '\0';
470 + if(debug) fprintf(stderr, "READ io: %s", buffer);
471 +
472 + parsed = sscanf(buffer,
473 + "rchar: %llu\nwchar: %llu\nsyscr: %llu\nsyscw: %llu\nread_bytes: %llu\nwrite_bytes: %llu\ncancelled_write_bytes: %llu"
474 + , &p->io_logical_bytes_read
475 + , &p->io_logical_bytes_written
476 + , &p->io_read_calls
477 + , &p->io_write_calls
478 + , &p->io_storage_bytes_read
479 + , &p->io_storage_bytes_written
480 + , &p->io_cancelled_write_bytes
481 + );
482 +
483 + if(parsed < 7) fprintf(stderr, "file %s gave %d results (expected 7)\n", filename, parsed);
484 + }
485 + }
486 +
487 +
488 + // --------------------------------------------------------------------
489 + // done!
490 +
491 // mark it as updated
492 p->updated = 1;
493 }
494 + if(count_open_errors > 1 && count_open_errors > 1000) {
495 + fprintf(stderr, "file open errors repeated %ld times\n", count_open_errors - 1);
496 + count_open_errors = 0;
497 + }
498 +
499 closedir(dir);
500
501 return 1;
@@ -540,6 +676,22 @@ void update_statistics(void)
676 w->num_threads = 0;
677 w->rss = 0;
678 w->processes = 0;
679 +
680 + w->statm_size = 0;
681 + w->statm_resident = 0;
682 + w->statm_share = 0;
683 + w->statm_text = 0;
684 + w->statm_lib = 0;
685 + w->statm_data = 0;
686 + w->statm_dirty = 0;
687 +
688 + w->io_logical_bytes_read = 0;
689 + w->io_logical_bytes_written = 0;
690 + w->io_read_calls = 0;
691 + w->io_write_calls = 0;
692 + w->io_storage_bytes_read = 0;
693 + w->io_storage_bytes_written = 0;
694 + w->io_cancelled_write_bytes = 0;
695 }
696
697 /* walk_down(0, 1);
@@ -565,6 +717,22 @@ void update_statistics(void)
717 p->target->num_threads += p->num_threads;
718 p->target->rss += p->rss;
719
720 + p->target->statm_size += p->statm_size;
721 + p->target->statm_resident += p->statm_resident;
722 + p->target->statm_share += p->statm_share;
723 + p->target->statm_text += p->statm_text;
724 + p->target->statm_lib += p->statm_lib;
725 + p->target->statm_data += p->statm_data;
726 + p->target->statm_dirty += p->statm_dirty;
727 +
728 + p->target->io_logical_bytes_read += p->io_logical_bytes_read;
729 + p->target->io_logical_bytes_written += p->io_logical_bytes_written;
730 + p->target->io_read_calls += p->io_read_calls;
731 + p->target->io_write_calls += p->io_write_calls;
732 + p->target->io_storage_bytes_read += p->io_storage_bytes_read;
733 + p->target->io_storage_bytes_written += p->io_storage_bytes_written;
734 + p->target->io_cancelled_write_bytes += p->io_cancelled_write_bytes;
735 +
736 p->target->processes++;
737
738 if(debug) fprintf(stderr, "\tAgregating %s pid %d on %s utime=%llu, stime=%llu, cutime=%llu, cstime=%llu, minflt=%llu, majflt=%llu, cminflt=%llu, cmajflt=%llu\n", p->comm, p->pid, p->target->name, p->utime, p->stime, p->cutime, p->cstime, p->minflt, p->majflt, p->cminflt, p->cmajflt);
@@ -602,6 +770,14 @@ void update_statistics(void)
770 p->target->fix_cmajflt += p->cmajflt;
771 p->target->fix_cutime += p->cutime;
772 p->target->fix_cstime += p->cstime;
773 +
774 + p->target->fix_io_logical_bytes_read += p->io_logical_bytes_read;
775 + p->target->fix_io_logical_bytes_written += p->io_logical_bytes_written;
776 + p->target->fix_io_read_calls += p->io_read_calls;
777 + p->target->fix_io_write_calls += p->io_write_calls;
778 + p->target->fix_io_storage_bytes_read += p->io_storage_bytes_read;
779 + p->target->fix_io_storage_bytes_written += p->io_storage_bytes_written;
780 + p->target->fix_io_cancelled_write_bytes += p->io_cancelled_write_bytes;
781 }
782 }
783
@@ -666,11 +842,11 @@ void show_dimensions(void)
842 }
843 fprintf(stdout, "END\n");
844
669 - fprintf(stdout, "BEGIN apps.rss\n");
845 + fprintf(stdout, "BEGIN apps.mem\n");
846 for (w = wanted_root; w ; w = w->next) {
847 if(w->target || (!w->processes && !w->exposed)) continue;
848
673 - fprintf(stdout, "SET %s = %llu\n", w->name, (unsigned long long)w->rss);
849 + fprintf(stdout, "SET %s = %lld\n", w->name, (long long)w->statm_resident - (long long)w->statm_share);
850 }
851 fprintf(stdout, "END\n");
852
@@ -690,7 +866,21 @@ void show_dimensions(void)
866 }
867 fprintf(stdout, "END\n");
868
693 - fflush(NULL);
869 + fprintf(stdout, "BEGIN apps.reads\n");
870 + for (w = wanted_root; w ; w = w->next) {
871 + if(w->target || (!w->processes && !w->exposed)) continue;
872 +
873 + fprintf(stdout, "SET %s = %llu\n", w->name, w->io_logical_bytes_read);
874 + }
875 + fprintf(stdout, "END\n");
876 +
877 + fprintf(stdout, "BEGIN apps.writes\n");
878 + for (w = wanted_root; w ; w = w->next) {
879 + if(w->target || (!w->processes && !w->exposed)) continue;
880 +
881 + fprintf(stdout, "SET %s = %llu\n", w->name, w->io_logical_bytes_written);
882 + }
883 + fprintf(stdout, "END\n");
884 }
885
886 void show_charts(void)
@@ -710,14 +900,14 @@ void show_charts(void)
900
901 // we have something new to show
902 // update the charts
713 - fprintf(stdout, "CHART apps.cpu '' 'Apps CPU Time (100%% = %ld core%s)' 'cpu time %%' apps apps stacked 20001 %d\n", processors, (processors>1)?"s":"", update_every);
903 + 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);
904 for (w = wanted_root; w ; w = w->next) {
905 if(w->target || (!w->processes && !w->exposed)) continue;
906
717 - fprintf(stdout, "DIMENSION %s '' incremental 100 %llu\n", w->name, Hertz * processors);
907 + fprintf(stdout, "DIMENSION %s '' incremental 100 %llu\n", w->name, Hertz);
908 }
909
720 - fprintf(stdout, "CHART apps.rss '' 'Apps Memory' 'MB' apps apps stacked 20002 %d\n", update_every);
910 + fprintf(stdout, "CHART apps.mem '' 'Apps Dedicated Memory (w/o shared)' 'MB' apps apps stacked 20003 %d\n", update_every);
911 for (w = wanted_root; w ; w = w->next) {
912 if(w->target || (!w->processes && !w->exposed)) continue;
913
@@ -738,14 +928,14 @@ void show_charts(void)
928 fprintf(stdout, "DIMENSION %s '' absolute 1 1\n", w->name);
929 }
930
741 - fprintf(stdout, "CHART apps.cpu_user '' 'Apps CPU User Time (100%% = %ld core%s)' 'cpu time %%' apps none stacked 20020 %d\n", processors, (processors>1)?"s":"", update_every);
931 + 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);
932 for (w = wanted_root; w ; w = w->next) {
933 if(w->target || (!w->processes && !w->exposed)) continue;
934
935 fprintf(stdout, "DIMENSION %s '' incremental 100 %llu\n", w->name, Hertz * processors);
936 }
937
748 - fprintf(stdout, "CHART apps.cpu_system '' 'Apps CPU System Time (100%% = %ld core%s)' 'cpu time %%' apps none stacked 20021 %d\n", processors, (processors>1)?"s":"", update_every);
938 + 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);
939 for (w = wanted_root; w ; w = w->next) {
940 if(w->target || (!w->processes && !w->exposed)) continue;
941
@@ -766,7 +956,19 @@ void show_charts(void)
956 fprintf(stdout, "DIMENSION %s '' incremental 1 1\n", w->name);
957 }
958
769 - fflush(NULL);
959 + fprintf(stdout, "CHART apps.reads '' 'Apps Logical Reads' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
960 + for (w = wanted_root; w ; w = w->next) {
961 + if(w->target || (!w->processes && !w->exposed)) continue;
962 +
963 + fprintf(stdout, "DIMENSION %s '' incremental 1 1024\n", w->name);
964 + }
965 +
966 + fprintf(stdout, "CHART apps.writes '' 'Apps Logical Writes' 'kilobytes/s' apps apps stacked 20002 %d\n", update_every);
967 + for (w = wanted_root; w ; w = w->next) {
968 + if(w->target || (!w->processes && !w->exposed)) continue;
969 +
970 + fprintf(stdout, "DIMENSION %s '' incremental 1 1024\n", w->name);
971 + }
972 }
973
974 unsigned long long get_hertz(void)
@@ -809,7 +1011,17 @@ long get_processors(void)
1011
1012 long get_pid_max(void)
1013 {
812 - return 32768L;
1014 + char buffer[1025], *s;
1015 + long mpid = 32768;
1016 +
1017 + FILE *fp = fopen("/proc/sys/kernel/pid_max", "r");
1018 + if(!fp) return 1;
1019 +
1020 + s = fgets(buffer, 1024, fp);
1021 + if(s) mpid = atol(buffer);
1022 + fclose(fp);
1023 + if(mpid < 32768) mpid = 32768;
1024 + return mpid;
1025 }
1026
1027 unsigned long long usecdiff(struct timeval *now, struct timeval *last) {
@@ -831,10 +1043,13 @@ int main(int argc, char **argv)
1043 exit(1);
1044 }
1045
1046 + int created_usage_chart = 0;
1047 + struct rusage me, me_last;
1048 unsigned long long counter = 1;
1049 unsigned long long usec = 0, susec = 0;
1050 struct timeval last, now;
1051 gettimeofday(&last, NULL);
1052 + getrusage(RUSAGE_SELF, &me_last);
1053
1054 for(;1; counter++) {
1055 if(!update_from_proc()) {
@@ -847,6 +1062,32 @@ int main(int argc, char **argv)
1062 show_charts(); // this is smart enough to show only newly added apps, when needed
1063 show_dimensions();
1064
1065 + if(getrusage(RUSAGE_SELF, &me) == 0) {
1066 + unsigned long long cpuuser = me.ru_utime.tv_sec * 1000000ULL + me.ru_utime.tv_usec;
1067 + unsigned long long cpusyst = me.ru_stime.tv_sec * 1000000ULL + me.ru_stime.tv_usec;
1068 +
1069 + if(!created_usage_chart) {
1070 + created_usage_chart = 1;
1071 + fprintf(stdout, "CHART netdata.apps_cpu '' 'Apps Plugin CPU' 'milliseconds/s' netdata netdata stacked 10000 %d\n", update_every);
1072 + fprintf(stdout, "DIMENSION user '' incremental 1 1000\n");
1073 + fprintf(stdout, "DIMENSION system '' incremental 1 1000\n");
1074 +
1075 + fprintf(stdout, "CHART netdata.apps_files '' 'Apps Plugin Files' 'files/s' netdata netdata line 10001 %d\n", update_every);
1076 + fprintf(stdout, "DIMENSION files '' incremental 1 1\n");
1077 + }
1078 +
1079 + fprintf(stdout, "BEGIN netdata.apps_cpu\n");
1080 + fprintf(stdout, "SET user = %llu\n", cpuuser);
1081 + fprintf(stdout, "SET system = %llu\n", cpusyst);
1082 + fprintf(stdout, "END\n");
1083 +
1084 + fprintf(stdout, "BEGIN netdata.apps_files\n");
1085 + fprintf(stdout, "SET files = %llu\n", file_counter);
1086 + fprintf(stdout, "END\n");
1087 +
1088 + bcopy(&me, &me_last, sizeof(struct rusage));
1089 + }
1090 +
1091 if(debug) fprintf(stderr, "Done Loop No %llu\n", counter);
1092 // if(counter == 1000) exit(0);
1093
@@ -855,9 +1096,12 @@ int main(int argc, char **argv)
1096 usec = usecdiff(&now, &last) - susec;
1097 if(debug) fprintf(stderr, "last loop took %llu usec (worked for %llu, sleeped for %llu).\n", usec + susec, usec, susec);
1098
858 - if(usec < (update_every * 1000000ULL)) susec = (update_every * 1000000ULL) - usec;
859 - else susec = 0;
1099 + // if the last loop took less than half the time
1100 + // wait the rest of the time
1101 + if(usec < (update_every * 1000000ULL / 2)) susec = (update_every * 1000000ULL) - usec;
1102 + else susec = update_every * 1000000ULL / 2;
1103
1104 + fflush(NULL);
1105 usleep(susec);
1106
1107 bcopy(&now, &last, sizeof(struct timeval));
netdata.c
+8 -5
@@ -5256,7 +5256,7 @@ void *proc_main(void *ptr)
5256
5257 if(!stcpu) stcpu = rrd_stats_find("cpu.netdata");
5258 if(!stcpu) {
5259 - stcpu = rrd_stats_create("cpu", "netdata", NULL, "cpu", "NetData CPU usage", "milliseconds/s", 9999, update_every, CHART_TYPE_STACKED);
5259 + stcpu = rrd_stats_create("netdata", "server_cpu", NULL, "netdata", "NetData CPU usage", "milliseconds/s", 9999, update_every, CHART_TYPE_STACKED);
5260
5261 rrd_stats_dimension_add(stcpu, "user", NULL, 1, 1000, RRD_DIMENSION_INCREMENTAL);
5262 rrd_stats_dimension_add(stcpu, "system", NULL, 1, 1000, RRD_DIMENSION_INCREMENTAL);
@@ -6044,7 +6044,10 @@ void *pluginsd_main(void *ptr)
6044 " 'apache apache2 as apache'"
6045 " 'mysql mysqld as mysql'"
6046 " asterisk"
6047 - " opensips"
6047 + " 'opensips opensips-mi-pro as opensips'"
6048 + " stund"
6049 + " 'radiusd radiusclient as radius'"
6050 + " 'fail2ban-server as fail2ban'"
6051 " dovecot"
6052 " nginx"
6053 " lighttpd"
@@ -6054,19 +6057,19 @@ void *pluginsd_main(void *ptr)
6057 " 'rpcbind rpc.statd rpc.idmapd rpc.mountd nfsd4 nfsd4_callbacks nfsd nfsiod as nfs'"
6058 " 'ssh sshd as ssh'"
6059 " 'gdm X lightdm xdm gnome-session gconfd-2 gnome-terminal gnome-screensaver gnome-settings-daemon pulseaudio as X'"
6057 - " 'named as bind'"
6060 + " named"
6061 " 'clamd freshclam as clam'"
6062 " 'cupsd cups-browsed as cups'"
6063 " 'ntpq ntpd as ntp'"
6064 " 'deluge deluged as deluge'"
6065 " 'vboxwebsrv VBoxXPCOMIPCD VBoxSVC as vbox'"
6066 " 'ulogd syslogd syslog-ng rsyslogd logrotate as log'"
6064 - " 'snmpd vnstatd smokeping zabbix_agentd monit munin-node mon as nms'"
6067 + " 'snmpd vnstatd smokeping zabbix_agentd monit munin-node mon openhpid as nms'"
6068 " 'ppp pppd pptpd pptpctrl as ppp'"
6069 " 'inetd xinetd as inetd'"
6070 " openvpn"
6071 " 'cron atd as cron'"
6069 - " 'corosync hs_logd stonithd as ha'"
6072 + " 'corosync hs_logd ha_logd stonithd as ha'"
6073 " 'ipvs_syncmaster ipvs_syncbackup as ipvs'"
6074 " 'kthreadd as kernel'"
6075 " netdata"
web/netdata.js
+9 -2
@@ -365,17 +365,24 @@ function loadCharts(base_url, doNext) {
365 json.charts[i].group = 5;
366 break;
367
368 + case "netdata":
369 + json.charts[i].category = "NetData";
370 + json.charts[i].categoryPriority = 3000;
371 + json.charts[i].glyphicon = "glyphicon-thumbs-up";
372 + json.charts[i].group = 5;
373 + break;
374 +
375 case "apps":
376 json.charts[i].category = "Apps";
377 json.charts[i].categoryPriority = 4000;
371 - json.charts[i].glyphicon = "glyphicon-globe";
378 + json.charts[i].glyphicon = "glyphicon-tasks";
379 json.charts[i].group = 5;
380 break;
381
382 case "squid":
383 json.charts[i].category = "Squid";
384 json.charts[i].categoryPriority = 5000;
378 - json.charts[i].glyphicon = "glyphicon-globe";
385 + json.charts[i].glyphicon = "glyphicon-link";
386 json.charts[i].group = 5;
387 break;
388