Ping Test script

The script below records a ping results every 3 seconds to /var/log/ping.log.  I created this script to detemine if my NIC is losing conectivity with switch at the same time as Asterisk SIP peers are lagging out.  Enjoy!


#!/bin/bash # This script checks ping times every 3 seconds # usage: ./ping-test.sh [IP ADDRESS] # # while true ; do echo "------------------------------------" >> /var/log/ping.log date >> /var/log/ping.log echo "------------------------------------" >> /var/log/ping.log ping -c 1 $1 >> /var/log/ping.log echo "" >> /var/log/ping.log echo "" >> /var/log/ping.log sleep 3s done
eample using 'nohup' to run in background:
[matt@lonocom Desktop]$ nohup ping-test.sh [some.IP.ADDRESS] &


If you like this article tell Google!!

Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , , ,

No Comments »

RSS feed for comments on this post. TrackBack URL

Leave a comment