Share your knowledge at the LQ Wiki.
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 01-05-2011, 09:06 AM   #1
LQ Newbie
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Understanding Idle/Inactive sessions and whether or not someone is logged in

Hi Everyone,

I'm trying to understand if anyone is left on a server. Basically I manage a simple linux server remotely used by 3-4 individuals. I can never tell if someone is actually on or not using w/who.

What I'm seeing is some people having what appears to be inactive/lost VNC sessions. I don't understand idle fully, but I do believe a program (without user interaction) can clear idle back to 0, correct?

Anyway, I'm asking because every now and then I need to reboot the server, and I do not want to interrupt any program working on calculations or waiting on having the data saved.

Here's what I see in w:

me@matrix:~> w
 06:59:54 up 170 days,  9:13, 16 users,  load average: 0.52, 0.16, 0.06
me :2/matri  06:59   ?xdm?   7days  0.10s /bin/sh /usr/X11R6/bin/kde
user1 pts/0     21Dec10 15days  0.00s  1.44s kded [kdeinit]
user3   pts/1     29Oct10 10:42m  0.31s  0.20s ssh -Y
user2   pts/2     27Nov10 39days  0.00s 24.94s kded [kdeinit]
user3   pts/4     20Jul10 169days  0.00s  1:36  kded [kdeinit]
user1 :0        21Dec10 ?xdm?   7days  0.09s /bin/sh /usr/X11R6/bin/kde
user2   matrix.w  27Nov10  0.00s  0.00s  0.06s /bin/sh /usr/X11R6/bin/kde
me pts/5     06:59    0.00s  0.08s  0.01s w
me matrix.w  06:59    0.00s  0.00s  0.10s /bin/sh /usr/X11R6/bin/kde
user3   pts/12    14Dec10 10:30m  0.10s  0.01s ssh -l rpd2
me pts/3     06:59   46.00s  0.00s  1.36s kded [kdeinit]
Where can I go from here? How can I tell what users I can log off? How can I tell that there has been no user interaction for a week for example?
Old 01-05-2011, 01:14 PM   #2
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
There is a 'wall' command that can be run as a root and the message you type can be delivered to all terminals.
As far as running processes is concerned I ahve found 'ps' most useful. If you know the username of the people you think have logged in then 'ps -u'. You can also look at the passwd file and look at the uid and gid and look it up on ps. Try 'man ps' for more info.
Hope this helps.


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
Getting error while getting status of active and inactive sessions from ORACLE DB saurabhmehan Linux - Newbie 2 09-27-2010 10:39 AM
disconnect idle ssh sessions pinoyskull Linux - Newbie 19 03-02-2010 03:29 AM
How to disconnect inactive ssh sessions ? sultf Linux - Newbie 3 02-04-2009 02:28 PM
defunct/inactive telnet sessions tpmadigan Linux - Enterprise 2 02-04-2008 08:56 AM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 08:34 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:11 AM.

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