Files
cacti/scripts/ping.pl
T
Ian Berry 7545df6a7b use match regexp operator
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@858 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-04-16 04:57:43 +00:00

7 lines
120 B
Perl

#!/usr/bin/perl
$ping = `ping -c 1 $ARGV[0] -w 1 | grep icmp_seq`;
$ping =~ m/(.*time=)(.*) (ms|usec)/;
print $2;