From: Eric Dumazet <dada1@cosmosbay.com>
To: David Shwatrz <dshwatrz@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Inconsistency in number of Unix sockets
Date: Tue, 30 Jun 2009 13:29:03 +0200 [thread overview]
Message-ID: <4A49F6FF.60608@cosmosbay.com> (raw)
In-Reply-To: <31436f4a0906290737w7eba05a7r5e2ab96b4b2838a2@mail.gmail.com>
David Shwatrz a écrit :
> Hello,
>
> On kernel 2.6.29.4-167: (Fedora 11):
>
> Why is this inconsistency in number of Unix sockets, when running the following:
>
> cat /proc/net/protocols | grep UNIX
> UNIX 432 986 -1 ....
>
> lsof -U | wc -l
> 989
>
> netstat --unix | wc -l
> 906
>
> cat /proc/net/unix | wc -l
> 986
>
> On which of this statistics should we rely when we want to know how
> many Unix Domain sockets do we have ? There is a variable named unix_nr_socks,
> but AFAIK, the patch which used it (for /proc/net/protocols ) was
> reverted lately.
Pick your own definition of what is "the number of unix sockets".
"lsof -U | wc -l " cannot be right because of shared file descriptors
(one socket shared by several processes)
"netstat --unix" seems to not display some sockets (which names dont
start by / or @ , like in "private/smtp")
If you use "netstat --unix --all", then all sockets are displayed.
>
> commit 1748376b6626acf59c24e9592ac67b3fe2a0e026
> by Eric Dumazet <dada1@cosmosbay.com>
You didnt understand this patch.
Information is still available in /proc/net/protocols
$ grep UNIX /proc/net/protocols
UNIX 432 98 -1 NI 0 yes kernel n n n n n n n n n n n n n n n n n n n
$ wc -l /proc/net/unix
99 /proc/net/unix
prev parent reply other threads:[~2009-06-30 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-29 14:37 Inconsistency in number of Unix sockets David Shwatrz
2009-06-30 11:29 ` Eric Dumazet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A49F6FF.60608@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=dshwatrz@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).