LFS Bootscripts

S. Anthony Sequeira tony at sequeira.org.uk
Sun Aug 7 12:55:33 PDT 2005


On Sun, 2005-08-07 at 14:37 -0500, Randy McMurchy wrote:
> With a cursory glance at the function script, it appears to be some
> malfunction in the getpid section. I really didn't try to follow it,
> but it seems to me that it is doing a PS and reporting the PID of the
> PS process (which has the name in it, so I believe it *thinks*that the
> process is alive).

When I used to develop Unix scripts (many years ago), I came across this
behaviour when I was using ps to count the number of processes Oracle
was using (or something like that, details are hazy).

Since then I have always used the following when searching for a string
in a ps listing, assuming that the search string is sys:

$ ps -eadf | grep [s]ys
root      1604     1  0 12:08 ?        00:00:00 syslog-ng

here is one that doesn't work:

$ ps -eadf | grep sys
root      1604     1  0 12:08 ?        00:00:00 syslog-ng
sherwin  14316 14297  0 20:53 pts/1    00:00:00 grep --color=auto sys

HTH
-- 
Reisner's Rule of Conceptual Inertia:
If you think big enough, you'll never have to do it.






More information about the lfs-dev mailing list