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

Re: active programs overview



On Fri, Jan 24, 2003 at 01:11:41PM -0600, Ron Johnson wrote:
> On Fri, 2003-01-24 at 09:52, Joris Huizer wrote:
> > Hello,
> > 
> > What is the program to use when I want to know which
> > programs are running ?
> 
> $ ps -ax
> $ ps -axf
> $ ps -axf --cols=`echo $COLUMNS`

I hate to nitpick, but all your examples should leave off the "dash"
(the '-' character): ps has been hacked so that it exhibits system V
behavior when provided options preceded by a dash, and bsd behavior
otherwise (but it also tries the bsd behavior when the system V option
you've provided don't make sense).

 $ ps -V
 procps version 2.0.7
 $ ps -x
 Bad syntax, perhaps a bogus '-'?
   PID TTY      STAT   TIME COMMAND
  3553 ?        S      0:00 /usr/sbin/sshd
  3554 pts/0    S      0:00 -bash
  3590 pts/0    R      0:00 ps -x
 $ ps -ef
 UID        PID  PPID  C STIME TTY          TIME CMD
 root         1     0  0 Jan17 ?        00:00:17 init
 root         2     1  0 Jan17 ?        00:00:00 [keventd]
 [ snip ]
 nnorman   3554  3553  0 21:18 pts/0    00:00:00 -bash
 nnorman   3591  3554  0 21:21 pts/0    00:00:00 ps -ef
 $ ps ax
   PID TTY      STAT   TIME COMMAND
     1 ?        S      0:17 init
     2 ?        SW     0:00 [keventd]
 [ snip ]
  3554 pts/0    S      0:00 -bash
  3592 pts/0    R      0:00 ps ax

Otherwise a good post; I find 'ps fax' especially useful when I'm
trying to figure out which process needs killing.

-- 
Nathan Norman - Incanus Networking mailto:nnorman@incanus.net
  When you're in command, command.
          -- Adm. Chester W. Nimitz



Reply to: