How do I check to see if a process is running

From: Rob Witzke (Rob.Witzke_at_cincinnatilibrary.org)
Date: 09/27/04


Date: Mon, 27 Sep 2004 15:13:49 -0400
To: <beginners@perl.org>

If I want to know if a process is currently running such as

  user1 1729 1 0 14:58:13 ? 0:00 start

What command do I use to look for it? I know I could do a Unix ps and grep for the process name and then awk it down but it seems that there has got to be a way in Perl to do this. I been through the Camel and Ram books and I can find all sorts of stuff about creating processes but I guess I am just missing the part about testing to see if a process is running.

Rob Witzke
The Public Library of Cincinnati
rob.witzke@cincinnatilibrary.org