You may also use `pgrep`

Be aware that there is no shell execution in `program with path` you have to put your script in a file.


Idézem/Quoting Tino Hendricks <[email protected]>:

I would go for a simple script containing something like

ps aux | grep the_process_name | grep -v grep | wc -l

and check for the number.

Tino

Am 12.08.2016 um 14:12 schrieb Stephen Berg (Contractor) <[email protected]>:

Is there a way to monitor a daemon that is supposed to have exactly one process showing. If the count is above one the daemon needs to be restarted.


--
Stephen Berg
Systems Administrator
NRL Code: 7320
Office: 228-688-5738
[email protected]


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



SZÉPE Viktor
--
+36-20-4242498  [email protected]  skype: szepe.viktor
Budapest, III. kerület





--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to