* tcpprobe display format for snd_nxt and snd_una
@ 2017-04-05 19:40 hiren panchasara
2017-04-06 21:45 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: hiren panchasara @ 2017-04-05 19:40 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]
(New to linux and first-time poster so please guide me if needed.)
Upon using tcpprobe I realized that it prints snd_nxt and snd_una as hex
which makes it harder to read and compare with tcpdump for example.
Not sure if that is intentional. If not, a simple patch like this would
print them as decimals.
[PATCH] Display snd_nxt and snd_una as decimals for better
readability.
---
net/ipv4/tcp_probe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
index f6c50af..a8e66c1 100644
--- a/net/ipv4/tcp_probe.c
+++ b/net/ipv4/tcp_probe.c
@@ -191,7 +191,7 @@ static int tcpprobe_sprint(char *tbuf, int n)
= ktime_to_timespec64(ktime_sub(p->tstamp, tcp_probe.start));
return scnprintf(tbuf, n,
- "%lu.%09lu %pISpc %pISpc %d %#x %#x %u %u %u %u %u\n",
+ "%lu.%09lu %pISpc %pISpc %d %u %u %u %u %u %u %u\n",
(unsigned long)ts.tv_sec,
(unsigned long)ts.tv_nsec,
&p->src, &p->dst, p->length, p->snd_nxt, p->snd_una,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: tcpprobe display format for snd_nxt and snd_una
2017-04-05 19:40 tcpprobe display format for snd_nxt and snd_una hiren panchasara
@ 2017-04-06 21:45 ` Stephen Hemminger
2017-04-06 22:16 ` hiren panchasara
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2017-04-06 21:45 UTC (permalink / raw)
To: hiren panchasara; +Cc: netdev
On Wed, 5 Apr 2017 12:40:09 -0700
hiren panchasara <hiren@strugglingcoder.info> wrote:
> (New to linux and first-time poster so please guide me if needed.)
>
> Upon using tcpprobe I realized that it prints snd_nxt and snd_una as hex
> which makes it harder to read and compare with tcpdump for example.
>
> Not sure if that is intentional. If not, a simple patch like this would
> print them as decimals.
>
> [PATCH] Display snd_nxt and snd_una as decimals for better
> readability.
>
> ---
> net/ipv4/tcp_probe.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
> index f6c50af..a8e66c1 100644
> --- a/net/ipv4/tcp_probe.c
> +++ b/net/ipv4/tcp_probe.c
> @@ -191,7 +191,7 @@ static int tcpprobe_sprint(char *tbuf, int n)
> = ktime_to_timespec64(ktime_sub(p->tstamp, tcp_probe.start));
>
> return scnprintf(tbuf, n,
> - "%lu.%09lu %pISpc %pISpc %d %#x %#x %u %u %u %u %u\n",
> + "%lu.%09lu %pISpc %pISpc %d %u %u %u %u %u %u %u\n",
> (unsigned long)ts.tv_sec,
> (unsigned long)ts.tv_nsec,
> &p->src, &p->dst, p->length, p->snd_nxt, p->snd_una,
> --
>
> Let me know if I am missing something obvious.
The output of tcpprobe is intended for consumption by programs.
Changing the output format would be considered a kernel ABI breakage which
is something Linux tries not to do. Therefore I would prefer it
not be changed. Sorry if this is inconvenient for you but breaking other
users scripts would be a bigger problem.
Also, your patch email is not formatted with subject [RFC] or [PATCH]
and is missing signed-off-by.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tcpprobe display format for snd_nxt and snd_una
2017-04-06 21:45 ` Stephen Hemminger
@ 2017-04-06 22:16 ` hiren panchasara
0 siblings, 0 replies; 3+ messages in thread
From: hiren panchasara @ 2017-04-06 22:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 2731 bytes --]
On 04/06/17 at 05:45P, Stephen Hemminger wrote:
> On Wed, 5 Apr 2017 12:40:09 -0700
> hiren panchasara <hiren@strugglingcoder.info> wrote:
>
> > (New to linux and first-time poster so please guide me if needed.)
> >
> > Upon using tcpprobe I realized that it prints snd_nxt and snd_una as hex
> > which makes it harder to read and compare with tcpdump for example.
> >
> > Not sure if that is intentional. If not, a simple patch like this would
> > print them as decimals.
> >
> > [PATCH] Display snd_nxt and snd_una as decimals for better
> > readability.
> >
> > ---
> > net/ipv4/tcp_probe.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
> > index f6c50af..a8e66c1 100644
> > --- a/net/ipv4/tcp_probe.c
> > +++ b/net/ipv4/tcp_probe.c
> > @@ -191,7 +191,7 @@ static int tcpprobe_sprint(char *tbuf, int n)
> > = ktime_to_timespec64(ktime_sub(p->tstamp, tcp_probe.start));
> >
> > return scnprintf(tbuf, n,
> > - "%lu.%09lu %pISpc %pISpc %d %#x %#x %u %u %u %u %u\n",
> > + "%lu.%09lu %pISpc %pISpc %d %u %u %u %u %u %u %u\n",
> > (unsigned long)ts.tv_sec,
> > (unsigned long)ts.tv_nsec,
> > &p->src, &p->dst, p->length, p->snd_nxt, p->snd_una,
> > --
> >
> > Let me know if I am missing something obvious.
>
> The output of tcpprobe is intended for consumption by programs.
> Changing the output format would be considered a kernel ABI breakage which
> is something Linux tries not to do. Therefore I would prefer it
> not be changed.
Ah, I see.
> Sorry if this is inconvenient for you but breaking other
> users scripts would be a bigger problem.
No, I don't have any scripts depending on this. I just want to see this
o/p with naked eye and compare it with a pcap to see any possible
abnormalities of a "bad" connection. I guess I'd have to no write a
wrapper on top of this to achieve whhat
Can you point me to the programs/tools that consume this data? I am new
to Linux and want to learn tools that can help in troubleshooting. (In
FreeBSD land I can trivially dump this data with dtrace and I assume
something like that exists here too.)
I can always have a wrapper on top of this to do the conversion. Trivial
but inconvenient. :-)
>
> Also, your patch email is not formatted with subject [RFC] or [PATCH]
> and is missing signed-off-by.
Apologies for that. I'll make sure I do the right thing next time as
this looks like a non-starter because of ABI concerns.
Thanks for taking time and responding.
Cheers,
Hiren
[-- Attachment #2: Type: application/pgp-signature, Size: 603 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-06 22:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-05 19:40 tcpprobe display format for snd_nxt and snd_una hiren panchasara
2017-04-06 21:45 ` Stephen Hemminger
2017-04-06 22:16 ` hiren panchasara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).