Cyberclops in a bind
Cyberclops
Cyberclops at hawaii.rr.com
Fri Mar 30 21:10:46 PST 2001
Yes your answers are very complete and helpful. I'm seriously studying
them, plus I try to cross reference them in the books I have too.
Ben Beeson wrote:
>
> Cyberclops,
>
> OK, I presume you saw Warren's e-mail so I won't rehash that one.
> I'll try to address your other questions in turn.
>
> How many processes are "named" processes?
>
> You have several 'named' related processes. The BIND package (a
> collection of software name server utilities and documents ) includes 'nscd.'
> >From the Red Hat RPMFinder: "Nscd caches name service lookups and can
> dramatically improve performance with NIS+, and may help with DNS as well. Note
> that you can't use nscd with 2.0 kernels because of bugs in the kernel-side
> thread support. Unfortunately, nscd happens to hit these bugs
> particularly hard. Install nscd if you need a name service lookup caching
> daemon, and you're not using a version 2.0 kernel." In your list below,
> these processes are:
>
> 346 ? S 0:00 /usr/sbin/nscd
> 347 ? S 0:00 /usr/sbin/nscd
> 348 ? S 0:00 /usr/sbin/nscd
> 349 ? S 0:00 /usr/sbin/nscd
> 350 ? S 0:00 /usr/sbin/nscd
> 351 ? S 0:00 /usr/sbin/nscd
> 352 ? S 0:00 /usr/sbin/nscd
>
> 'Named' by itself is not running on your machine.
>
> To find any and all 'named' processes, type just the following at a
> shell prompt: "ps ax | grep [n]amed" (please omit the quotes...) If you are
> running 'named' you'll get something back, if not, you will be returned to a
> shell prompt.
>
> Is "tty" the abbreviation for a "terminal"? -- Yes
>
> Where do we see the "X" process running in the list? -- process 407
>
> 407 ? R 0:08 /usr/X11R6/bin/X :0 vt07 -auth
> /var/lib/xdm/authdir/a 408 ? S 0:00 -:0
>
> This line shows that you are running X on virtual terminal 7, screen 0 onthe
> default host....
>
> Is that "PID 1" -- Yes, it is init -- the grandfather of all unix processes....
>
> If "STAT" "S" means "sleeping" what is the meaning of "SW", "SR", and "R"?
>
> >From the man page:
> PROCESS STATE CODES
> D uninterruptible sleep (usually IO)
> R runnable (on run queue)
> S sleeping
> T traced or stopped
> Z a defunct ("zombie") process
>
> For BSD formats and when the "stat" keyword is used, additional letters may be
> displayed:
> W has no resident pages
> < high-priority process
> N low-priority task
> L has pages locked into memory (for real-time and custom IO)
>
> I'm still not clear on the difference between a "TTY" and a "pts/"x"".
> Don't quote me onthis one, but I think the pts/x is a pseudo terminal used in
> an X session....
>
> Hope this helps,
>
> Ben
>
> On Fri, 30 Mar 2001, you wrote:
> > Okay, here's my list. Just out of curiosity, how many processes are
> > "named" processes? I presume "bind" is a named process. Should I have
> > typed in "named bind"? or is "named" good enough? In other words does
> > simply typing "named" have it list all the so called "named" processes?
> > Is "tty" the abbreviation for a "terminal"? For example will
> > <CTRL>+<ALT>+<F2> take you to "tty2"? -> I just tested it and found
> > out that it does so "tty1" must be a virtual area in "runlevel 3". And
> > <CTRL>+<ALT>+<F7> takes you back to "X". Where do we see the "X"
> > process running in the list? is that "PID 1" If "STAT" "S" means
> > "sleeping" what is the meaning of "SW", "SR", and "R"? In studying
> > this, I see that I'm still not clear on the difference between a "TTY"
> > and a "pts/"x"". The reason I say this is that the "pts/x" is listed in
> > the "TTY" column so I presume it is some sort of subset of "TTY" but it
> > then makes me hazy about my understanding of a so called "tty." Sorry
> > for all the questions, but it seems to be the nature or Linux/Unix. [I
> > just typed this: "cy at mycomputer:~ > tty"
> > and got this "/dev/pts/3"
> >
> > At least you got me using the "man pages" a bit.
> >
> > My process list:
> > cy at myipaddress > ps ax
> > PID TTY STAT TIME COMMAND
> > 1 ? S 0:04 init [5]
> > 2 ? SW 0:00 [keventd]
> > 3 ? SW 1:11 [kapm-idled]
> > 4 ? SW 0:00 [kswapd]
> > 5 ? SW 0:00 [kreclaimd]
> > 6 ? SW 0:00 [bdflush]
> > 7 ? SW 0:00 [kupdate]
> > 8 ? SW< 0:00 [mdrecoveryd]
> > 9 ? SW 0:00 [kreiserfsd]
> > 175 ? S 0:00 /sbin/dhcpcd -D -H eth0
> > 211 ? S 0:00 /sbin/portmap
> > 218 ? S 0:00 /usr/sbin/sshd
> > 227 ? S 0:00 /sbin/syslogd
> > 231 ? S 0:00 /sbin/klogd -c 1
> > 238 ? S 0:00 /usr/sbin/lpd
> > 313 ? SL 0:00 /usr/sbin/xntpd
> > 315 ? SL 0:00 /usr/sbin/xntpd
> > 316 ? SL 0:00 /usr/sbin/xntpd
> > 330 ? S 0:00 /usr/sbin/cron
> > 346 ? S 0:00 /usr/sbin/nscd
> > 347 ? S 0:00 /usr/sbin/nscd
> > 348 ? S 0:00 /usr/sbin/nscd
> > 349 ? S 0:00 /usr/sbin/nscd
> > 350 ? S 0:00 /usr/sbin/nscd
> > 351 ? S 0:00 /usr/sbin/nscd
> > 352 ? S 0:00 /usr/sbin/nscd
> > 373 ? S 0:00 /usr/sbin/inetd
> > 399 tty1 S 0:00 /sbin/mingetty --noclear tty1
> > 400 tty2 S 0:00 /sbin/mingetty tty2
> > 401 tty3 S 0:00 /sbin/mingetty tty3
> > 402 tty4 S 0:00 /sbin/mingetty tty4
> > 403 tty5 S 0:00 /sbin/mingetty tty5
> > 404 tty6 S 0:00 /sbin/mingetty tty6
> > 405 ? S 0:00 /opt/kde2/bin/kdm
> > 407 ? R 0:08 /usr/X11R6/bin/X :0 vt07 -auth
> > /var/lib/xdm/authdir/a 408 ? S 0:00 -:0
> > 425 ? S 0:00 /usr/X11R6/bin/xconsole -notify -nostdin
> > -verbose -ex 433 ? S 0:00 /bin/bash --login
> > /usr/X11R6/bin/kde
> > 522 ? S 0:00 kdeinit: dcopserver
> > 524 ? S 0:00 kdeinit: klauncher
> > 526 ? S 0:02 kdeinit: kdesktop
> > 528 ? S 0:00 kdeinit: kded
> > 532 ? S 0:02 artsd -F 5 -S 8192
> > 537 ? S 0:00 kdeinit: kxmlrpcd
> > 546 ? S 0:01 kdeinit: kicker
> > 548 ? S 0:00 kdeinit: klipper
> > 550 ? S 0:00 kdeinit: khotkeys
> > 552 ? S 0:00 kdeinit: Running...
> > 553 ? S 0:00 kdeinit: kwrited
> > 555 pts/0 S 0:00 /bin/cat
> > 558 ? S 0:00 knotify
> > 561 ? S 0:00 ksmserver --restore
> > 562 ? S 0:00 kdeinit: kwin
> > 564 ? S 0:00 kdeinit: kcookiejar
> > 565 ? S 0:00 kdeinit: konqueror
> > 567 ? S 0:00 kdeinit: konqueror
> > 568 ? S 0:00 kdeinit: kio_uiserver
> > 569 ? S 0:00 kdeinit: konqueror
> > 571 ? S 0:00 knotes -session
> > 10508a8e23000097664040800000019500013 576 ? S 0:04
> > /opt/netscape/netscape
> > 591 ? S 0:00 (dns helper)
> > 599 ? S 0:00 kdeinit: konsole
> > 600 pts/1 S 0:00 /bin/bash
> > 607 pts/1 R 0:00 ps ax
> > cy at myipaddress:~ >
> >
> > Ben Beeson wrote:
> > >
> > > 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')
> > >
> > > ---
> > > 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')
>
> ---
> You are currently subscribed to luau as: Cyberclops at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
More information about the LUAU
mailing list