LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-02-2004, 11:52 PM   #1
WNS - SP-CAS
LQ Newbie
 
Registered: Jul 2004
Location: Oklahoma
Distribution: Redhat 9
Posts: 2

Rep: Reputation: 0
Closing /killing other sessions


Anyone help me with closeing sessions that are open? When loggin into the machine now I am seeing 3 users (all me). Cannot find the command to kill the other 2. Do not really want to restart the machine everytime I leave one open. (Redhat 9)

Thanks, Chris
 
Old 07-03-2004, 07:23 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,570

Rep: Reputation: 171Reputation: 171
You can get the list of running processes by running
Code:
ps aux
In the first column you have process owner, in the second - process number (PID) and in the last one - program name. To kill one of them type
Code:
kill PID
(you need to be logges in as the process owner or as root).

For example, take one line of ps aux output:
Code:
mara      2227  0.0  0.3  2780 1648 pts/1    S    12:19   0:00 /bin/bash
To kill it, run
Code:
kill 2227
Note that it's sometimes normal when you're logged in multiple times to see your login name printed more than once by 'users'.
 
Old 07-03-2004, 03:01 PM   #3
WNS - SP-CAS
LQ Newbie
 
Registered: Jul 2004
Location: Oklahoma
Distribution: Redhat 9
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Thanks

Thank you Mara. That will help!
 
Old 03-27-2006, 12:00 PM   #4
aubrey-calm2
LQ Newbie
 
Registered: Feb 2006
Location: Alabama
Distribution: Slackware 10.2/11.0
Posts: 23

Rep: Reputation: 15
Having same problem

Slackware 10.2
Mailserver
sendmail 8.3
MIMEDefang
ClamAV
Spamassassin

...but the above does not work. What happens is the user remains logged in, but the PID changes to something higher.

Basicly, the users are not logging out. The scenerio is this...

I log in as root, once, twice, three times. Now I have 3 active ssh sessions open, along with 3 root users. I log out 2 of them. I still have 3 users logged in. I kill the PID, but for whatever PID I kill, that user is imediatly issued another PID, and remains logged in.

This is what i see after I reboot, and only one user is logged in....

root 2888 0.0 0.0 1380 484 tty1 Ss+ 11:46 0:00 /sbin/agetty 38400 tty1 linux
root 2889 0.0 0.0 1380 484 tty2 Ss+ 11:46 0:00 /sbin/agetty 38400 tty2 linux
root 2890 0.0 0.0 1380 484 tty3 Ss+ 11:46 0:00 /sbin/agetty 38400 tty3 linux
root 2891 0.0 0.0 1380 484 tty4 Ss+ 11:46 0:00 /sbin/agetty 38400 tty4 linux
root 2892 0.0 0.0 1380 484 tty5 Ss+ 11:46 0:00 /sbin/agetty 38400 tty5 linux
root 2893 0.0 0.0 1380 484 tty6 Ss+ 11:46 0:00 /sbin/agetty 38400 tty6 linux

strange, huh? Any help is appreciated.

-Aubrey

Last edited by aubrey-calm2; 03-27-2006 at 12:02 PM.
 
  


Reply


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
Closing Ports Murdock1979 Linux - Security 1 09-23-2005 09:44 AM
Closing these ports... greygoose80 Slackware 2 12-19-2004 11:12 PM
Two X sessions? LinuxSeeker Linux - General 3 04-07-2004 03:39 PM
Sessions BajaNick Linux - General 0 07-30-2003 09:19 PM
closing procces dkc_ace Linux - General 7 01-19-2003 02:21 PM


All times are GMT -5. The time now is 09:08 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration