- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: Idle User's timeout
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-08-2010 01:57 PM
тАО06-08-2010 01:57 PM
Idle User's timeout
In tru64 5.1b, latest patch kit. informix installed. some users login to the server and leave the informix Application, which is running automatically once the user logs in, Idle for hours. i want to kill whoever doing that.
in "w" command output, IDLE is showing the IDLE time for each user. but i am not able to do any script which can AWK that column and killing that user's processes.
can you help me doing that?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2010 07:17 PM
тАО06-08-2010 07:17 PM
Re: Idle User's timeout
It might be easier if we could see some of
your "w" command output.
Note that some shells use a TIMEOUT or TMOUT
variable to control auto-logout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2010 09:39 PM
тАО06-08-2010 09:39 PM
Re: Idle User's timeout
w output is not fixed. it keeps vary rapidly with user activity.
TMOUT and TIMEOUT is for idle users which has no running process at all. but in our case, i have a running application as i mentioned above.
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 12:55 AM
тАО06-09-2010 12:55 AM
Re: Idle User's timeout
put this in a file, chmod it to executable, create a cron entry in crontab every 2 hours to execute this script.
################ kill users with more than 1 hour idle ###############
for hours in `who -u | awk -F " " '{ print $6"-"$7 }' |grep :`
do
echo $hours>/tmp/hours
idle=`awk -F "-" '{ print $1}' /tmp/hours | awk -F ":" '{ print $1 }'`
ID=`awk -F "-" '{ print $2}' /tmp/hours`
if [ $idle -ge 1 ]
then
echo "$ID will be killed"
kill -9 $ID
fi
done
###############################################################
thanks
kamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 02:51 AM
тАО06-09-2010 02:51 AM
Re: Idle User's timeout
I was hoping for a sample, not everything for
all time.
> kill -9 $ID
"kill -9" is not the first thing I'd try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2010 10:51 PM
тАО06-09-2010 10:51 PM
Re: Idle User's timeout
thanks for your comment, it will be so appreciated if you share us any other idea.
thanks
kamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2010 02:00 AM
тАО06-10-2010 02:00 AM
Re: Idle User's timeout
Before I hit a process over the head with the
big club ("kill -KILL"), I'd start with
something a little more gentle, like, say,
"kill -TERM", then wait a few seconds, and
see it it's still there.
I know nothing about your "informix
Application", but some programs will die more
cleanly if you ask them nicely.
If the gentle method fails, _then_ I'd fall
back to using the big club.