From owner-freebsd-bugs@FreeBSD.ORG Tue Jan 17 13:30:13 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 372991065673 for ; Tue, 17 Jan 2012 13:30:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 264F08FC0C for ; Tue, 17 Jan 2012 13:30:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0HDUD9t059706 for ; Tue, 17 Jan 2012 13:30:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0HDUDJR059703; Tue, 17 Jan 2012 13:30:13 GMT (envelope-from gnats) Date: Tue, 17 Jan 2012 13:30:13 GMT Message-Id: <201201171330.q0HDUDJR059703@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Jim Pirzyk Cc: Subject: Re: bin/164081: sockstat not reporting all open sockets X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jim Pirzyk List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2012 13:30:13 -0000 The following reply was made to PR bin/164081; it has been noted by GNATS. From: Jim Pirzyk To: Jilles Tjoelker 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-----