Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-23-2009, 03:08 AM   #1
Registered: Feb 2009
Posts: 33

Rep: Reputation: 15
Idle Users - how can i recognize them


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

Last edited by laki47; 02-23-2009 at 04:24 AM.
Old 02-23-2009, 10:03 AM   #2
Registered: Feb 2009
Posts: 100

Rep: Reputation: 21
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.


Last edited by gergely89; 02-27-2009 at 10:48 PM.
Old 02-23-2009, 10:08 AM   #3
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
You can use autolog
Old 02-23-2009, 05:07 PM   #4
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,062

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aix Idle Users gjeacocks Linux - Newbie 0 01-07-2008 08:38 AM
kill idle users xyrer AIX 4 05-07-2007 09:17 AM
Multiple Idle Users Boss Hoss SUSE / openSUSE 1 02-19-2006 05:06 PM
idle users klfreese Linux - Newbie 1 07-20-2003 11:57 PM
How do disconnect Idle users?? noodle123 Linux - Newbie 2 07-29-2002 08:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration