- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- TMOUT cause scripts end?
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
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
тАО07-30-2010 06:09 PM
тАО07-30-2010 06:09 PM
It is going to set the variable TMOUT in /etc/profile with a value of 600 (10 minutes)
This setting will cause the script ends earlier than expected?
Solved! Go to Solution.
- Tags:
- TMOUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 06:12 PM
тАО07-30-2010 06:12 PM
Re: TMOUT cause scripts end?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 06:15 PM
тАО07-30-2010 06:15 PM
Re: TMOUT cause scripts end?
you can put # in the entry of TMOUT veriable line, so it will be visual at the end of script execution!
Regards
Deeos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 06:36 PM
тАО07-30-2010 06:36 PM
Re: TMOUT cause scripts end?
You can put a larger value of TMOUT in the user local .profile , or you can use in your script :
export TMOUT=50000
something large value.
And the timeout would not happen.
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2010 07:16 PM
тАО07-30-2010 07:16 PM
Re: TMOUT cause scripts end?
minutes, you should know the answer. (And
that method is more reliable than looking for
opinions here.)
> [...] set the variable TMOUT in
> /etc/profile [...]
For experimental purposes, you could set it
locally instead of for everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2010 12:02 AM
тАО07-31-2010 12:02 AM
Re: TMOUT cause scripts end?
No, in a real shell, TMOUT only checks idle shells, not scripts that are eating up CPU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2010 05:03 AM
тАО07-31-2010 05:03 AM
Re: TMOUT cause scripts end?
Aside from experimenting (which is a great way to learn), there is always the quick look at the manpages. In this case, the 'sh-posix(1)' manpages in the section about parameter substitution states that if TMOUT is "...set to a value greater than zero, the shell will terminate if a command is not entered within the prescribed number of seconds after issuing the PS1 prompt."
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2010 05:36 PM
тАО07-31-2010 05:36 PM
SolutionSo TMOUT is only meaningful when the shell is waiting for a user to type something. It is safe to set it in /etc/profile although 600 (10 minutes) seems a bit short. Users may be on a phone call and their idle session will terminate. Sysadmins will be particularly annoyed when troubleshooting problems and talking with users and their sessions terminate.
NOTE: Any user can change TMOUT to a larger number (or zero) in their own profile unless you make the TMOUT variable readonly.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2010 07:44 AM
тАО08-02-2010 07:44 AM
Re: TMOUT cause scripts end?
Bill, you are right!!!
Another question:
What happend with SFTP conections?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2010 10:03 AM
тАО08-02-2010 10:03 AM
Re: TMOUT cause scripts end?
I am assuming you mean: will SFTP connections timeout? The answer is no. SFTP, like rcp, ftp, rsync, etc, are just programs that can be started from a shell prompt. Once the new program starts (like SFTP), the shell stops running and does nothing until the kernel wakes up the shell. If the shell is not running, then the TMOUT counter is not running either. TMOUT is *only* for shell logins that are waiting at a prompt.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-24-2011 08:34 AM
тАО02-24-2011 08:34 AM