From: Stephen Hemminger <stephen@networkplumber.org>
To: Roman Mashak <mrv@mojatatu.com>
Cc: Stefano Brivio <sbrivio@redhat.com>, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ss: Fix rendering of continuous output (-E, --events)
Date: Tue, 27 Mar 2018 09:11:27 -0700 [thread overview]
Message-ID: <20180327091127.6ac10795@xeon-e3> (raw)
In-Reply-To: <85woy2ly1i.fsf@mojatatu.com>
On Fri, 23 Mar 2018 09:30:17 -0400
Roman Mashak <mrv@mojatatu.com> wrote:
> Stefano Brivio <sbrivio@redhat.com> writes:
>
> > Roman Mashak reported that ss currently shows no output when it
> > should continuously report information about terminated sockets
> > (-E, --events switch).
> >
> > This happens because I missed this case in 691bd854bf4a ("ss:
> > Buffer raw fields first, then render them as a table") and the
> > rendering function is simply not called.
> >
> > To fix this, we need to:
> >
> > - call render() every time we need to display new socket events
> > from generic_show_sock(), which is only used to follow events.
> > Always call it even if specific socket display functions
> > return errors to ensure we clean up buffers
> >
> > - get the screen width every time we have new events to display,
> > thus factor out getting the screen width from main() into a
> > function we'll call whenever we calculate columns width
> >
> > - reset the current field pointer after rendering, more output
> > might come after render() is called
> >
> > Reported-by: Roman Mashak <mrv@mojatatu.com>
> > Fixes: 691bd854bf4a ("ss: Buffer raw fields first, then render them as a table")
> > Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
>
> Thanks Stefano.
>
> Tested-by: Roman Mashak <mrv@mojatatu.com>
Applied
prev parent reply other threads:[~2018-03-27 17:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 8:37 [PATCH iproute2] ss: Fix rendering of continuous output (-E, --events) Stefano Brivio
2018-03-23 13:30 ` Roman Mashak
2018-03-27 16:11 ` Stephen Hemminger [this message]
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=20180327091127.6ac10795@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=sbrivio@redhat.com \
/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).