Tech Support > Operating Systems > Linux / Variants > How to "kill" pts ?
How to "kill" pts ?
Posted by Radek on November 25th, 2003


When I connect to a server and the connection is interrupted and if I
then finger the server I still get listed as logged in. This also
sometimes happens when I just logout regularly and there is no process
left on the server. Then I keep beeing listed until the server reboots.

Does anyone know how to get rid of those "logins" (without reboot) so
that I'm not listed anymore.

Thank you
Radek

Posted by Doug O'Leary on November 26th, 2003


In article <bq0mem$qem$1@ns.felk.cvut.cz>, Radek wrote:
As far as killing sessions that aren't activley logged in anymore,
I end up having to do the following when my ssh session dies
periodically:

1. Re ssh home:
$ ssh home

2. ID my current terminal
$ tty
/dev/pts/2

3. Find out what other sessions are active:
$ w
11:19:49 up 13 days, 16:53, 3 users, load average: 0.04, 0.01, 0.00
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
dkoleary pts/1 09:41 3.00s 1.51s 1.37s slrn -C-
dkoleary pts/2 10:11 0.00s 0.10s 0.01s w

4. ID processes associated w/terminals on which I'm not...

$ ps -ef | grep pts/1
dkoleary 17024 17022 0 09:41 pts/1 00:00:00 -bash
dkoleary 17363 17024 0 11:09 pts/1 00:00:01 slrn -C-
dkoleary 17441 17363 0 11:18 pts/1 00:00:00 vi /home/dkoleary/.followup

5. Kill whatever processes you think should be made to go away.

NOTE: If your terminal suddenly disappears when you do this, you
picked the wrong one.

memory. I'm assuming finger reads the wtmp file. There's various
ways of modifying that one; however, my Mandrake 9.1 system seems
to keep it pretty much up to date on its own. If yours doesn't,
"man -k wtmp" or a google search might be a good start.

HTH;

Doug

--
--------
Senior UNIX Admin
O'Leary Computer Enterprises
dkoleary@attbi.com (w) 630-904-6098 (c) 630-248-2749
resume: http://home.attbi.com/~dkoleary/resume.html

Posted by Mattias Honrendgard on November 26th, 2003


Radek <base@newton.fjfi.cvut.cz> wrote in message news:<bq0mem$qem$1@ns.felk.cvut.cz>...
I use the "kill" command (man kill), though there is probably another way