@cryptotaxi247 / netdata-1 / commits / 9746dfe7e

cleanup

Costa Tsaousis (ktsaou) committed Apr 17, 2014 at 23:28 UTC 9746dfe7e3f21e5a34fadfc921856e5971fc29b0
3 files changed +23 -20
netdata.c
+20 -17
@@ -2465,9 +2465,9 @@ int do_proc_net_dev() {
2465
2466 // --------------------------------------------------------------------
2467
2468 - st = rrd_stats_find_bytype(iface, "packets");
2468 + st = rrd_stats_find_bytype("net_packets", iface);
2469 if(!st) {
2470 - st = rrd_stats_create(iface, "packets", NULL, iface, "Packets", "packets/s", save_history);
2470 + st = rrd_stats_create("net_packets", iface, NULL, iface, "Packets", "packets/s", save_history);
2471 st->isdetail = 1;
2472
2473 rrd_stats_dimension_add(st, "received", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2481,9 +2481,9 @@ int do_proc_net_dev() {
2481
2482 // --------------------------------------------------------------------
2483
2484 - st = rrd_stats_find_bytype(iface, "errors");
2484 + st = rrd_stats_find_bytype("net_errors", iface);
2485 if(!st) {
2486 - st = rrd_stats_create(iface, "errors", NULL, iface, "Interface Errors", "errors/s", save_history);
2486 + st = rrd_stats_create("net_errors", iface, NULL, iface, "Interface Errors", "errors/s", save_history);
2487 st->isdetail = 1;
2488
2489 rrd_stats_dimension_add(st, "receive", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2497,9 +2497,9 @@ int do_proc_net_dev() {
2497
2498 // --------------------------------------------------------------------
2499
2500 - st = rrd_stats_find_bytype(iface, "fifo");
2500 + st = rrd_stats_find_bytype("net_fifo", iface);
2501 if(!st) {
2502 - st = rrd_stats_create(iface, "fifo", NULL, iface, "Interface Queue", "packets", save_history);
2502 + st = rrd_stats_create("net_fifo", iface, NULL, iface, "Interface Queue", "packets", save_history);
2503 st->isdetail = 1;
2504
2505 rrd_stats_dimension_add(st, "receive", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_ABSOLUTE, NULL);
@@ -2513,9 +2513,9 @@ int do_proc_net_dev() {
2513
2514 // --------------------------------------------------------------------
2515
2516 - st = rrd_stats_find_bytype(iface, "compressed");
2516 + st = rrd_stats_find_bytype("net_compressed", iface);
2517 if(!st) {
2518 - st = rrd_stats_create(iface, "compressed", NULL, iface, "Compressed Packets", "packets/s", save_history);
2518 + st = rrd_stats_create("net_compressed", iface, NULL, iface, "Compressed Packets", "packets/s", save_history);
2519 st->isdetail = 1;
2520
2521 rrd_stats_dimension_add(st, "received", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2717,9 +2717,9 @@ int do_proc_diskstats() {
2717
2718 // --------------------------------------------------------------------
2719
2720 - st = rrd_stats_find_bytype(disk, "ops");
2720 + st = rrd_stats_find_bytype("disk_ops", disk);
2721 if(!st) {
2722 - st = rrd_stats_create(disk, "ops", NULL, disk, "Disk Operations", "operations/s", save_history);
2722 + st = rrd_stats_create("disk_ops", disk, NULL, disk, "Disk Operations", "operations/s", save_history);
2723 st->isdetail = 1;
2724
2725 rrd_stats_dimension_add(st, "reads", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2733,9 +2733,9 @@ int do_proc_diskstats() {
2733
2734 // --------------------------------------------------------------------
2735
2736 - st = rrd_stats_find_bytype(disk, "merged_ops");
2736 + st = rrd_stats_find_bytype("disk_merged_ops", disk);
2737 if(!st) {
2738 - st = rrd_stats_create(disk, "merged_ops", NULL, disk, "Merged Disk Operations", "operations/s", save_history);
2738 + st = rrd_stats_create("disk_merged_ops", disk, NULL, disk, "Merged Disk Operations", "operations/s", save_history);
2739 st->isdetail = 1;
2740
2741 rrd_stats_dimension_add(st, "reads", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2749,9 +2749,9 @@ int do_proc_diskstats() {
2749
2750 // --------------------------------------------------------------------
2751
2752 - st = rrd_stats_find_bytype(disk, "iotime");
2752 + st = rrd_stats_find_bytype("disk_iotime", disk);
2753 if(!st) {
2754 - st = rrd_stats_create(disk, "iotime", NULL, disk, "Disk I/O Time", "milliseconds/s", save_history);
2754 + st = rrd_stats_create("disk_iotime", disk, NULL, disk, "Disk I/O Time", "milliseconds/s", save_history);
2755 st->isdetail = 1;
2756
2757 rrd_stats_dimension_add(st, "reads", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_INCREMENTAL, NULL);
@@ -2769,9 +2769,9 @@ int do_proc_diskstats() {
2769
2770 // --------------------------------------------------------------------
2771
2772 - st = rrd_stats_find_bytype(disk, "current_ops");
2772 + st = rrd_stats_find_bytype("disk_cur_ops", disk);
2773 if(!st) {
2774 - st = rrd_stats_create(disk, "current_ops", NULL, disk, "Current Disk I/O operations", "operations", save_history);
2774 + st = rrd_stats_create("disk_cur_ops", disk, NULL, disk, "Current Disk I/O operations", "operations", save_history);
2775 st->isdetail = 1;
2776
2777 rrd_stats_dimension_add(st, "operations", NULL, sizeof(unsigned long long), 0, 1, 1, RRD_DIMENSION_ABSOLUTE, NULL);
@@ -4431,12 +4431,15 @@ void sig_handler(int signo)
4431 case SIGINT:
4432 case SIGHUP:
4433 case SIGSEGV:
4434 - error("Signaled cleanup (signal %d).", signo);
4434 + error("Signaled exit (signal %d).", signo);
4435 if(tc_child_pid) kill(tc_child_pid, SIGTERM);
4436 tc_child_pid = 0;
4437 exit(1);
4438 break;
4439
4440 + case SIGCHLD:
4441 + break;
4442 +
4443 default:
4444 error("Signal %d received. Ignoring it.", signo);
4445 break;
netdata.start
+2 -2
@@ -45,8 +45,8 @@ else
45 fi
46
47 # exporting NETDATA variables to netdata
48 -export `set | grep ^NETDATA_TITLE_ ` 2>/dev/null
49 -export `set | grep ^NETDATA_PRIORITY_ ` 2>/dev/null
48 +export `set 2>&1 | grep ^NETDATA_TITLE_ `
49 +export `set 2>&1 | grep ^NETDATA_PRIORITY_ `
50
51 echo "Starting netdata"
52 if [ "$USER" = "root" ]
web/netdata.js
+1 -1
@@ -3,7 +3,7 @@ if(!window.console){ window.console = {log: function(){} }; }
3
4 // Load the Visualization API and the piechart package.
5 google.load('visualization', '1.1', {'packages':['corechart']});
6 -google.load('visualization', '1.1', {'packages':['controls']});
6 +//google.load('visualization', '1.1', {'packages':['controls']});
7
8 function canChartBeRefreshed(chart) {
9 // is it enabled?