The following reply was made to PR bin/164081; it has been noted by GNATS. From: Jilles Tjoelker <jil...@stack.nl> To: bug-follo...@freebsd.org, pir...@freebsd.org Cc: Subject: Re: bin/164081: sockstat not reporting all open sockets Date: Sat, 14 Jan 2012 01:03:34 +0100
> [netstat reports sockets that sockstat does not] 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. This does appear to be intended, although it is surprising and not documented very well. -- Jilles Tjoelker _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"