Bug 251291 - sockstat(1) - use -w option to also make COMMAND column wider
Summary: sockstat(1) - use -w option to also make COMMAND column wider
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-11-21 15:15 UTC by Slawomir Wojciech Wojtczak
Modified: 2022-12-05 02:52 UTC (History)
1 user (show)

See Also:


Attachments
Without and with option -w (wider field size for displaying addresses) (1.46 KB, text/plain)
2022-12-05 02:51 UTC, Graham Perrin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2020-11-21 15:15:07 UTC
Just an idea.

As -w option for sockstat(1) provides wider field size for displaying addresses it can also be used to increase the width of COMMAND column as process names are often cut.

% sockstat -l -4   
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
unbound  local-unbo 26332 5  udp4   127.0.0.1:53          *:*
unbound  local-unbo 26332 6  tcp4   127.0.0.1:53          *:*
root     wpa_suppli 42380 4  udp4   *:*                   *:*

Regards.
Comment 1 Slawomir Wojciech Wojtczak 2021-05-10 09:30:10 UTC
Should I close it?

No need to improve that?
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-12-05 02:51:13 UTC
Created attachment 238523 [details]
Without and with option -w (wider field size for displaying addresses)

sockstat -lL -4

sockstat -lLw -4

Output from the latter could be tidier.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-12-05 02:52:59 UTC
(In reply to Graham Perrin from comment #2)

> Output from the latter could be tidier.

Output from _both_ commands could be tidier (columns in disarray) …