How do I see open sockets count (kern.ipc.maxsockets, but status)

Ruslan Ermilov ru at freebsd.org
Fri Jun 13 13:39:13 PDT 2003


On Fri, Jun 13, 2003 at 01:22:52PM -0700, Josh Brooks wrote:
> 
> Hello,
> 
> When I run out of files, I can see how many files are actually open by
> looking at the kern.openfiles sysctl.  This makes it easy to see if I am
> hitting my limit or not.
> 
> However, I am experiencing "No buffer space available" errors, and since I
> am not running out of mbufs:
> 
> netstat -m
> 1728/2496/34816 mbufs in use (current/peak/max):
>         1714 mbufs allocated to data
>         14 mbufs allocated to packet headers
> 677/1430/8704 mbuf clusters in use (current/peak/max)
> 3484 Kbytes allocated to network (13% of mb_map in use)
> 0 requests for memory denied
> 0 requests for memory delayed
> 0 calls to protocol drain routines
> 
> My natural choice is to increase:
> 
> kern.ipc.maxsockets: 16424
> 
> But before I do that, I want to see how many I am currently using.  So,
> whereas with open files I would simply check the kern.openfiles sysctl,
> how do I check how many sockets I currently have open ?
> 
In 5.x, there's the kern.ipc.numopensockets sysctl(8).
However, this is unlikely to fix your ENOBUFS problem.

: 55 ENOBUFS No buffer space available.  An operation on a socket or pipe
:      was not performed because the system lacked sufficient buffer
:      space or because a queue was full.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru at sunbay.com		Sunbay Software Ltd,
ru at FreeBSD.org		FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030613/8f15f136/attachment.bin


More information about the freebsd-hackers mailing list