HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sh sessions not getting cleared
Operating System - HP-UX
1838614
Members
3971
Online
110128
Solutions
Forums
Categories
Company
Local Language
back
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
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-02-2005 11:06 PM
04-02-2005 11:06 PM
sh sessions not getting cleared
Configuration:
================
HPUX 11.11
Problem:
========
customer has calling script when user oper login to system to monitor system status. (just check system performence and syslog etc thro menu)
When user exist the script and close the telnet session, then user oper initiated process are cleared.
if the user oper close the telnet session abruptly, then there is process -sh still running by the user oper.
Like below mentioned.
oper 6744 1 0 16:47:31 ? 10:31 -sh
oper 26199 16659 0 15:55:46 ? 0:00 -sh
it is not showing ? instead of tty device name, When user oper disconnect the session without properly exist.
Can any one assist how come over come above issue doing necssary changes..
I am attaching the script for ur reference ,
================
HPUX 11.11
Problem:
========
customer has calling script when user oper login to system to monitor system status. (just check system performence and syslog etc thro menu)
When user exist the script and close the telnet session, then user oper initiated process are cleared.
if the user oper close the telnet session abruptly, then there is process -sh still running by the user oper.
Like below mentioned.
oper 6744 1 0 16:47:31 ? 10:31 -sh
oper 26199 16659 0 15:55:46 ? 0:00 -sh
it is not showing ? instead of tty device name, When user oper disconnect the session without properly exist.
Can any one assist how come over come above issue doing necssary changes..
I am attaching the script for ur reference ,
INVENT
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2005 04:02 AM
04-03-2005 04:02 AM
Re: sh sessions not getting cleared
Hi Natesan,
Ask your customer to close the shell "properly" Else define shell timeout variable! I don't remember the variable name.
Regds
TT
Ask your customer to close the shell "properly" Else define shell timeout variable! I don't remember the variable name.
Regds
TT
Attitude (not aptitude) determines altitude.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2005 07:27 AM
04-03-2005 07:27 AM
Re: sh sessions not getting cleared
Your script must use the trap command. While the default is to terminate when the connection is trashed, this apparently is not working, so make sure that there is a specific action:
trap "exit" 1 2 3 15
Now if your script creates any temporary files, include this in the trap action statement:
trap "rm -f /var/tmp/mytempfile; exit" 1 2 3 15
In addition, you can always set a shell timeout by using:
export TMOUT=3600
Bill Hassell, sysadmin
trap "exit" 1 2 3 15
Now if your script creates any temporary files, include this in the trap action statement:
trap "rm -f /var/tmp/mytempfile; exit" 1 2 3 15
In addition, you can always set a shell timeout by using:
export TMOUT=3600
Bill Hassell, sysadmin
- Tags:
- trap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2005 07:15 PM
04-03-2005 07:15 PM
Re: sh sessions not getting cleared
Hi Bill,
Thanks for your reply.
trap exit sounds terminates the scripts if the telnet session disconnected .
Once agian thanks for your prompt reply.
Thanks for your reply.
trap exit sounds terminates the scripts if the telnet session disconnected .
Once agian thanks for your prompt reply.
INVENT
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP