I want to write a shell script which is used in cron job and it runs every 4 hours to check whether tomcat servers are running or not . If servers are not running , one email should be triggered like alert notification. if servers are Running then no need to print anything.
This is what i want to achieve through shell script
Can you please guide me how to write these or better approach to write this. Thanks in advance.
So far I tried using by command "netstat" and grep.
But alternatively I need script for cron job is should run for every 4 hours and send email when server is down