Operating System - HP-UX
1833776 Members
2197 Online
110063 Solutions
New Discussion

npty and nstrpty kernel settings

 
SOLVED
Go to solution
Steve Sauve
Frequent Advisor

npty and nstrpty kernel settings

Hello all,
We are seeing alot of "connection reset by peer" errors. In searching around a bit we've found some HP docs that say we should up our npty and nstrpty settings. However, they all seem to have different numbers for the two settings (anywhere between 400 and 800). I'm guessing that this has to do with either personal preference and system size.
Could anyone give me a good feel for what these parameters are and what effect they have?
I realize that they control pseudo-terms and streamed pseudo terms, but don't see why I would be getting "drop" errors if they are too low (unless it really means that a new term couldn't start up).
Any info would be appreciated.

Thanks,
Steve
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: npty and nstrpty kernel settings

Ian_4
Honored Contributor
Solution

Re: npty and nstrpty kernel settings

npty: Specifies the maximum number of pseudo-tty data structures available on the system.

nstrpty: maximum number of streams based pseudo-tty data structures available
on the system (used by rlogind)

As far as I know if affect the nfile Max Number of simultaneously OpenFiles system-wide at any given time. Total number of slots it the file descriptor table, default=16*(nproc+16+maxusers)/1 0+32+2*(npty+nstrpty) recommended: to use default.

Note that npty parameter specify the number of ptys (pseudo ttys), default=60.
recommended: if you are using rlogin/telnet connections from clients to server then
increase npty up to the number of client users. Note: ptys are not used when using Oracle SQL*Net

I've rebuild my system kernel with these parameter settings: npty 500 and nstrpty 500. (that's another personal choice)


Ian.
Steve Sauve
Frequent Advisor

Re: npty and nstrpty kernel settings

As a follow up question, is there a way to see how many pty and nstrpty processes are running? I believe that a who would give me the number of pty, but what about nstrpty?

Steve
Ian_4
Honored Contributor

Re: npty and nstrpty kernel settings

Steve,

You can use ll /dev/pty*|wc -l to verify how many pty device files you have, and ps -ef|grep pty* | wc -l to the running ones . and ps -ef|grep nstrpty* |wc -l .
I did not test this out on my system I'm running home.
Have a nice weekend

Ian.
CHRIS_ANORUO
Honored Contributor

Re: npty and nstrpty kernel settings

Hi Steve,

I confirm Ian's contributions. You can sett npty=400, and nsptrpty=200. ll /dev/pty*|wc -l will give you listing of all pseudo terminals
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.