tcp queue metrics
This commit is contained in:
parent
272d3662b3
commit
6aec1931f5
|
@ -1809,6 +1809,8 @@ static void ip_format(char *buffer, IpAddress addr)
|
||||||
sprintf(buffer, "%d.%d.%d.%d", ap[0], ap[1], ap[2], ap[3]);
|
sprintf(buffer, "%d.%d.%d.%d", ap[0], ap[1], ap[2], ap[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TCPQ_SIZE(s) ((s) >= 0 ? (s) : 0)
|
||||||
|
|
||||||
static int tcp_connection_list_get(sigar_t *sigar,
|
static int tcp_connection_list_get(sigar_t *sigar,
|
||||||
sigar_net_connection_list_t *connlist,
|
sigar_net_connection_list_t *connlist,
|
||||||
int flags,
|
int flags,
|
||||||
|
@ -1833,6 +1835,12 @@ static int tcp_connection_list_get(sigar_t *sigar,
|
||||||
conn->local_port = entry->tcpConnLocalPort;
|
conn->local_port = entry->tcpConnLocalPort;
|
||||||
conn->remote_port = entry->tcpConnRemPort;
|
conn->remote_port = entry->tcpConnRemPort;
|
||||||
conn->type = SIGAR_NETCONN_TCP;
|
conn->type = SIGAR_NETCONN_TCP;
|
||||||
|
conn->send_queue =
|
||||||
|
TCPQ_SIZE(entry->tcpConnEntryInfo.ce_snxt -
|
||||||
|
entry->tcpConnEntryInfo.ce_suna - 1);
|
||||||
|
conn->receive_queue =
|
||||||
|
TCPQ_SIZE(entry->tcpConnEntryInfo.ce_rnxt -
|
||||||
|
entry->tcpConnEntryInfo.ce_rack);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TCPS_CLOSED:
|
case TCPS_CLOSED:
|
||||||
|
|
Loading…
Reference in New Issue