- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 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
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
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
тАО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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2008 12:06 AM
тАО06-03-2008 12:06 AM
Re: unable to get pty
Dear Dennis,
What did you mean with the phrase (If you want it to kill, remove that first "exit 1".
)?
I should write this script one time and it will be executed automatically when the user login. Please clarify?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2008 10:39 AM
тАО06-03-2008 10:39 AM
Re: unable to get pty
I have no idea if what I have will work. I don't know what the signal is. So we need to try it for awhile.
>I should write this script one time and it will be executed automatically when the user login.
That's the assumption.
I had another thought if you want to experiment.
You may want to replace what you have by:
/opt/OV/bin/xnmevents < /dev/null > /dev/null 2>&1 &
And try to bring it up. If it never shows up or just flashes, then that won't work. If it comes up, try having the user close the session incorrectly and see if it goes away.
(Or while it is up, look at that "UNIX95= ps -Hfu noc" to see if dtexec is even there anymore?
- « Previous
- Next »