process checker

Last week I had problems with a machine that various processes stopped it due to electric shocks, it was stopped by electricity, but EVN hits 😉 At such moments the machine recovers but some secondary processes require manual intervention and so for one day I had to 5-6 times to come in to adjust things. 🙂 As people say, laziness is the main driving force and because of that I rolled up my sleeves to write a script to make sure that the processes are there when needed 🙂 ;)Said done for 30 min with the testing we got a short violin whose moving heart is

CNT=`ps ax | grep -v grep| grep jic-tak | wc -l`

if [ $CNT = 0 ]
then
/path/to/start/process/jik-tak > /dev/null

fi

in general this heart takes care to check how many jik-tak processes started and if the result is zero 🙂 to start it. I pushed it into a crown to run on 20 min and I decided hernia headache as my friend ShadowX said the truth is simple solutions 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Anti SPAM *