How to monitor if a process is not running in UNIX/Linux

Article:TECH138462  |  Created: 2010-08-25  |  Updated: 2013-10-25  |  Article URL
Article Type
Technical Solution


How can I monitor/alert when a process is not running in UNIX or Linux?


  • Monitor Solution for Servers 6.x
  • Monitor Solution for Servers 7.x


Create a new Command metric which returns a count of running processes:
Monitor Solution 6.x:
Count of running processnameprocesses
Polling interval
60 seconds
30 seconds
Command line
LC_ALL=C ps -eoargs|awk /processname/'{print $0}'|grep -v -c 'awk /processname'
Return value column
Data typeNumeric

Monitor Solution 7.x:
Count of running processnameprocesses
Polling interval60 seconds

Data type
Use: Command Lineps -eoargs|awk /processname/'{print $0}'|grep -v -c 'awk /processname'
Return value column0

Create a new a rule with a condition of “Is equal to 0” with an appropriate severity. If the desired process is not running, the metric will return a value of “0”, and the rule will trigger.
Note:  This command line syntax has been confirmed compatible on SLES, RHEL, AIX, and Solaris


Article URL

Terms of use for this information are found in Legal Notices