* [PATCH iproute2] ss: add more TCP_INFO components
@ 2013-06-25 20:29 Eric Dumazet
2013-06-25 20:33 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2013-06-25 20:29 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev, Yuchung Cheng, Neal Cardwell
From: Eric Dumazet <edumazet@google.com>
Allow ss -i to display more TCP informations :
unacked:N Number of un-acked packets
retrans:X/Y X: number of outstanding retransmit packets
Y: total number of retransmits for the session
lost:N Number of lost packets (tcpi_lost)
sacked:N Number of sacked packets (tcpi_sacked)
facked:N Number of facked packets (tcpi_facked)
reordering:N Reordering level (if different of 3)
Example :
$ ss -emoi dst 10.7.7.83
tcp ESTAB 0 1154056 10.7.7.84:54127 10.7.7.83:34342
timer:(on,200ms,0) ino:57003 sk:ffff88063c51d0c0 <->
skmem:(r0,rb89280,t0,tb2097152,f726504,w1436184,o0,bl0) ts sack cubic
wscale:7,6 rto:310 rtt:107.375/1 mss:1448 cwnd:568 ssthresh:108 send
61.3Mbps unacked:568 retrans:0/21 reordering:127 rcv_space:29200
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
---
misc/ss.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/misc/ss.c b/misc/ss.c
index e0d11ff..c0369f1 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1435,6 +1435,19 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
/ rtt));
}
+ if (info->tcpi_unacked)
+ printf(" unacked:%u", info->tcpi_unacked);
+ if (info->tcpi_retrans || info->tcpi_total_retrans)
+ printf(" retrans:%u/%u", info->tcpi_retrans,
+ info->tcpi_total_retrans);
+ if (info->tcpi_lost)
+ printf(" lost:%u", info->tcpi_lost);
+ if (info->tcpi_sacked && r->idiag_state != SS_LISTEN)
+ printf(" sacked:%u", info->tcpi_sacked);
+ if (info->tcpi_fackets)
+ printf(" fackets:%u", info->tcpi_fackets);
+ if (info->tcpi_reordering != 3)
+ printf(" reordering:%d", info->tcpi_reordering);
if (info->tcpi_rcv_rtt)
printf(" rcv_rtt:%g", (double) info->tcpi_rcv_rtt/1000);
if (info->tcpi_rcv_space)
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH iproute2] ss: add more TCP_INFO components
2013-06-25 20:29 [PATCH iproute2] ss: add more TCP_INFO components Eric Dumazet
@ 2013-06-25 20:33 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2013-06-25 20:33 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, Yuchung Cheng, Neal Cardwell
On Tue, 25 Jun 2013 13:29:17 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> Allow ss -i to display more TCP informations :
>
> unacked:N Number of un-acked packets
> retrans:X/Y X: number of outstanding retransmit packets
> Y: total number of retransmits for the session
> lost:N Number of lost packets (tcpi_lost)
> sacked:N Number of sacked packets (tcpi_sacked)
> facked:N Number of facked packets (tcpi_facked)
> reordering:N Reordering level (if different of 3)
>
> Example :
>
> $ ss -emoi dst 10.7.7.83
> tcp ESTAB 0 1154056 10.7.7.84:54127 10.7.7.83:34342
> timer:(on,200ms,0) ino:57003 sk:ffff88063c51d0c0 <->
> skmem:(r0,rb89280,t0,tb2097152,f726504,w1436184,o0,bl0) ts sack cubic
> wscale:7,6 rto:310 rtt:107.375/1 mss:1448 cwnd:568 ssthresh:108 send
> 61.3Mbps unacked:568 retrans:0/21 reordering:127 rcv_space:29200
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-25 20:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 20:29 [PATCH iproute2] ss: add more TCP_INFO components Eric Dumazet
2013-06-25 20:33 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox