[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPh34mdi+8wLaUY3ZBks40wbOtdzsbTrmuvsHivRouc9rs3gig@mail.gmail.com>
Date: Tue, 20 Jan 2015 11:29:53 +0100
From: Hagen Paul Pfeifer <hagen@...u.net>
To: Vadim Kochan <vadim4j@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH iproute2 3/3] ss: Unify tcp stats output
On 18 January 2015 at 21:43, Vadim Kochan <vadim4j@...il.com> wrote:
Hey Stephen,
it is time to think about the format of the ss output - it starts to
get unreadable. Neither humans nor scripts will parse the output. See
the patch at the end,to get idea what I mean: who will understand
"fallback_mode"? I don't want to blame someone - not at all, it is
just one example. My proposal:
1) support grouping. E.g. DCTCP could be separated in the following
manner. I.e. "dctcp:[ ce_state: %d, alpha: %d, ... ]" or
"dctcp:ce_state.%d;alpha,%d" like the socket memory output.
This makes it easier for humans and scripts to parse the output.
Since some time ss output is extended really extensive (especially
Eric make use of this). This is not the end and additional values are
added - make the current babylon even worse.
2) add a JSON formater as soon as possible to make the output
parseable. I would do this - it is required anyway.
Any comments on this?
> + if (s->ssthresh)
> + printf(" ssthresh:%d", s->ssthresh);
> +
> + if (s->dctcp && s->dctcp->enabled) {
> + struct dctcpstat *dctcp = s->dctcp;
> +
> + printf(" ce_state %u alpha %u ab_ecn %u ab_tot %u",
> + dctcp->ce_state, dctcp->alpha, dctcp->ab_ecn,
> + dctcp->ab_tot);
> + } else if (s->dctcp) {
> + printf(" fallback_mode");
> + }
> +
> + if (s->send_bps)
> + printf(" send %sbps", sprint_bandw(b1, s->send_bps));
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists