1844574 Members
1837 Online
110233 Solutions
New Discussion

Number of socket

 
SOLVED
Go to solution
Jorge Prado T
Contributor

Number of socket

hi,
In HP-UX 11i?
As is controlled the number of socket opened by an application? a user? or the complete system?

Thank in advance

Jorge Prado T.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Number of socket

Because sockets are implemented as file descriptors both per-process (maxfiles_lim) and system-wide limits (nfile) can apply. There can also be other causes. The best approach to narrowing your problem is to capture or note the errno value (often the exit status of a well-written program). You then examine the file /usr/include/sys/errno.h and match your errno numerical value to a symbolic value(e.g 12 == ENOMEM). Finally, do a man 2 socket and find the error that matches your errno. That's UNIX problem solving kindergarten.
If it ain't broke, I can fix that.
Sandman!
Honored Contributor

Re: Number of socket

It is controlled on a global basis with the "nfile" kernel parameter and on a per process basis with the "maxfiles_lim" parameter. This is because a socket looks like a standard file You can view it with the following command:

# kmtune -q nfile

# kmtune -q maxfiles_lim

cheers!