move tcp active and passive opens to a separate chart; give idle jitter its own sub-menu
Costa Tsaousis (ktsaou) committed
Jan 6, 2018 at 00:37 UTC
3f1a84bdc02907218b99f9da69d2df3c7f405d5a
5 files changed
+69
-18
src/plugin_idlejitter.c
+2
-2
@@ -24,13 +24,13 @@ void *cpuidlejitter_main(void *ptr) {
24
"system"
25
, "idlejitter"
26
, NULL
27
- , "processes"
27
+ , "idlejitter"
28
, NULL
29
, "CPU Idle Jitter"
30
, "microseconds lost/s"
31
, "idlejitter"
32
, NULL
33
- , 9999
33
+ , 800
34
, localhost->rrd_update_every
35
, RRDSET_TYPE_AREA
36
);
src/proc_net_snmp.c
+41
-12
@@ -90,7 +90,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
90
91
static procfile *ff = NULL;
92
static int do_ip_packets = -1, do_ip_fragsout = -1, do_ip_fragsin = -1, do_ip_errors = -1,
93
- do_tcp_sockets = -1, do_tcp_packets = -1, do_tcp_errors = -1, do_tcp_handshake = -1,
93
+ do_tcp_sockets = -1, do_tcp_packets = -1, do_tcp_errors = -1, do_tcp_handshake = -1, do_tcp_opens = -1,
94
do_udp_packets = -1, do_udp_errors = -1, do_icmp_packets = -1, do_icmpmsg = -1, do_udplite_packets = -1;
95
static uint32_t hash_ip = 0, hash_icmp = 0, hash_tcp = 0, hash_udp = 0, hash_icmpmsg = 0, hash_udplite = 0;
96
@@ -112,6 +112,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
112
do_tcp_sockets = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 TCP connections", 1);
113
do_tcp_packets = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 TCP packets", 1);
114
do_tcp_errors = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 TCP errors", 1);
115
+ do_tcp_opens = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 TCP opens", 1);
116
do_tcp_handshake = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 TCP handshake issues", 1);
117
do_udp_packets = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 UDP packets", 1);
118
do_udp_errors = config_get_boolean("plugin:proc:/proc/net/snmp", "ipv4 UDP errors", 1);
@@ -723,7 +724,7 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
724
, "packets/s"
725
, "proc"
726
, "net/snmp"
726
- , 2520
727
+ , 2525
728
, update_every
729
, RRDSET_TYPE_LINE
730
);
@@ -743,12 +744,44 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
744
745
// --------------------------------------------------------------------
746
747
+ if(do_tcp_opens) {
748
+ static RRDSET *st = NULL;
749
+ static RRDDIM *rd_ActiveOpens = NULL,
750
+ *rd_PassiveOpens = NULL;
751
+
752
+ if(unlikely(!st)) {
753
+ st = rrdset_create_localhost(
754
+ RRD_TYPE_NET_SNMP
755
+ , "tcpopens"
756
+ , NULL
757
+ , "tcp"
758
+ , NULL
759
+ , "IPv4 TCP Opens"
760
+ , "connections/s"
761
+ , "proc"
762
+ , "net/snmp"
763
+ , 2502
764
+ , update_every
765
+ , RRDSET_TYPE_LINE
766
+ );
767
+ rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
768
+
769
+ rd_ActiveOpens = rrddim_add(st, "ActiveOpens", "active", 1, 1, RRD_ALGORITHM_INCREMENTAL);
770
+ rd_PassiveOpens = rrddim_add(st, "PassiveOpens", "passive", 1, 1, RRD_ALGORITHM_INCREMENTAL);
771
+ }
772
+ else rrdset_next(st);
773
+
774
+ rrddim_set_by_pointer(st, rd_ActiveOpens, (collected_number)snmp_root.tcp_ActiveOpens);
775
+ rrddim_set_by_pointer(st, rd_PassiveOpens, (collected_number)snmp_root.tcp_PassiveOpens);
776
+ rrdset_done(st);
777
+ }
778
+
779
+ // --------------------------------------------------------------------
780
+
781
if(do_tcp_handshake) {
782
static RRDSET *st = NULL;
783
static RRDDIM *rd_EstabResets = NULL,
784
*rd_OutRsts = NULL,
750
- *rd_ActiveOpens = NULL,
751
- *rd_PassiveOpens = NULL,
785
*rd_AttemptFails = NULL,
786
*rd_TCPSynRetrans = NULL;
787
@@ -769,19 +802,15 @@ int do_proc_net_snmp(int update_every, usec_t dt) {
802
);
803
rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
804
772
- rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
773
- rd_OutRsts = rrddim_add(st, "OutRsts", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
774
- rd_ActiveOpens = rrddim_add(st, "ActiveOpens", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
775
- rd_PassiveOpens = rrddim_add(st, "PassiveOpens", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
776
- rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
777
- rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
805
+ rd_EstabResets = rrddim_add(st, "EstabResets", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
806
+ rd_OutRsts = rrddim_add(st, "OutRsts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
807
+ rd_AttemptFails = rrddim_add(st, "AttemptFails", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
808
+ rd_TCPSynRetrans = rrddim_add(st, "TCPSynRetrans", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
809
}
810
else rrdset_next(st);
811
812
rrddim_set_by_pointer(st, rd_EstabResets, (collected_number)snmp_root.tcp_EstabResets);
813
rrddim_set_by_pointer(st, rd_OutRsts, (collected_number)snmp_root.tcp_OutRsts);
783
- rrddim_set_by_pointer(st, rd_ActiveOpens, (collected_number)snmp_root.tcp_ActiveOpens);
784
- rrddim_set_by_pointer(st, rd_PassiveOpens, (collected_number)snmp_root.tcp_PassiveOpens);
814
rrddim_set_by_pointer(st, rd_AttemptFails, (collected_number)snmp_root.tcp_AttemptFails);
815
rrddim_set_by_pointer(st, rd_TCPSynRetrans, tcpext_TCPSynRetrans);
816
rrdset_done(st);
src/proc_net_sockstat.c
+1
-1
@@ -304,7 +304,7 @@ int do_proc_net_sockstat(int update_every, usec_t dt) {
304
, "KB"
305
, "proc"
306
, "net/sockstat"
307
- , 2540
307
+ , 4000
308
, update_every
309
, RRDSET_TYPE_AREA
310
);
web/dashboard_info.js
+22
@@ -689,6 +689,28 @@ netdataDashboard.context = {
689
info: 'TCP connection aborts. <b>baddata</b> (<code>TCPAbortOnData</code>) happens while the connection is on <code>FIN_WAIT1</code> and the kernel receives a packet with a sequence number beyond the last one for this connection - the kernel responds with <code>RST</code> (closes the connection). <b>userclosed</b> (<code>TCPAbortOnClose</code>) happens when the kernel receives data on an already closed connection and responds with <code>RST</code>. <b>nomemory</b> (<code>TCPAbortOnMemory</code> happens when there are too many orphaned sockets (not attached to an fd) and the kernel has to drop a connection - sometimes it will send an <code>RST</code>, sometimes it won\'t. <b>timeout</b> (<code>TCPAbortOnTimeout</code>) happens when a connection times out. <b>linger</b> (<code>TCPAbortOnLinger</code>) happens when the kernel killed a socket that was already closed by the application and lingered around for long enough. <b>failed</b> (<code>TCPAbortFailed</code>) happens when the kernel attempted to send an <code>RST</code> but failed because there was no memory available.'
690
},
691
692
+ 'ipv4.tcpsock': {
693
+ info: 'The number of TCP connections (known as <code>CurrEstab</code>) with status <code>ESTABLISHED</code> or <code>CLOSE_WAIT</code>.'
694
+ },
695
+
696
+ 'ipv4.tcpopens': {
697
+ info: '<b>active</b> or <code>ActiveOpens</code> is the number of <b>connections made</b> (i.e. connections that made a direct transition from <code>CLOSED</code> to <code>SYN-SENT</code>).'
698
+ + ' <b>passive</b> or <code>PassiveOpens</code> is the number of <b>connections received</b> (i.e. connections that made a direct transition from <code>LISTEN</code> to <code>SYN-RCVD</code>).'
699
+ },
700
+
701
+ 'ipv4.tcperrors': {
702
+ info: '<code>InErrs</code> is the number of TCP segments received in error.'
703
+ + ' <code>InCsumErrors</code> is the number of TCP segments received with checksum errors.'
704
+ + ' <code>RetransSegs</code> is the number of TCP segments retransmitted.'
705
+ },
706
+
707
+ 'ipv4.tcphandshake': {
708
+ info: '<code>EstabResets</code> is the number of established connections resets (i.e. connections that made a direct transition from <code>ESTABLISHED</code> to <code>CLOSED</code>).'
709
+ + ' <code>OutRsts</code> is the number of TCP segments sent, with the <code>RST</code> flag set.'
710
+ + ' <code>AttemptFails</code> is the number of times TCP connections made a direct transition from either <code>SYN-SENT</code> or <code>SYN-RCVD</code> to <code>CLOSED</code>, plus the number of times TCP connections made a direct transition from the <code>SYN-RCVD</code> to <code>LISTEN</code>.'
711
+ + ' <code>TCPSynRetrans</code> shows retries for new outbound TCP connections, which can indicate general connectivity issues or backlog on the remote host.'
712
+ },
713
+
714
// ------------------------------------------------------------------------
715
// APPS
716
web/index.html
+3
-3
@@ -4344,7 +4344,7 @@
4344
});
4345
4346
NETDATA.requiredJs.push({
4347
- url: NETDATA.serverStatic + 'dashboard_info.js?v20171220-1',
4347
+ url: NETDATA.serverStatic + 'dashboard_info.js?v20180106-1',
4348
async: false,
4349
isAlreadyLoaded: function() { return false; }
4350
});
@@ -4528,7 +4528,7 @@
4528
<div class="col-md-10" role="main">
4529
<div class="p">
4530
<big><a href="https://github.com/firehol/netdata/wiki" target="_blank">netdata</a></big><br/>
4531
- <i class="fas fa-copyright"></i> Copyright 2016-2017, <a href="mailto:costa@tsaousis.gr">Costa Tsaousis</a>.<br/>
4531
+ <i class="fas fa-copyright"></i> Copyright 2016-2018, <a href="mailto:costa@tsaousis.gr">Costa Tsaousis</a>.<br/>
4532
Released under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html" target="_blank">GPL v3 or later</a>.<br/>
4533
</div>
4534
<div class="p">
@@ -5622,6 +5622,6 @@
5622
</div>
5623
</div>
5624
<div id="hiddenDownloadLinks" style="display: none;" hidden></div>
5625
- <script type="text/javascript" src="dashboard.js?v20171226-1"></script>
5625
+ <script type="text/javascript" src="dashboard.js?v20180106-1"></script>
5626
</body>
5627
</html>