Re: [patch] networking ipv4: remove total socket usage count from /proc/net/sockstat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In article <[email protected]> (at Mon, 16 Jan 2006 17:33:59 -0500), Andy Gospodarek <[email protected]> says:

> On 1/16/06, Jesper Juhl <[email protected]> wrote:
> > >
> > Maybe if you described "your current problem" someone could suggest a
> > solution...
> >
> 
> Sure, I'd be glad to.  If I add up all the entries from the procfiles
> (in /proc/net) on my system
:
> I find there are a total of 54 sockets open on my system.
> 
> Now this seems to differ from the value in /proc/net/sockstat:
> # cat sockstat
> sockets: used 59
:
> So we are off by 5.  I added some code around the stat collection used
> in sockstat to get more detailed info about those sockets and the
> output is here.  The values are family[protocol family][socket
> family].
:
> Total = 59
> 
> All of these numbers match up with what we saw above, except the
> INET/RAW and INET6/RAW sockets.  It seems they aren't being counted
> correctly -- which accounts for the 5 missing sockets.  The
> decrementing of these values is in sock_release() and seems to get
> done correctly other times RAW sockets are created, but not for the 5
> sockets in question.

This is because we have several internal unhashed raw sockets in
kernel, which are not counted in the "raw" entry, but in "sockets."

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux