HCM Local Test Example

The following script verifies that the cron utility is running on the local server:

#!/bin/sh

# Verify that cron is running

# Read in our libraries / standard variable settings and parse

# the command line.

/opt/opsware/oi_util/lib/local_probe_preamble.sh

printf "Verify \"cron\" is running:"

process_running=`ps -eo fname | egrep '^cron$' | head -1`

if [ -z "$process_running" ]; then

echo "FAILURE (cron does not exist in the process table)"

exit 1

else

echo "SUCCESS"

exit 0

fi