| Summary: | [patch] [request] fstat(1): add socket endpoint information as in NetBSD and OpenBSD | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jeremie Le Hen <jeremie> | ||||||
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||||
| Status: | Closed FIXED | ||||||||
| Severity: | Affects Only Me | CC: | dch, jeremie, jlh | ||||||
| Priority: | Normal | Keywords: | patch | ||||||
| Version: | CURRENT | ||||||||
| Hardware: | Any | ||||||||
| OS: | Any | ||||||||
| Attachments: |
|
||||||||
Responsible Changed From-To: freebsd-bugs->freebsd-net This looks like something for the -net team. Hi, I have the feeling that we should not change fstat for this. we have socksts which gives the information already. In addition you can actually get the pointers from fstat easily for debugging and fstat does not have the line wrapping problems sockstat has with long ipv6 addresses. What do you think? -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. State Changed From-To: open->feedback See what the submitetr thinks on staying with fstat and using sockstat. Responsible Changed From-To: freebsd-net->bz Assign to me for the follow-up. Hi Bjoern,
On Fri, Oct 17, 2008 at 02:03:22PM +0000, Bjoern A. Zeeb wrote:
> I have the feeling that we should not change fstat for this. we have
> socksts which gives the information already. In addition you can
> actually get the pointers from fstat easily for debugging and fstat
> does not have the line wrapping problems sockstat has with long ipv6
> addresses.
>
> What do you think?
I suppose you meant sockstat(1), didn't you? I agree that it actually
provides the information. But I noticed that I often install lsof from
ports because it can match processes by pid and uid and displays
detailled information about sockets. So I created this patch to
FreeBSD's fstat(1). Additionally, it makes its output closer to the
other BSD's.
Line wrapping is certainly a problem, I wasn't aware of this. However
I'm not sure the current fstat(1) is free from line wrapping problems.
On my 6.2 box (nothing else available right now) with a 80 columns
terminal, the longest line is 85 chars long.
Regards,
--
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
State Changed From-To: feedback->open Feedback received. Responsible Changed From-To: bz->freebsd-net Assign it bck to the masses; I think this needs further discussion. Hi, I've updated the patch so it compiles with -CURRENT. Also the proposed behaviour is opt-in through the -i option. This PR has been waiting for two years and a half. I propose that we try to find a consensus whether it is useful or not and then close it, no matter if it has been accepted or not. Regards, -- Jeremie Le Hen Humans are born free and equal. But some are more equal than others. Coluche For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped It's been a while... You can discard the fstat-i.diff patch attached to the bug entry. I've created a new version on Phabricator: https://reviews.freebsd.org/D21880 Keyword:
patch
or patch-ready
– in lieu of summary line prefix:
[patch]
* bulk change for the keyword
* summary lines may be edited manually (not in bulk).
Keyword descriptions and search interface:
<https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
I believe this was committed in https://svnweb.freebsd.org/base?view=revision&revision=353769 Jeremie thanks for your patience, I found this very useful! |
This patch adds socket details to AF_INET/AF_INET6 output of fstat. Currently, we have an output like this: root sshd 721 3* internet stream tcp c3f08e10 tataz ssh 1271 3* internet stream tcp c4611870 With this patch, we have: root sshd 721 3* internet stream tcp c3f08e10 *:22 tataz ssh 1271 3* internet stream tcp c4611870 192.168.1.3:50995 <-> 192.168.1.2:22 Fix: The patch below implements this behaviour. It has been ported from NetBSD and OpenBSD. Note that due to lack of inet6 connectivity, I couldn't test the AF_INET6 case.