Operating System - HP-UX
1844005 Members
3898 Online
110226 Solutions
New Discussion

cannot allocate pty in syslog

 
SOLVED
Go to solution
Cindy Wolford
Frequent Advisor

cannot allocate pty in syslog

Hi,

HP UX 10.20 (no laughing)
K420 server

This is the 2nd time this has happened so I guess I need to check the system out.

Users began calling that they could not log on. They did not get an error, no prompt...just a blinking cursor.

All users use either Hyperterm or NetTerm to connect.

I killed idle users off of the system which seemed to allow other users to log in.

I checked syslog and saw "Cannot allocate pty" about a 100 times....during the time that users were complaining.

I can't seem to find out what this means....and not exactly sure why the system is allocating pty when I see users are always tty.....

I had installed unlimited users a while ago.

Some kernel settings:
maxusers 200
npty 200
nstrpty 60

There were an estimated 65 users on the system when this error started.

NOW, we originally had a UNIX 60-user license....is there a setting somethere that I missed that needs to be updated?

Any help I would greatly appreciate......and now back to the forums for more searching....

TIA
Cin
5 REPLIES 5
IT_2007
Honored Contributor

Re: cannot allocate pty in syslog

Your kernel table is full and won't allow to create new sessions. Reboot server or wait till some body logs out.
A. Clay Stephenson
Acclaimed Contributor

Re: cannot allocate pty in syslog

Go into sam increase nstrpty, npty, and nstrtel and generate a new kernel and reboot. Note that maxusers is not actually a kernel tunable but simply a variable that is used in some of the default formulae for kernel tunables -- which typically should be replaced by hard values anyway.
If it ain't broke, I can fix that.
Cindy Wolford
Frequent Advisor

Re: cannot allocate pty in syslog

Hi again,

Kernel params are currently:

maxuprc 597
maxusers 200
npty 200
nstrpty 60

don't see nstrtel.....


how do I know what is good to change and by how much? (let me guess, read the manual...)
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: cannot allocate pty in syslog

Bump npty to 200 to match nstrpty. Normally these values go up in sync with one another.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: cannot allocate pty in syslog

The man page for pty will help but probably more confusing than necessary. Suffice it to say that unless your users are connecting by modem or using RS-232 serial connections, they are indeed using pseudo terminal device files (pty's) when they telnet to your system.

Use SAM to make both npty and nstrpty equal to 500. SAM will properly set the parameters *and* ctreate the needed device files. A reboot will occur as you exit SAM.

Here are explanations of the parameters:

maxuprc 597
maximum number of processes that can be run by the same user (multiple logins count as the same user)

maxusers 200
A phoney parater that is used to size other parameters. It is not a license or a counter to user logins -- it is just a crutch used to set parameters that currently have a formula. Most sysadmins replace the formula with a real number.

npty 200
nstrpty 60

These are the quantity of pseudo terminals that can be logged on. The npty is for the classic pty driver while the nstrpty is the streams-based pty driver. Your (very old) version is caught in the middle of HP-UX migration from classic pty code to streams-based code. Just make them the same. Each login session will use a pty device. The devices are released when a normal logout takes place. Some sessions may be hung due to network or PC crashes and these ptys won't be released. It's always a good idea to have a lot of extras. There's no significant impact for having a lot of ptys.


Bill Hassell, sysadmin