Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jun 2025 20:35:18 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org,  dev-commits-src-main@freebsd.org, Damin Rido <daminrido139@gmail.com>
Subject:   Re: git: 0726c6574f88 - main - sockstat: Add automatic column sizing and remove -w option
Message-ID:  <CAOtMX2hLnx6Zypt19jMuku9qagy5xXxF-XPNvCH9Y1RoGK-Fqw@mail.gmail.com>
In-Reply-To: <aF9D_NPdWAT20cB2@cell.glebi.us>
References:  <202506271559.55RFxWdm024724@gitrepo.freebsd.org> <aF9D_NPdWAT20cB2@cell.glebi.us>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e9aebe063898a521
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 27, 2025 at 7:23=E2=80=AFPM Gleb Smirnoff <glebius@freebsd.org>=
 wrote:

>   Hi,
>
> On Fri, Jun 27, 2025 at 03:59:32PM +0000, Alan Somers wrote:
> A> commit 0726c6574f889507e5030173bf4c82c80911394d
> A> Author:     Damin Rido <rido@FreeBSD.com>
> A> AuthorDate: 2025-06-12 09:12:49 +0000
> A> Commit:     Alan Somers <asomers@FreeBSD.org>
> A> CommitDate: 2025-06-27 15:54:41 +0000
> A>
> A>     sockstat: Add automatic column sizing and remove -w option
> A>
> A>     Refactor sockstat to dynamically size table columns based on
> content.
> A>     This eliminates the need for the -w option, which is now ignored
> A>     for backwards compatibility.
> A>
> A>     Numeric columns are now right-aligned for improved readability;
> A>     previously, they were left-aligned.
> A>
> A>     Unknown fields are now consistently shown as "??" instead of a mix
> A>     of "", "?", and "?" for output uniformity.
> A>
> A>     Sponsored by:   Google, LLC (GSoC 2025)
> A>     MFC after:      2 weeks
> A>     Reviewed by:    asomers
> A>     Pull Request:   https://github.com/freebsd/freebsd-src/pull/1720
> A> ---
> A>  usr.bin/sockstat/sockstat.1 |   6 +-
> A>  usr.bin/sockstat/sockstat.c | 622
> +++++++++++++++++++++++++++-----------------
> A>  2 files changed, 392 insertions(+), 236 deletions(-)
>
> The commit message looks promising, but so far the output of the program
> that I
> use daily has been made much worsr :(
>
> First, there is a spurious second newline on every line.  Even after the
> header
> line! How could that pass through minimal testing?
>

A second newline?  Do you mean that the output is double-spaced?  Because I
do not see that at all.


>
> Second, the default output now just inserts a huge whitespace "column" in
> the
> middle of the list, making it extermely wide.  Note, that before this
> change
> the default output was fitting into 80 char terminal.  Now it is not
> fitting
> and without any good reason to do so.
>

You shouldn't be seeing any column that's pure whitespace.  You might be
looking at the "PROTO" column, which is often wide because some sockets
show "stream (not connected)".  The "(not connected)" part isn't new;
that's always been there.  Does your "whitespace column" go away if you use
"-4" or "-6"?  If so, Damin do you think we could move "(not connected)"
into the "LOCAL ADDRESS" column?  It might fit better there.


>
> I really would prefer this reverted and re-tested by a wider audience
> before
> pushing it back in.
>

I'm sorry that your experience has been poor.  But I disagree that a full
reversion is warranted.


>
> --
> Gleb Smirnoff
>

--000000000000e9aebe063898a521
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_quote gmail_quote_container"><div dir=
=3D"ltr" class=3D"gmail_attr">On Fri, Jun 27, 2025 at 7:23=E2=80=AFPM Gleb =
Smirnoff &lt;<a href=3D"mailto:glebius@freebsd.org">glebius@freebsd.org</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=C2=
=A0 Hi,<br>
<br>
On Fri, Jun 27, 2025 at 03:59:32PM +0000, Alan Somers wrote:<br>
A&gt; commit 0726c6574f889507e5030173bf4c82c80911394d<br>
A&gt; Author:=C2=A0 =C2=A0 =C2=A0Damin Rido &lt;rido@FreeBSD.com&gt;<br>
A&gt; AuthorDate: 2025-06-12 09:12:49 +0000<br>
A&gt; Commit:=C2=A0 =C2=A0 =C2=A0Alan Somers &lt;asomers@FreeBSD.org&gt;<br=
>
A&gt; CommitDate: 2025-06-27 15:54:41 +0000<br>
A&gt; <br>
A&gt;=C2=A0 =C2=A0 =C2=A0sockstat: Add automatic column sizing and remove -=
w option<br>
A&gt;=C2=A0 =C2=A0 =C2=A0<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Refactor sockstat to dynamically size table column=
s based on content.<br>
A&gt;=C2=A0 =C2=A0 =C2=A0This eliminates the need for the -w option, which =
is now ignored<br>
A&gt;=C2=A0 =C2=A0 =C2=A0for backwards compatibility.<br>
A&gt;=C2=A0 =C2=A0 =C2=A0<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Numeric columns are now right-aligned for improved=
 readability;<br>
A&gt;=C2=A0 =C2=A0 =C2=A0previously, they were left-aligned.<br>
A&gt;=C2=A0 =C2=A0 =C2=A0<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Unknown fields are now consistently shown as &quot=
;??&quot; instead of a mix<br>
A&gt;=C2=A0 =C2=A0 =C2=A0of &quot;&quot;, &quot;?&quot;, and &quot;?&quot; =
for output uniformity.<br>
A&gt;=C2=A0 =C2=A0 =C2=A0<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0Google, LLC (GSoC 2025)<=
br>
A&gt;=C2=A0 =C2=A0 =C2=A0MFC after:=C2=A0 =C2=A0 =C2=A0 2 weeks<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 asomers<br>
A&gt;=C2=A0 =C2=A0 =C2=A0Pull Request:=C2=A0 =C2=A0<a href=3D"https://githu=
b.com/freebsd/freebsd-src/pull/1720" rel=3D"noreferrer" target=3D"_blank">h=
ttps://github.com/freebsd/freebsd-src/pull/1720</a><br>
A&gt; ---<br>
A&gt;=C2=A0 usr.bin/sockstat/sockstat.1 |=C2=A0 =C2=A06 +-<br>
A&gt;=C2=A0 usr.bin/sockstat/sockstat.c | 622 +++++++++++++++++++++++++++--=
---------------<br>
A&gt;=C2=A0 2 files changed, 392 insertions(+), 236 deletions(-)<br>
<br>
The commit message looks promising, but so far the output of the program th=
at I<br>
use daily has been made much worsr :(<br>
<br>
First, there is a spurious second newline on every line.=C2=A0 Even after t=
he header<br>
line! How could that pass through minimal testing?<br></blockquote><div><br=
></div><div>A second newline?=C2=A0 Do you mean that the output is double-s=
paced?=C2=A0 Because I do not see that at all.</div><div>=C2=A0</div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">
<br>
Second, the default output now just inserts a huge whitespace &quot;column&=
quot; in the<br>
middle of the list, making it extermely wide.=C2=A0 Note, that before this =
change<br>
the default output was fitting into 80 char terminal.=C2=A0 Now it is not f=
itting<br>
and without any good reason to do so.<br></blockquote><div><br></div><div>Y=
ou shouldn&#39;t be seeing any column that&#39;s pure whitespace.=C2=A0 You=
 might be looking at the &quot;PROTO&quot; column, which is often wide beca=
use some sockets show &quot;stream (not connected)&quot;.=C2=A0 The &quot;(=
not connected)&quot; part isn&#39;t new; that&#39;s always been there.=C2=
=A0 Does your &quot;whitespace column&quot; go away if you use &quot;-4&quo=
t; or &quot;-6&quot;?=C2=A0 If so, Damin do you think we could move &quot;(=
not connected)&quot; into the &quot;LOCAL ADDRESS&quot; column?=C2=A0 It mi=
ght fit better there.</div><div>=C2=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex">
<br>
I really would prefer this reverted and re-tested by a wider audience befor=
e<br>
pushing it back in.<br></blockquote><div><br></div><div>I&#39;m sorry that =
your experience has been poor.=C2=A0 But I disagree that a full reversion i=
s warranted.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">
<br>
-- <br>
Gleb Smirnoff<br>
</blockquote></div></div>

--000000000000e9aebe063898a521--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hLnx6Zypt19jMuku9qagy5xXxF-XPNvCH9Y1RoGK-Fqw>