Date: Sat, 28 Jun 2025 13:22:17 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Alan Somers <asomers@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: <aGBO-UADMkHomv20@cell.glebi.us> In-Reply-To: <CAOtMX2hLnx6Zypt19jMuku9qagy5xXxF-XPNvCH9Y1RoGK-Fqw@mail.gmail.com> References: <202506271559.55RFxWdm024724@gitrepo.freebsd.org> <aF9D_NPdWAT20cB2@cell.glebi.us> <CAOtMX2hLnx6Zypt19jMuku9qagy5xXxF-XPNvCH9Y1RoGK-Fqw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 27, 2025 at 08:35:18PM -0600, Alan Somers wrote: A> > First, there is a spurious second newline on every line. Even after the A> > header A> > line! How could that pass through minimal testing? A> > A> A> A second newline? Do you mean that the output is double-spaced? Because I A> do not see that at all. Figured out, this is not an extra newline, but a whitespace padding of the end of every line. So, every line has the same length as the longest one. So, my longest line is: root syslogd 2957 6 dgram /var/run/log <- [3646 7],[2737 4],[3595 3],[3557 13],[3173 3],[2547 8],[3042 3],[3003 8] Every other line is padded with whitespace to the same length. A> > Second, the default output now just inserts a huge whitespace "column" in A> > the A> > middle of the list, making it extermely wide. Note, that before this A> > change A> > the default output was fitting into 80 char terminal. Now it is not A> > fitting A> > and without any good reason to do so. A> A> You shouldn't be seeing any column that's pure whitespace. You might be A> looking at the "PROTO" column, which is often wide because some sockets A> show "stream (not connected)". The "(not connected)" part isn't new; A> that's always been there. Does your "whitespace column" go away if you use A> "-4" or "-6"? If so, Damin do you think we could move "(not connected)" A> into the "LOCAL ADDRESS" column? It might fit better there. Figured that out, too. The "whitespace column" is extended "LOCAL ADDRESS" due to one single socket: glebius telegram-d 3552 9 stream /tmp/fdadaa6adf6d2aa7396397755aab8248-TelegramDesktop ?? So in the new mode, sockstat formats all of the strings to fit the worst one, that's why its output is no so extremely wide. :( I definitely don't like it and prefer the old mode. I expect more unhappinness as more people would update their CURRENT to the new format. -- Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?aGBO-UADMkHomv20>