Cyberclops in a bind

Ben Beeson beesond001 at hawaii.rr.com
Fri Mar 30 11:56:08 PST 2001


Cyberclops,

	The syntax you typed means this:  run the ps cpmmand with options 'ax'
(a = list all processes, x = include all processes without controlling ttys)
and pipe the result to the grep filter.  The grep filter is run with 'named'
which would match any entry with 'named' in it.  (Likely one for the 'named'
process and one for the 'grep named' process.)   The output you received is in
the following form:

'process id number'	tty	stat	time	command


For your case, the shell returned  the entry for the 'grep named' entry running
as process '1284', on the tty titled 'pts/1'.  The 'S' means the process is
asleep, and the bsdtime the grep process used was very short  '0 minutes and 00
seconds'  (it took less than a second to complete.)  

	Each time you type a command like 'ps ax | grep something' the process
id of the grep command will change because you are running a new instance of
that process.  However, if you type ps ax by itself, you will also see lots of
other processes.  Many of these processes do not change their process
id number because they have been running and are still running since the box
was booted.  Here is an example of all the processes currently running on my
system:

  PID TTY      STAT   TIME COMMAND
    1 ?        S      0:01 init [3]
    2 ?        SW     0:01 [kflushd]
    3 ?        SW     0:26 [kupdate]
    4 ?        SW     0:00 [kpiod]
    5 ?        SW     0:00 [kswapd]
  198 ?        S      0:00 /sbin/pump -i eth0
  311 ?        S      0:00 portmap
  352 ?        SW     0:00 [lockd]
  353 ?        SW     0:00 [rpciod]
  364 ?        S      0:00 rpc.statd
  412 ?        S      0:00 /usr/sbin/atd
  573 ?        S      0:00 rpc.rquotad
  584 ?        S      0:00 rpc.mountd --no-nfs-version 3
  597 ?        SW     1:53 [nfsd]
  598 ?        SW     0:00 [nfsd]
  599 ?        SW     0:00 [nfsd]
  600 ?        SW     0:00 [nfsd]
  601 ?        SW     0:00 [nfsd]
  602 ?        SW     0:00 [nfsd]
  603 ?        SW     0:00 [nfsd]
  604 ?        SW     0:00 [nfsd]
  629 ?        S      0:03 /usr/sbin/automount --timeout 60 /misc file /etc/auto
  667 ?        S      0:22 sendmail: accepting connections on port 25
  682 ?        S      2:35 gpm -t ps/2
  726 ?        S      0:09 xfs -port -1
  813 tty3     S      0:00 /sbin/mingetty tty3
  814 tty4     S      0:00 /sbin/mingetty tty4
  815 tty5     S      0:00 /sbin/mingetty tty5
  816 tty6     S      0:00 /sbin/mingetty tty6
 6435 tty2     S      0:00 /sbin/mingetty tty2
 6577 ?        S      0:24 syslogd -m 0
 6588 ?        S      0:00 klogd
10195 ?        S      0:00 lpd
10464 ?        S      0:04 crond
11629 ?        S      0:00 /usr/local/psionic/portsentry/portsentry -stcp
11791 ?        S      0:00 inetd
12981 tty1     S      0:00 login -- someuser
13325 tty1     S      0:00 -bash
13336 tty1     S      0:00 sh /usr/X11R6/bin/startx
13343 tty1     S      0:00 xinit /etc/X11/xinit/xinitrc -- -auth
/home/someuser/.Xaut 
13344 ?        S      0:11 /usr/X11R6/bin/Xwrapper :0
-auth /home/someuser/.Xauthorit 
13348 tty1     S      0:16 kwm
13363 tty1     Z      0:00 [kwmsound <defunct>]
13364 tty1     S      0:00 kfm
13365 tty1     S      0:00 krootwm
13366 tty1     S      0:00 kpanel
13367 tty1     S      0:00 kbgndwm
13377 tty1     S      0:05 kmail -caption Mail client -icon kmail.xpm
13380 tty1     S      0:00 konsole -icon konsole.xpm -miniicon konsole.xpmi -cap
13381 pts/2    S      0:00 /bin/bash                      

Some systems have many more processes than even this.  (Also note
that the init process is #1. ) That's why we usually pipe ps to grep, and maybe
even awk when we know what we are looking for -- it tends to cut down the
clutter significantly.  

	There are other tricks you can do with ps and its friends to get
different presentations of the system data.  Try 'man ps' for some examples.

Cheers,

Ben  


On Fri, 30 Mar 2001, you wrote:
> My problem is that I have no idea what any of the the syntax means.  I
> typed the following and got similar results, but with a different
> number.  What does each section of what I typed mean and what does each
> section of what was returned mean?  I know somebody said, "The grep
> commands gets it name from
> what it does.  It finds Global Regular Expression Patterns.  And regexp
> gets it name from REGular EXPression."
> 
> root> ps ax | grep named
> 1284 pts/1    S      0:00 grep named 
> 
> 
> Jeff Mings wrote:
> > 
> > Looks like no bind process is running, but rather, the single process
> > caught by grep is grep looking for bind.
> > 
> > -Jeff
> > 
> > Cyberclops wrote:
> > 
> > > Here's what mine looks like.  Is "bind" running or not?
> > >
> > > root> ps ax | grep bind
> > > 1234 pts/1    S      0:00 grep bind
> > >
> > >
> > 
> > ---
> > You are currently subscribed to luau as: Cyberclops at hawaii.rr.com
> > To unsubscribe send a blank email to $subst('Email.Unsub')
> 
> ---
> You are currently subscribed to luau as: beesond001 at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')



More information about the LUAU mailing list