Re: Check to see if process exists

2001-08-21 Thread Jeffl
Hey Hans, Go check out a program written by Evan Borgstrom, it is a program written in perl that will check to see if a program is up, and email you the status.. It runs as a cron job. Also you can add additional services quite easily. Author: Evan Borgstrom Email : syntec at unixpimps.org WWW

Re: Check to see if process exists

2001-08-21 Thread smoot
> Bob Showalter <[EMAIL PROTECTED]> said: > Use backticks to capture the ps -ef output and search for > sendmail. I wouldn't send the ps|grep pipeline to the backticks, > because on my system the ps output includes the grep command, > which might give a "false positive". > >print "sendmail i

RE: Check to see if process exists

2001-08-21 Thread Rogers, Gary (AP- Server Adminstrator)
$isalive = system "ps -ef | grep sendmail | grep -v grep"; if ($isalive) { do something } else { do somethingElse } -Original Message- From: Baartmans, Hans [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 2:04 PM To: [EMAIL PROTECTED] Subject: Check

RE: Check to see if process exists

2001-08-21 Thread Bob Showalter
> -Original Message- > From: Baartmans, Hans [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 4:04 PM > To: [EMAIL PROTECTED] > Subject: Check to see if process exists > > > Is there good way to execute a UNIX 'ps' command from Perl &g

Check to see if process exists

2001-08-21 Thread Baartmans, Hans
Is there good way to execute a UNIX 'ps' command from Perl and check to see if a process is running or exists? For instance, I would like to check to see if Sendmail is running. Under a UNIX shell command you can execute, '/usr/bin/ps -ef | grep sendmail'. Is there an easy way to do this in Per