- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- unable to get pty
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2008 11:49 PM
тАО05-25-2008 11:49 PM
I connect to HP-UX server version 11.11 using XDMCP (Xmanager) and I got a terminal warning "unable to get pty" that prevent the prompt to be appeared and I can't run any command.
This case is recovered if I reboot the server and appears again after a few days.
This restart is not acceptable as the server in operation.
Please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 12:31 AM
тАО05-26-2008 12:31 AM
Solutioninsf -e
You may need to increase the number of terminal sessions available. The default is 60. nstrel in the kernel
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 12:40 AM
тАО05-26-2008 12:40 AM
Re: unable to get pty
Hello Steven,
Kindly tell me what should I do in details as I am new in Unix.
Your reply is highly appreciated.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 12:57 AM
тАО05-26-2008 12:57 AM
Re: unable to get pty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 01:05 AM
тАО05-26-2008 01:05 AM
Re: unable to get pty
I assume restarting once to fix the kernel config is acceptable?
>ahsan: I think it's "nstrtel"
Yes. Though npty(5) and nstrpty(5) may also need to be increased.
>tell me what should I do in details
You need to go into SAM and go into the kernel configuration changes menu and change the above 3 variables to 120 or 200. (If they are currently 60.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 01:11 AM
тАО05-26-2008 01:11 AM
Re: unable to get pty
Dear All,
Thanks for your interest.
Whatever its nstrel or nstrtel, I don't know what I should do with it as I told you before I am new in Unix.
Please help me with more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 01:31 AM
тАО05-26-2008 01:31 AM
Re: unable to get pty
Dear Dennis,
Thanks for your response.
How I go into SAM and also the kernel menu?
And how to change these values?
Please be patient as this is my first step in unix and face this problem.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 03:05 AM
тАО05-26-2008 03:05 AM
Re: unable to get pty
2)type sam on prompt
#sam
3)terminal version sam window ill open
press enter to get in
4)select kernel configuration
and then select configurable parameters
4)select the kernel parameters by pressing space bar (one at a time)
5)after selecting each parameters that need to change (press TAB and select actions) then select modify tunable parameter and give required value
repeat this step for all three parameters and finally on action menu select the option process new kernel ...
it will ask you the confirmation for reboot
once you did this ur system will reboot with new kernel
Thanks !!
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 03:55 AM
тАО05-26-2008 03:55 AM
Re: unable to get pty
Dear johnsonpk ,
Thank you very very very much.
The reason of this problem that many people connect through XDMCP sessions to an application on the server but they incorrectly close the session so the sessions are still opened.
I set the 3 parameters to 120 so I expect that the problem return after a longer period.
Then I want to know a way to kill these sessions without the need to make reboot.
Again many thanks to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 04:43 AM
тАО05-26-2008 04:43 AM
Re: unable to get pty
Do you have an example of a left-over session?
You might be able to use "who -u". For users with a very long time since active "activity" field, you can attempt to kill the process tree.
# UNIX95= ps -Hfu user-name
This will list all of the process trees for "user-name".
You might want to provide the "who -u" output along with the ps(1) output so we can verify what to do next. Please attach a .txt file. (I'm not sure the "retain format" box will work good enough.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2008 10:32 PM
тАО05-31-2008 10:32 PM
Re: unable to get pty
Dear Dennis,
Thanks for your response and sorry to be late.
the the result of "ps -fu" command for user named "noc" is attached.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2008 10:57 PM
тАО05-31-2008 10:57 PM
Re: unable to get pty
You need to use this exact command, so -H works.
UNIX95= ps -Hfu noc
noc seems to have a bunch of old (May 27):
/usr/dt/bin/dtexec -open ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-31-2008 11:17 PM
тАО05-31-2008 11:17 PM
Re: unable to get pty
Dear Dennis,
It seems that my system doesn't support this option.
I got this error "ps: illegal option -- H".
Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 02:02 AM
тАО06-01-2008 02:02 AM
Re: unable to get pty
Are you using a real shell? Did you type the line exactly how I showed:
UNIX95= ps -Hfu noc
You can also add "-x" to get more of the command lines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 02:11 AM
тАО06-01-2008 02:11 AM
Re: unable to get pty
Dear Dennis,
Thanks for your interest.
Really, I ran the command without "UNIX95=",
so kindly tell me what does it mean?
The results of "UNIX95= ps -Hfu noc" and "UNIX95= ps -Hxfu noc" are attached.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 02:23 AM
тАО06-01-2008 02:23 AM
Re: unable to get pty
It basically temporarily exports UNIX95 during the ps(1) command. Exporting this causes commands to conform to UNIX 95 Standard and makes available extra ps(1) options like -A, -C, -c, -g, -j, -n, -o, -s, -U, -H and -x.
The reason you don't export it permanently is there are all sorts of side effects for other commands. :-)
>The results of ... are attached.
Please provide a simple .txt file with both outputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 02:34 AM
тАО06-01-2008 02:34 AM
Re: unable to get pty
Dear Dennis,
The file is attached.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 03:50 AM
тАО06-01-2008 03:50 AM
Re: unable to get pty
You have a bunch of these old processes whose parent is init, 1:
/usr/dt/bin/dtexec -open -1 ... /home/noc/xnmevents.sh
Do you know that that xnmevents.sh script does?
Is this something to do with OpenView?
You seem to have one that its still active:
noc 11291 11289 /usr/dt/bin/dtexec ... /home/noc/xnmevents.sh
noc 11292 11291 /bin/sh /home/noc/xnmevents.sh
noc 11293 11292 /opt/OV/bin/xnmevents
Perhaps you can fix it so when xnmevents.sh dies, it kills its parent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 04:39 AM
тАО06-01-2008 04:39 AM
Re: unable to get pty
Dear Dennis,
The script just execute the "xnmevents" command which launch the OpenView Alarm Browser.
But I don't know how to kill this process when the "xnmevents.sh" dies.
any way, Is there any way to kill these processes manually?
Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 09:44 PM
тАО06-01-2008 09:44 PM
Re: unable to get pty
Any reason you need this since it causes so many problems?
>But I don't know how to kill this process when the "xnmevents.sh" dies.
I suppose you could have a trap for signal 1 (SIGHUP) and then wait N seconds and then kill your parent, since he is unmutual?
>Is there any way to kill these processes manually?
Well, that should be easy. If there is more than one, and it is old, just use kill on that dtexec process.
If that fails, use "kill -9".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 10:36 PM
тАО06-01-2008 10:36 PM
Re: unable to get pty
Dear Dennis,
Thanks for your patience.
This script was made to allow our NOC agents to open and monitor the Alarm Browser but the problem that they don't correctly close the XDMCP session or the session hangs then he open another one.
Could you please tell me how to modify the script using the mentioned signal trap and how to make it wait N seconds?
I don't konw what I should do.
Please help and many thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2008 11:32 PM
тАО06-01-2008 11:32 PM
Re: unable to get pty
What's in xnmevents.sh now?
I assume you would add:
LOGFILE=/var/tmp/xnmevents.log
function catch_sighup {
echo "$0: SIGHUP $(date +'%Y%m%d.%H%M%S')" >> $LOGFILE
echo "$0: My PID: $$, parent $PPID" >> $LOGFILE
exit 1
}
And before you execute xnmevents:
trap catch_sighup HUP
This currently logs but doesn't kill its parent. After collecting the log for a few times, we can see where to go next.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 03:00 PM
тАО06-02-2008 03:00 PM
Re: unable to get pty
I tried it out, it seems to log SIGHUP.
You could try kill and if that fails, kill -9:
# kill dtexec parent to cleanup
kill $PPID
sleep 30
# See if dtexec died?
kill -0 $PPID
if [ $? -eq 0 ]; then # still there
kill -9 $PPID
fi
exit 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 10:43 PM
тАО06-02-2008 10:43 PM
Re: unable to get pty
Dear Dennis,
Many Thanks for your interest.
But really I am new in Unix and I don't know where to put these commands in the script and how the script will know that the session was terminated in order to kill its process.
Attached is the script.
Kindly write this script to me and I will appreciate this effort.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2008 11:43 PM
тАО06-02-2008 11:43 PM
Re: unable to get pty
function catch_sighup {
# logging for SIGHUP
echo "$0: SIGHUP $(date +'%Y%m%d.%H%M%S')" >> $LOGFILE
echo "$0: My PID: $$, parent $PPID" >> $LOGFILE
exit 1 # Remove if you want to kill
# kill dtexec parent to cleanup
kill $PPID
sleep 30
# See if dtexec died?
kill -0 $PPID
if [ $? -eq 0 ]; then # still there
kill -9 $PPID
fi
exit 1
}
Let it run with just logging for a few times.
If you want it to kill, remove that first "exit 1".
If you don't want it to log, you can comment out those "echo"s.