[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: troubles with process handling
From: |
Brendan Strejcek |
Subject: |
Re: troubles with process handling |
Date: |
Thu, 19 Jan 2006 15:41:53 -0600 |
User-agent: |
Mutt/1.5.6+20040818i |
Guillaume Rousse wrote:
> I'd like to manage process on clients to make sure some processes
> are running, and some others are not. I don't want to send processes
> signals directly, I prefer to use system service scripts, so as to
> take care of lock file, etc... I once used restart facility, allowing
> to launch a shell command, but only if a signal was not found, thus
> unable to deal with shutting down processes.
This worked for me:
processes:
"sshd" matches=<1 action=bymatch define=running_sshd
alerts:
running_sshd::
"I am running sshd"
It seems to generate some output also, but maybe that is good enough for
you. If not, you can always use ReturnsZero with a /bin/sh -c '' and ps.
Best,
Brendan
--
Senior System Administrator
The University of Chicago
Department of Computer Science
http://www.cs.uchicago.edu/people/brendan
http://praksys.blogspot.com/