24 |
function check_online($dat, $bla) |
function check_online($dat, $bla) |
25 |
{ |
{ |
26 |
global $comps; |
global $comps; |
27 |
|
global $pingcmd; |
28 |
|
|
29 |
if(!isset($comps[$dat['serial']])) return false; |
if(!isset($comps[$dat['serial']])) return false; |
30 |
|
|
31 |
//passthru("/bin/ping -I eth0 -c 1 -W 1 -q ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
passthru($pingcmd." ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
|
passthru("/usr/sbin/fping -c 1 -t 50 -q ".$dat['ip']." &> /dev/null && exit 0 || exit 1",$retval); |
|
32 |
if($retval==0) |
if($retval==0) |
33 |
{ |
{ |
34 |
$comps[$dat['serial']]['online'] = true; |
$comps[$dat['serial']]['online'] = true; |