bin/164081: sockstat not reporting all open sockets
Jim Pirzyk
pirzyk at FreeBSD.org
Tue Jan 17 13:30:13 UTC 2012
The following reply was made to PR bin/164081; it has been noted by GNATS.
From: Jim Pirzyk <pirzyk at FreeBSD.org>
To: Jilles Tjoelker <jilles at stack.nl>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/164081: sockstat not reporting all open sockets
Date: Tue, 17 Jan 2012 08:13:59 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
So maybe in light of that, we should change this ticket to update the =
man page to document this case too?
- - JimP
On Jan 13, 2012, at 7:03 PM, Jilles Tjoelker wrote:
>> [netstat reports sockets that sockstat does not]
>=20
> The sockstat utility checks all file descriptors open by all processes
> looking for sockets, while netstat shows all kernel-level sockets. =
This
> may mismatch in many ways: a process may have closed its descriptor =
but
> TCP still needs to maintain some state like TIME_WAIT (as mentioned in
> the sockstat(1) man page), multiple descriptors may exist for a single
> socket and kernel code (like nlockmgr) may use the socket(9) API
> directly so there is no descriptor. However, any socket file =
descriptor
> shown by sockstat must correspond to a kernel-level socket shown by
> netstat.
>=20
> This does appear to be intended, although it is surprising and not
> documented very well.
>=20
> --=20
> Jilles Tjoelker
- --- @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $
__o jim at pirzyk.org =
--------------------------------------------------
_'\<,_
(*)/ (*) I'd rather be out biking.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
iFcDBQFPFXQXUQdE3d8ckhQRCP3wAPsEXLol7rjYJ9MQAHrjGZY7t6eKpG8NV5NV
o6kWM0DGRwEA1EgXqSlVwl2maY0bnnYz502rT6WZE6V2r+gA5QOM4S8=3D
=3DrilP
-----END PGP SIGNATURE-----
More information about the freebsd-bugs
mailing list