$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 to see if process exists 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 Perl? Thanks in advance!!! Hans -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Check to see if process exists
Rogers, Gary (AP- Server Adminstrator) Tue, 21 Aug 2001 13:48:27 -0700
- Check to see if process exists Baartmans, Hans
- Re: Check to see if process ex... Jeffl
- RE: Check to see if process ex... Bob Showalter
- Rogers, Gary (AP- Server Adminstrator)