LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 02-19-2006, 12:27 AM   #1
Boss Hoss
Member
 
Registered: Sep 2003
Distribution: SuSe
Posts: 62

Rep: Reputation: 15
Multiple Idle Users


When I do a TOP command I see 5 users. So I do the following to see WHO they are.

Code:
susebox:/etc # w
 01:25:34 up 3 days, 14:27,  5 users,  load average: 0.03, 0.08, 0.11
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
msusol   :0        Wed10   ?xdm?   1:37m  0.01s -:0              
msusol   pts/0     Wed10    3days  0.00s  1.13s kdeinit: kded            
root     :2/suseb  Sat01   ?xdm?   1:37m  0.00s -susebox.ultimate
root     pts/3     00:33    0.00s  0.06s  0.00s w
root     pts/2     21:28    1:34m  0.08s  0.08s -bash
Now I know I only have one ssh session open under root, so these other 4 are probably from using VNC and then having my connection broken.

So how can I terminate these idle user sessions?
 
Old 02-19-2006, 05:06 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
I use a terminal server in my computer lab so I see such things often.

#pkill -u musol will get rid of musol's processes.

My favourite is, if you want to kill all ordinary users with directories in /home,

#cd /home
#for f in *;do pkill -u$f;done

It is really neat to see all the screens blank all over the room

A related command is pgrep for finding a user's processes.
pgrep naughty
will find every process called naughty.
pgrep firefox will find all instances of firefox, etc.

Good fun!
 
  


Reply



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
Multiple users with the same name...users command buldir Linux - General 2 08-30-2004 04:34 PM
[FC2]Why does the users command display multiple users? Harkov Fedora 1 07-10-2004 09:24 PM
How do I make KDE 3.2.1 not log off idle users? rende Linux - Newbie 0 05-12-2004 10:26 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 03:09 AM.

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