diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-03-27 08:27:17 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-03-27 08:27:17 +0200 |
commit | 1d2470a411e5eaac7e5a1c5d5b6b81e92c92f4a8 (patch) | |
tree | 54b901757b088d54d33e70f28a6203383b4dc844 /clients/ping.pl | |
parent | 0a230ac5481b9518abc64181dbbb4509d83c0b89 (diff) | |
parent | 96a9bb4c42f4b53020302fea2a46e734c61c0319 (diff) |
Merge branch 'master' of github.com:tech-server/tgmanage
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 = (); |