Bug 282978 - sockstat doesn't use a wide enough field for the inp_gencnt column
Summary: sockstat doesn't use a wide enough field for the inp_gencnt column
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
: 156768 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-11-25 22:03 UTC by Alan Somers
Modified: 2024-12-24 16:27 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2024-11-25 22:03:54 UTC
If inp_gencnt is very large, then it can abut the CC column with no space.  For example:

$ sockstat -4 -cC -i -P tcp -q | head -n1
root     PROGNAME   94282 12  tcp4   10.2.172.93:11000     XX.XXX.XXX.XXX:14704  367447121cubic
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2024-11-29 15:52:49 UTC
https://reviews.freebsd.org/D47840
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-12-04 18:35:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fbd3448614fbd7bd92e7d34c3bfd2592a07391e3

commit fbd3448614fbd7bd92e7d34c3bfd2592a07391e3
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-04 01:12:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-04 16:22:50 +0000

    sockstat: Ensure that there is always a space between columns

    PR:             282978
    Reviewed by:    asomers
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D47840

 usr.bin/sockstat/sockstat.c | 56 ++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 23 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-12-18 13:47:23 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=60786eb3fe7fc0198baba9b153eec7fa5af1f9e9

commit 60786eb3fe7fc0198baba9b153eec7fa5af1f9e9
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-12-04 01:12:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-12-18 13:43:34 +0000

    sockstat: Ensure that there is always a space between columns

    PR:             282978
    Reviewed by:    asomers
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D47840

    (cherry picked from commit fbd3448614fbd7bd92e7d34c3bfd2592a07391e3)

 usr.bin/sockstat/sockstat.c | 56 ++++++++++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 23 deletions(-)
Comment 4 Mark Johnston freebsd_committer freebsd_triage 2024-12-24 16:27:05 UTC
*** Bug 156768 has been marked as a duplicate of this bug. ***