Showing results for 
Search instead for 
Do you mean 

Unable to get pty

SOLVED
Go to Solution
Advisor

Unable to get pty

Hi all,

We recently started receiving this message and I was wondering what the fix might be. I another user that posted this exact same problem back in Oct 2000. I ensured that the permissions on /usr/dt/bin/dtterm were:
-r-sr-xr-x (they are). I also ran dr_dt and received no an error about hostname and a warning about the /etc/named file does not match the correct permissions. We are running HP-UX 10.20. Any help is appreciated. Thanks!

Andre

12 REPLIES
Respected Contributor Respected Contributor

Re: Unable to get pty

I'm wondering if you are running out of available ptys. Does this happen during heavy use of the system?

try increasing npty kernel parameter.

just a thought
"Do what you love and you will never work a day in your life." - Confucius
Honored Contributor Honored Contributor

Re: Unable to get pty

When are you getting this error message?.

Check the permissions on /usr/dt/bin/dtterm if you are getting it when you are trying to open dt/xterms. The permissions on dtterm are supposed to be -r-sr-xr-x . Also, check the permissions over /dev/pty*. The group should be tty. Try insf -e.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Advisor

Re: Unable to get pty

Yes, it does seem to happen when the system is heavily used. The error started occuring about a week ago and now it's a daily event. My npty value is currently at 4200. Is there a recommended value that this should be set to? Also, if I change this through SAM, would it, in turn, adjust other values accordingly? I rebuilding the kernel will be required. Thanks....

Andre
Respected Contributor Respected Contributor

Re: Unable to get pty

do you have more than 4200 connections? You need 1 pty per connection.

take a look at this thread... especially the answer by Ian about finding out how many pty processes you have running.

"Do what you love and you will never work a day in your life." - Confucius
Respected Contributor Respected Contributor

Re: Unable to get pty

do you have more than 4200 connections? You need 1 pty per connection.

take a look at this thread... especially the answer by Ian about finding out how many pty processes you have running.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x51d5f841489fd4118fef0090279cd0f9,00.html
"Do what you love and you will never work a day in your life." - Confucius
Advisor

Re: Unable to get pty

Hi all,

I read Ian's posts and ran the commands that were listed. Here are the results as of 12:30pm EST:

ll /dev/pty* | wc -l
16095

ps -ef | grep pty* | wc -l
77

ps -ef | grep nstrpty* | wc -l
1

I'm still getting my feet wet in Unix so if I seem to stumble a bit please bear with me. We also have a lof of other filesystems mounted and I was wondering if they are being counted as well. Also, if I adjust the npty and nstrpty values through SAM, what other configuration values will be adjusted? I really appreciate all the help that I've received. Thanks!
Respected Contributor Respected Contributor

Re: Unable to get pty

it does not seem that you are running out of pty... you have more than enough...

If it is still giving you an error at this level of use then that is not the problem. If the connections increase above your limit and then you get the error, then i would increase the numbers... not now...

I'll have to think of what else to try...

sorry, wrong guess.
"Do what you love and you will never work a day in your life." - Confucius
Respected Contributor Respected Contributor

Re: Unable to get pty

I just notices someting... you looked for the number of /dev/pty ... can you please issue the same command to get the number of /dev/ttyp* and post the values...

#ll /dev/ttyp* | wc -l

Take a look at this message i found on the hp developers website... I think my original hunch might be right after all, but i was pointing you to the wrong type of pty...

--------
| I am facing a problem with hp-ux 11 m/c.
| Whenever I start x-windows and open terminal, am getting the error
| "Unable to get PTY"
| However,I am able to do a telnet since it uses a tty
| For your info.: The number of users/terminals opened are well under the
| limit.


This is really off-topic for cxx-dev. You should take this kind of OS
question to http://forums.itrc.hp.com/cm/ or news:comp.sys.hp.hpux .


There are actually three different types of ptys in HP-UX 11.00. You
can see them all among the output of lsdev-


Character Block Driver Class
16 -1 ptym ptym
17 -1 ptys ptys
139 -1 telm strtelm
140 -1 tels strtels
156 -1 ptm strptym
157 -1 pts strptys


The telnet connection uses "telnet stream" ptys. The slave side of those
appear as /dev/pts/t*. The dtterm and hpterm terminals use "stream" ptys.
The slave side of those appear as /dev/pts/[0-9]*. The xterm terminal uses
plain old ptys. The slave side of those appear as /dev/ttyp*. Each type
of pty has different kernel parameter limits and different device files.
Check the kernel parameters and try recreating the device files with insf.

"Do what you love and you will never work a day in your life." - Confucius
Honored Contributor Honored Contributor

Re: Unable to get pty

Hello,

I think we have run into this problem before with systems here. The problem wasn't the npty parameter as it was set plenty high. Our problem was that we had to do an 'insf -e' to get the additional pty devices created. I ran into this problem last month with a new system that I cloned via Ignite-UX. Everything was great until about 70-80 people opened telnet sessions. The 'insf -e' fixed things quick for us.

JP
Respected Contributor Respected Contributor

Re: Unable to get pty

Yes, John brings up an important point...

just because you change the values in the kernel for the 3 type of ptys that doesn't create the dev files. You have to:

#insf -evd ptys -n (number in kernel)
#insf -evd ptym -n (number in kernel)
#insf -evd pts -n (number in kernel)

"Do what you love and you will never work a day in your life." - Confucius
Advisor

Re: Unable to get pty

John/Edward,

I did the 'insf' command with the e,v,d and n options (with the values set in the kernel) and so far it looks like it's working fine. I was able to open more than five different windows (which I could not do before) without the error. I'll monitor this for a few days and post back to let you know the status. Thanks again for everything.

Andre
Advisor

Re: Unable to get pty

Hi all...

It's been almost a week since I applied the solutions that were suggested and everything is working great. Thanks again for all of your help.

Andre