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.
This looks like something for the -net team.
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
What do you think?
Bjoern A. Zeeb Stop bit received. Insert coin for new game.
See what the submitetr thinks on staying with fstat and using sockstat.
Assign to me for the follow-up.
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
> 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
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.
Jeremie Le Hen
< jeremie at le-hen dot org >< ttz at chchile dot org >
Assign it bck to the masses; I think this needs further discussion.
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.
Jeremie Le Hen
Humans are born free and equal. But some are more equal than others.
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