[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: users still logged in



On Fri, Nov 08, 2002 at 08:01:35PM -0800, nate wrote:
> > After having a mess of connection problems that caused my ssh sessions to
> > drop, I noticed that the 'w' command still thinks there are users logged
> > in that I know are not.
> 
> check the process table to see if shells for those ttys are still
> open.
> 
> e.g.
> 
> [aphro@portal:~]$ w
>  20:00:16 up 9 days,  1:31,  2 users,  load average: 1.38, 0.69, 0.60
> USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
> aphro    pts/3    aphro.aphroland. Tue19    0.00s  0.32s  0.09s  w
> aphro    pts/4    aphro.aphroland. Thu22   21:44m  0.08s  0.05s  bash
> [aphro@portal:~]$ ps auxw | grep 'pts/4'
> aphro     8978  0.0  0.1  4048 1660 pts/4    S    Nov07   0:00 -bash
> root      8988  0.0  0.1  4048 1644 pts/4    S    Nov07   0:00 bash
> aphro     2624  0.0  0.0  1336  468 pts/3    S    20:00   0:00 grep pts/4
> 
> then kill the process ids. I have found when killing dead sessions
> only kill -9 to the shell seems to work(at least with bash).
> 
> if there are no processes then your log files may have a bit of
> curroption in them(I haven't had this happen in years), I am not
> certain how to deal with it(perhaps rename/remove them?)

The strange part is that when 'w' is run, it displays "5 users" but
there is 1 user listed with username and TTY values....



Reply to: