Why the extra shells?

Paul Chvostek paul+fbsd at it.ca
Wed Sep 10 15:42:35 UTC 2008

Hi John,

On Mon, Sep 01, 2008 at 08:43:49AM -0400, John Almberg wrote:
> This is my main concern at the moment... I am wondering if I killed  
> off an essential process when I killed off those shells...

Probably not.  Your `ps` output was:

  [on:~]> ps
  30350  p0  Ss     0:00.03 -bash (bash)
  30761  p0  R+     0:00.00 ps
  99069  p1  Is+    0:00.01 /usr/local/bin/bash
  79966  p3  Is     0:00.01 /usr/local/bin/bash
  27050  p4  Is+    0:00.01 /usr/local/bin/bash
  45342  p5  Is+    0:00.01 /usr/local/bin/bash

The fact that your shells all have a small TIME column indicates that
they're not very active.  This is a good thing.

The "I" under STAT means it's an idle process, and the fact that it's
attached to a tty means it was started on a terminal.  The ones with a
"+" are foreground processes on their ttys.  I'd guess that these could
be shells processes that were never killed off when their terminals were
closed, but you can find out a little more about them, once you get some
more of them showing up.

`ps Olstart` will show you the date/time that a process was started.
You can compare this to the output of `last` to see if the dates and
ttys match up with your logins.

If they don't match up, they're probably not login shells, and more
investigation is required, possibly by using things like `ps uwwtp1` for
the shell on p1.  This will give you ALL the processes on that TTY,
including anything that might have been launched by bash (and therefore
possibly subject to a HUP sent by the shell as you kill it).


  Paul Chvostek                                             <paul at it.ca>
  it.canada                                            http://www.it.ca/

More information about the freebsd-questions mailing list