Bug 251291

Summary: sockstat(1) - use -w option to also make COMMAND column wider
Product: Base System Reporter: Slawomir Wojciech Wojtczak <vermaden>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Some People CC: grahamperrin
Priority: --- Keywords: needs-patch, needs-qa
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Without and with option -w (wider field size for displaying addresses) none

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) …