#!/usr/bin/perl -w
use strict ;
use diagnostics ;
use LWP::Simple ;
#this will run a ping to our firewall
#to yahoo.com
#to 132.163.4.101 an NIST Time Server
#and with get the time (UTC)
#run this script piped to text from the prompt
my $ping1 = (`ping XXX.XXX.XXX.XXX -n 1`) ;
my $ping2 = (`ping yahoo.com -n 25`) ;
my $ping3 = (`ping 132.163.4.101 -n 25`) ;
my $numb = 51 ;
until ($numb == 1) {
chomp $numb ;
$numb -- ;
print "R---------------------------\n" ;
print $ping1 ;
print "Y---------------------------\n" ;
print $ping2 ;
print "I---------------------------\n" ;
print $ping3 ;
print "T---------------------------\n" ;
getprint "http://132.163.4.101:13 \n" ;
print "E---------------------------\n" ;
}
####
P---------------------------
Pinging XXX.XXX.XXX.XXX with 32 bytes of data:
Reply from XXX.XXX.XXX.XXX: bytes=32 time<10ms TTL=63
Ping statistics for XXX.XXX.XXX.XXX:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
P---------------------------
Pinging yahoo.com [216.115.108.245] with 32 bytes of data:
Reply from 216.115.108.245: bytes=32 time=70ms TTL=237
...
Reply from 216.115.108.245: bytes=32 time=90ms TTL=237
Ping statistics for 216.115.108.245:
Packets: Sent = 25, Received = 25, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 70ms, Maximum = 90ms, Average = 72ms
P---------------------------
Pinging 132.163.4.101 with 32 bytes of data:
Reply from 132.163.4.101: bytes=32 time=90ms TTL=39
...
Reply from 132.163.4.101: bytes=32 time=111ms TTL=39
Ping statistics for 132.163.4.101:
Packets: Sent = 25, Received = 25, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 90ms, Maximum = 111ms, Average = 92ms
T---------------------------
52138 01-08-17 22:08:06 50 0 0 404.0 UTC(NIST) *
T---------------------------
####
Reply from XXX.XXX.XXX.XXX: bytes=32 time<10ms TTL=63
-------------------------------------------------------
Reply from 216.115.108.245: bytes=32 time=70ms TTL=237
...
Reply from 216.115.108.245: bytes=32 time=90ms TTL=237
Average = 72ms
-------------------------------------------------------
Reply from 132.163.4.101: bytes=32 time=90ms TTL=39
...
Reply from 132.163.4.101: bytes=32 time=111ms TTL=39
Average = 92ms
-------------------------------------------------------
52138 01-08-17 22:08:06 50 0 0 404.0 UTC(NIST) *
-------------------------------------------------------