Thread Per ssh eine ping machen (10 answers)
Opened by Michi at 2011-10-11 13:48

Gast Michi
 2011-10-14 13:45
#153218 #153218
Hallo, es sieht es jetzt aus:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Check if host ist available


my @cmd_5 = ("ping -c 1 $bmw_host1",);
$rc_5 = system( @cmd_5 );
print "rc5 $!\n";
my @cmd_6 = ("ping -c 1 $bmw_host2",);
$rc_6 = system( @cmd_6 );
print "rc6 $!";
if ($rc_5 == 0) {
print "\n\nHost: $bmw_host1\n\n\n";
$bmw_host = $bmw_host1;
$global_flag_ping = 0;
}
elsif ($rc_6 == 0) {
print "\n\nHost: $bmw_host2\n\n\n";
$bmw_host = $bmw_host2;
$global_flag_ping = 0;
}
else
{
print "\n\nNo host availible\n\n\n";
print "\n Sleep \n";
sleep $download_sleep_time;
$global_flag_ping = 1;
}


ist allerdings ein direkter ping jetzt nicht über ssh

$! gibt gar nix aus
Last edited: 2011-10-14 13:51:20 +0200 (CEST)

View full thread Per ssh eine ping machen