mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-08 21:16:17 +09:00
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@2 860744bd-22fc-0310-8c96-e9fe5004b5ca
12 lines
259 B
Perl
12 lines
259 B
Perl
#!/usr/bin/perl
|
|
|
|
if ($ARGV[0]=="x") {
|
|
$db = ":0";
|
|
$ARGV[0] = 2;
|
|
}
|
|
|
|
$response = `ping $ARGV[1] -c $ARGV[0] |grep round-trip| awk '\{print \$4 \}' | awk -F / '\{print \$1 \}' | grep -v "Warning"`;
|
|
chomp $response;
|
|
$response = $response;
|
|
print "$response$db";
|