I have a server that sometimes stop working, the only solution i found is to create a cron that execute this command:
netstat -tn | grep -c :80
The following command will output the number of connections to the port 80. The problem is that i want that if the output is 0 then the server needs to reboot.