[lug] Disconnectin user / Closing idle connections
John Hernandez
John.Hernandez at noaa.gov
Wed May 16 11:49:34 MDT 2001
Run the 'w' command like this:
[me at host ~]$ w
11:40am up 12 days, 20:26, 5 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
me tty1 - Tue 9am 26:00m 2.59s 0.15s /bin/sh /usr/X11R6/bin/startx
.
.
.
him pts/3 host.some.net 11:39am 0.00s 0.19s 0.02s -tcsh
This will identify the pts of the remote user. Now all you need to do is find the shell on pts/3 by running 'ps':
[me at host ~]$ ps -ef|grep pts/4
him 29283 29282 0 11:44 pts/4 00:00:00 -tcsh
and finally, kill the shell (or the daemon that spawned it):
[me at host ~]$ su -c 'kill 29283'
-John
Shannon Johnston wrote:
>
> Hello All!
> I had a quick question. Sometimes my connection will drop from a remote
> system. (Or I'll close the terminal without properly exiting.)
> When I run a who command next time, the previous connection still remains.
> I've seen them as old as 5 days idling.
> That brings me to my question. How do I kill these connections? Also, how
> can I kill the active connection of another user?
>
> Thanks,
> Shannon
>
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
--
- John Hernandez - Network Engineer - 303-497-6392 -
| National Oceanic and Atmospheric Administration |
| Mailstop R/OM12. 325 Broadway, Boulder, CO 80305 |
----------------------------------------------------
More information about the LUG
mailing list