diff options
Diffstat (limited to 'clients/ping.pl')
-rwxr-xr-x | clients/ping.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clients/ping.pl b/clients/ping.pl index 27aa878..d945917 100755 --- a/clients/ping.pl +++ b/clients/ping.pl @@ -15,13 +15,13 @@ my $dbh = nms::db_connect(); $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; -my $q = $dbh->prepare("SELECT switch,host(ip) as ip,host(secondary_ip) as secondary_ip FROM switches WHERE ip is not null ORDER BY random()"); -my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets"); +my $q = $dbh->prepare("SELECT switch,host(mgmt_v4_addr) as ip,host(mgmt_v6_addr) as secondary_ip FROM switches WHERE mgmt_v4_addr is not null ORDER BY random()"); +my $lq = $dbh->prepare("SELECT linknet,addr1,addr2 FROM linknets WHERE addr1 is not null and addr2 is not null"); while (1) { # ping loopbacks my $ping = Net::Oping->new; - $ping->timeout(0.2); + $ping->timeout(0.3); $q->execute; my %ip_to_switch = (); @@ -73,7 +73,7 @@ while (1) { $dbh->commit; # ping linknets $ping = Net::Oping->new; - $ping->timeout(0.2); + $ping->timeout(0.3); $lq->execute; my @linknets = (); |