Linux / Unix Script: Simple Process Checker To Find Out If A Service Is Running or Not

Posted on in Categories Monitoring last updated September 5, 2016

A simple shell script to find out whether critical services are running or, not under Linux or Unix operating systems. The script can send notification using email.

Sample outputs:

Fig.01: Script in action (click to enlarge)
Fig.01: Script in action (click to enlarge)

5 comment

  1. e a Bash shell script that creates 10 files under the directory /tmp/ with the names:

    Foo1, foo2, … etc. then write in each of them “Hello in 1”, Hello in 2”, …etc.

    Then rename them to the names CPE471_0_file, CPE471_1_file , CPE471_9_file , etc.

    1. change the section under: ## Send a quick email update (good for cron jobs) ##

      to

      ## Send a quick email update (good for cron jobs) ##
      [[ “$_failed” == “true” && “$_sendemail” == “yes” ]] &” | $_mail -s ‘Service not Running’ “$_email”;
      }

Leave a Comment