![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Killing idle users TIA | PapaBear | Shell Programming and Scripting | 2 | 01-14-2008 04:37 PM |
| HP-UX users get logged off while idle. | Laoinjo | UNIX for Advanced & Expert Users | 5 | 06-04-2007 12:28 PM |
| finding idle time of a process | Krrishv | Shell Programming and Scripting | 36 | 01-10-2007 09:34 AM |
| Idle users over 1 day | pbonilla | Shell Programming and Scripting | 1 | 11-27-2006 09:07 PM |
| Log off idle users | wtofu | AIX | 0 | 06-30-2005 10:38 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
finding idle users
I am trying to write a script that will list the idle users on my system which is running HPUX 11.11. The script is currently written as :
who -u > /home/rfm/scripts/user.txt echo " There are currently... " wc -l /home/rfm/scripts/user.txt echo " User logins on System : `uname -n` " grep "0:" /home/rfm/scripts/user.txt > idle_u.txt grep "1:" /home/rfm/scripts/user.txt >> idle_u.txt grep "2:" /home/rfm/scripts/user.txt >> idle_u.txt sort -u -t ',' -k 1,1 idle_u.txt wc -l /home/rfm/scripts/idle_u.txt echo " Users are "IDLE" " echo " " echo " " echo " IDLE User Logins " echo " ---------------- " echo " " cat /home/rfm/scripts/idle_u.txt | pg echo " " |
|
||||
|
in addition
The other problem is there are multiple logins for the users. I would use this list to determine which users to force to log out. There are at least 800 logins at any given time. I would also be looking at some sort options to determine longest idle to shortest.
|
|
||||
|
Do you know about using the TMOUT environment variable in /etc/profile?
It will handle idle process cleanup problem for you. Set it readonly, and for the number of idle seconds before the process is killed. We use 14400. If you make it too short a duration, users will do something to prevent it from working, like stay in vi all the time. |
|
||||
|
Yes and no...
I am familiar with the " TMOUT " option I have it inserted into the profile and tested it. The option works like a charm
however; the option is not used " yet " because the powers that be can not decide on a time out limit or a limit for logins. Usually they wait until users can not log in and come to me to free up sessions. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|