From: Stephen Hemminger <stephen@networkplumber.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [RFC iproute2-next 2/5] ss: make tcp_mem long
Date: Wed, 2 May 2018 14:29:18 -0700 [thread overview]
Message-ID: <20180502142918.574a2685@xeon-e3> (raw)
In-Reply-To: <537df45c-f5d2-e06a-f66c-fe7cd322a255@gmail.com>
On Wed, 2 May 2018 14:08:53 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On 05/02/2018 01:27 PM, Stephen Hemminger wrote:
> > The tcp_memory field in /proc/net/sockstat is formatted as
> > a long value by kernel. Change ss to keep this as full value.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> > misc/ss.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/misc/ss.c b/misc/ss.c
> > index 22c76e34f83b..c88a25581755 100644
> > --- a/misc/ss.c
> > +++ b/misc/ss.c
> > @@ -4589,7 +4589,7 @@ static int get_snmp_int(const char *proto, const char *key, int *result)
> >
> > struct ssummary {
> > int socks;
> > - int tcp_mem;
> > + long tcp_mem;
> > int tcp_total;
> > int tcp_orphans;
> > int tcp_tws;
> > @@ -4629,7 +4629,7 @@ static void get_sockstat_line(char *line, struct ssummary *s)
> > else if (strcmp(id, "FRAG6:") == 0)
> > sscanf(rem, "%*s%d%*s%d", &s->frag6, &s->frag6_mem);
> > else if (strcmp(id, "TCP:") == 0)
> > - sscanf(rem, "%*s%d%*s%d%*s%d%*s%d%*s%d",
> > + sscanf(rem, "%*s%d%*s%d%*s%d%*s%d%*s%ld",
> > &s->tcp4_hashed,
> > &s->tcp_orphans, &s->tcp_tws, &s->tcp_total, &s->tcp_mem);
> > }
> >
>
> Hi Stephen
>
> It seems nothing uses yet the value ?
Yup. let's just drop it from the scan
next prev parent reply other threads:[~2018-05-02 21:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-02 20:27 [RFC iproute2-next 0/5] ss statistics fixes Stephen Hemminger
2018-05-02 20:27 ` [RFC iproute2-next 1/5] ss: make args to get_snmp_int const Stephen Hemminger
2018-05-02 20:27 ` [RFC iproute2-next 2/5] ss: make tcp_mem long Stephen Hemminger
2018-05-02 21:08 ` Eric Dumazet
2018-05-02 21:29 ` Stephen Hemminger [this message]
2018-05-02 20:27 ` [RFC iproute2-next 3/5] ss: use sockstat to get TCP bind ports Stephen Hemminger
2018-05-02 20:28 ` [RFC iproute2-next 4/5] ss: don't look for skbuff_head_cache Stephen Hemminger
2018-05-02 20:28 ` [RFC iproute2-next 5/5] ss: use correct slab statistics Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180502142918.574a2685@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).