Skip to content

Commit

Permalink
ping mlx once a day
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed May 18, 2016
1 parent 34203d8 commit acca25e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion clusterd
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,13 @@ sub check_overload() {
}
}

sub ping_mlx {
Donald::Select::timeout_requeue(86400);
system 'ping','-c','1','mlx';
if ($?) {
warn "failed to ping mlx\n";
}
}

#####################################################

Expand Down Expand Up @@ -1459,7 +1466,7 @@ if (defined $options{'push'}) {
$my_hostname eq $STAT_TARGET and My::Cluster::Updown::init();
$my_hostname eq 'lol' and My::NetlogReceiver::init();
Donald::Select::timeout(600,\&check_overload);

Donald::Select::timeout(30,\&ping_mlx);

Donald::Select::run();
} elsif ($options{'lsof'}) {
Expand Down

0 comments on commit acca25e

Please sign in to comment.