Technical
Continuous Monitoring

Hello ? Are you there ?

Sometimes you want to see whats happning with your script on the backgound, especially when the script is not very talkative.


while true; do  ps ax | grep store_nyiso; sleep 2; done

where store_nyiso is the part of the script name that is present in my file.

Hey site? Still running?

Check for the status of your site


while true
 do  
   wget https://google.com 2>&1|egrep "HTTP" 
   sleep 15
done

will show something like


HTTP request sent, awaiting response... 200 OK

will not store files locally and output finished time in the end


while true; do sudo nohup wget https://google.com --secure-protocol=SSLv3 --spider --server-response >> /mnt/peeklogs/bp_wget.log; sudo nohup echo "Finished `date`" >> /mnt/peeklogs/bp_wget.log;   sleep 20; done

mysql? Is that dump already loaded?

Continuously check for mysql processes. I’ve used it when I wanted to see if the dump was done.


while true; do  mysqladmin -uroot -p processlist; sleep 10; done

Or another batter yet alternative would be to use mytop since its pearly it runs on preatty much any platform.