LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Idle Users - how can i recognize them (https://www.linuxquestions.org/questions/linux-newbie-8/idle-users-how-can-i-recognize-them-706764/)

laki47 02-23-2009 03:08 AM

Idle Users - how can i recognize them
 
Hello!

I have question about user idle time. When I execute w command I have following result:

# w
10:03am up 72 days, 21:26, 2 users, load average: 0.09, 0.09, 0.08
User tty login@ idle JCPU PCPU what
root pts/0 9:59am w
jsmith pts/2 2:24pm115:22 -sh

I'm root and other person, jsmith, has more then 115 hours of idle time.

When I execute ps -ef |grep jsmith I get:

# ps -ef |grep jsmith
jsmith 16987 16780 0 Feb 18 pts/2 0:00 -bash
jsmith 16742 16740 0 Feb 18 pts/2 0:00 -bash
root 16627 871 0 Feb 18 ? 0:01 sshd: jsmith [priv]
jsmith 16631 16630 0 Feb 18 ? 0:00 /opt/ssh/libexec/sftp-server
root 16738 871 0 Feb 18 ? 0:02 sshd: jsmith [priv]
jsmith 16740 16738 0 Feb 18 ? 0:02 sshd: jsmith@pts/2
root 19436 19361 0 10:02:08 pts/0 0:00 grep jsmith
jsmith 16630 16627 0 Feb 18 ? 0:01 sshd: jsmith@notty

My question is: How can I know that user jsmith isn't working anything. Can I kill his shell as root because his idle time is so long?

Thank you

gergely89 02-23-2009 10:03 AM

AFAIK an idle shell means nothing more then that has been no user input for some amount of time. It does not necessarily mean that some process launched from that shell isn't still running - some program launched as './program &' would run in the background making the shell available for new input or make the shell appear to be idle.

linux

nx5000 02-23-2009 10:08 AM

You can use autolog

salasi 02-23-2009 05:07 PM

Quote:

Idle Users - how can i recognize them
They wear clothes...their mouths move when they speak...they are trying to wear out the cofee machine (without ever refilling it) before sys admins can get themselves onto life support ;)


All times are GMT -5. The time now is 05:08 AM.