Hi..
I have this code which tells me that if a process is running or not. Actually someone on this forum help me to do it. But now If i want to check if the process is not running for more than 10 minutes. Does anyone know the code or syntax that checks if a process is not running for some amount of time? Please help me.
#!/bin/bash
#check_procs returns "OK: process running" if the process is running and "not running: process not running"
check=$"/usr/local/check_procs myprocess"
var="not runnig: myprocess not running"
if [ $check = $var ]; then
echo "not running"
else
echo "runnig"
fi
Thanks