This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
monitoring_gateway_ping [2009/09/24 01:37] k2patel created |
monitoring_gateway_ping [2009/09/24 04:00] k2patel |
||
---|---|---|---|
Line 28: | Line 28: | ||
netmonitor & | netmonitor & | ||
</code> | </code> | ||
+ | |||
+ | ==== OR ==== | ||
+ | |||
+ | Following script you should run from the crontab. | ||
+ | |||
+ | <code bash | gatewayping.sh> | ||
+ | #!/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> | ||
+ | |||
+ |