User Tools

Site Tools


monitoring_gateway_ping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
monitoring_gateway_ping [2009/09/23 21:37]
k2patel created
monitoring_gateway_ping [2009/09/24 00:00]
k2patel
Line 28: Line 28:
 netmonitor & netmonitor &
 </​code>​ </​code>​
 +
 +==== OR ====
 +
 +Following script you should run from the crontab.
 +
 +<code bash | gatewayping>​
 +#​!/​usr/​local/​bin/​bash
 +
 +gtway=24.24.222.25
 +ping -c 5 -t 1 $gtway
 +      if [ $? -ne 0 ]; then
 +         sh /​etc/​netstart
 +         sh /​etc/​rc.virtual
 +         echo "$date Gateway issue Detected"​ >> /​var/​log/​messages
 +      fi
 +</​code>​
 +
 +
monitoring_gateway_ping.txt ยท Last modified: 2009/09/24 00:00 by k2patel