1833776 Members
2241 Online
110063 Solutions
New Discussion

Running out of PTYs

 
SOLVED
Go to solution
Kevin Liquori_1
Regular Advisor

Running out of PTYs

I have a developer whose application is generating errors that there are no more pty's left.
1) I don't see any such error in syslog.log. Wouldn't I normally see it there?
2) Are the only two kernel parameters controlling pseudoterminals npty and nstrpty?
3) Is there a difference between total number of pty's available to all users and total pty's available to a single user?

Thanks...Kevin
3 REPLIES 3
PIYUSH D. PATEL
Honored Contributor
Solution

Re: Running out of PTYs

Hi,

You are running out of pts drivers on the server. Do this

a) Check the number of pty/s drivers that are created in /dev/pty and /dev/pts :-
# ls *|wc -l
Most likely you'll get 60 (ie the default).

b) Increase the count to say 200
# cd /dev
# insf -n200 -dpty0
# insf -n200 -dpty1
# insf -d pts -s 200 -e

c) Now try to login again.

HPUX 11 introduced the 'nstrtel' parameter which must also be utilised.

# cd /dev
# insf ???d pty ???s 1024 ???e ???v
# insf ???d ptm ???s 1024 ???e ???v
# insf -d telm ???s 1024 ???e ???v
# insf -d tels ???s 1024 ???e -v

The two kernel parameters controlling pseudoterminals are npty and nstrpty

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)

The errors based on pty are not logged in syslog.log

Piyush

PIYUSH D. PATEL
Honored Contributor

Re: Running out of PTYs

Hi,

npty is present in 10.2 and 11.x both

nstrpty is present only in 11.x ( Streams based pseudo terminals )

Piyush
Bill Hassell
Honored Contributor

Re: Running out of PTYs

The number of available pty's is controlled by 2 functions: the number of device files and the kernel parameter. Both must be increased at the same time. While you can manually create a new kernel with npty (and nstrpty for 11.0/11.11) and then run insf, it's a lot easier just to have SAM do it. Change the ntpy (nstrpty and nstrtel) and SAM will create the device files automatically.


Bill Hassell, sysadmin