Mailinglist Archive: opensuse (4570 mails)
| < Previous | Next > |
Re: [SLE] Script to check if an application is running
- From: Bruce Marshall <bmarsh@xxxxxxxxxx>
- Date: Fri, 18 Nov 2005 01:45:53 +0000 (UTC)
- Message-id: <200511172045.36498.bmarsh@xxxxxxxxxx>
On Thursday 17 November 2005 08:33 pm, Anders Johansson wrote:
> Bruce Marshall wrote:
> > if ! ps -aux | grep $daemon | grep -iv grep
>
> 1. why -i? grep is grep, not GrEp
> 2. you can do daemon=f[e]tchmail instead to avoid irrelevant hits on the
> grep process
> 3. Use checkproc for the testing instead of any of the above
How does one get checkproc to work?
(my attempt)
=======================================================
srv1:/var/mail/backup # ps aux | grep fetch | grep -v grep
root 8104 0.0 0.2 5808 1832 ? Ss Nov13 0:10 fetchmail
-f /etc/fetchmailrc
srv1:/var/mail/backup # checkproc fetchmail
srv1:/var/mail/backup # checkproc /usr/bin/fetchmail
srv1:/var/mail/backup #
============================================
No response using progname or fullpath to progname
> Bruce Marshall wrote:
> > if ! ps -aux | grep $daemon | grep -iv grep
>
> 1. why -i? grep is grep, not GrEp
> 2. you can do daemon=f[e]tchmail instead to avoid irrelevant hits on the
> grep process
> 3. Use checkproc for the testing instead of any of the above
How does one get checkproc to work?
(my attempt)
=======================================================
srv1:/var/mail/backup # ps aux | grep fetch | grep -v grep
root 8104 0.0 0.2 5808 1832 ? Ss Nov13 0:10 fetchmail
-f /etc/fetchmailrc
srv1:/var/mail/backup # checkproc fetchmail
srv1:/var/mail/backup # checkproc /usr/bin/fetchmail
srv1:/var/mail/backup #
============================================
No response using progname or fullpath to progname
| < Previous | Next > |