ss: display not_sent and min_rtt info
Display new info from net-next kernel. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
0aefb9fa41
commit
9e99e49528
|
|
@ -21,6 +21,7 @@ struct genlmsghdr {
|
||||||
#define GENL_CMD_CAP_DO 0x02
|
#define GENL_CMD_CAP_DO 0x02
|
||||||
#define GENL_CMD_CAP_DUMP 0x04
|
#define GENL_CMD_CAP_DUMP 0x04
|
||||||
#define GENL_CMD_CAP_HASPOL 0x08
|
#define GENL_CMD_CAP_HASPOL 0x08
|
||||||
|
#define GENL_UNS_ADMIN_PERM 0x10
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List of reserved static generic netlink identifiers:
|
* List of reserved static generic netlink identifiers:
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,9 @@ struct tcp_info {
|
||||||
__u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
|
__u64 tcpi_bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived */
|
||||||
__u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
|
__u32 tcpi_segs_out; /* RFC4898 tcpEStatsPerfSegsOut */
|
||||||
__u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */
|
__u32 tcpi_segs_in; /* RFC4898 tcpEStatsPerfSegsIn */
|
||||||
|
|
||||||
|
__u32 tcpi_notsent_bytes;
|
||||||
|
__u32 tcpi_min_rtt;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* for TCP_MD5SIG socket option */
|
/* for TCP_MD5SIG socket option */
|
||||||
|
|
|
||||||
|
|
@ -778,7 +778,9 @@ struct tcpstat
|
||||||
unsigned int sacked;
|
unsigned int sacked;
|
||||||
unsigned int fackets;
|
unsigned int fackets;
|
||||||
unsigned int reordering;
|
unsigned int reordering;
|
||||||
|
unsigned int not_sent;
|
||||||
double rcv_rtt;
|
double rcv_rtt;
|
||||||
|
double min_rtt;
|
||||||
int rcv_space;
|
int rcv_space;
|
||||||
bool has_ts_opt;
|
bool has_ts_opt;
|
||||||
bool has_sack_opt;
|
bool has_sack_opt;
|
||||||
|
|
@ -1737,6 +1739,10 @@ static void tcp_stats_print(struct tcpstat *s)
|
||||||
printf(" rcv_rtt:%g", s->rcv_rtt);
|
printf(" rcv_rtt:%g", s->rcv_rtt);
|
||||||
if (s->rcv_space)
|
if (s->rcv_space)
|
||||||
printf(" rcv_space:%d", s->rcv_space);
|
printf(" rcv_space:%d", s->rcv_space);
|
||||||
|
if (s->not_sent)
|
||||||
|
printf(" notsent:%u", s->not_sent);
|
||||||
|
if (s->min_rtt)
|
||||||
|
printf(" minrtt:%g", s->min_rtt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tcp_timer_print(struct tcpstat *s)
|
static void tcp_timer_print(struct tcpstat *s)
|
||||||
|
|
@ -1990,6 +1996,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
|
||||||
s.bytes_received = info->tcpi_bytes_received;
|
s.bytes_received = info->tcpi_bytes_received;
|
||||||
s.segs_out = info->tcpi_segs_out;
|
s.segs_out = info->tcpi_segs_out;
|
||||||
s.segs_in = info->tcpi_segs_in;
|
s.segs_in = info->tcpi_segs_in;
|
||||||
|
s.not_sent = info->tcpi_notsent_bytes;
|
||||||
|
s.min_rtt = (double) info->tcpi_min_rtt / 1000;
|
||||||
tcp_stats_print(&s);
|
tcp_stats_print(&s);
|
||||||
free(s.dctcp);
|
free(s.dctcp);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue