Date: Tue, 17 Jan 2012 13:30:13 GMT From: Jim Pirzyk <pirzyk@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/164081: sockstat not reporting all open sockets Message-ID: <201201171330.q0HDUDJR059703@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/164081; it has been noted by GNATS. From: Jim Pirzyk <pirzyk@FreeBSD.org> To: Jilles Tjoelker <jilles@stack.nl> Cc: bug-followup@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@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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201171330.q0HDUDJR059703>