";
$fp = @fsockopen("udp://{$server_addr[$i][0]}", $server_addr[$i][1], $errno, $errstr);
if (!$fp) {
echo "ERROR: $errno - $errstr
\n";
continue;
} else {
fwrite($fp,"GET_SERVSTATUS", 15);
while(1) {
$test2 = fread($fp, 2048);
$test .= trim($test2);
$j = strlen($test2);
if($j < 1024) break;
}
fclose($fp);
}
?>
$pt = new parsePipe();
$test = $pt->nullTrim($test);
//echo "";
$tmpArr = $pt->textArr($test);
$serviceName = $pt->serviceName($test);
$result = $pt->parseIt($tmpArr[$serviceType]);
$tot_tr = $pt->countIt();
echo " \n";
?>
= $serviceName[$serviceType] ?>
MNG SERVER IP: =$server_addr[$i][0]?>, PORT: =$server_addr[$i][1]?>
(=$server_addr[$i][2]?>)
|
| Name |
Server IP |
Server Port |
Last Status Checked At |
Raid |
for($j=0; $j<$tot_tr; $j++){
$alt_str = "[$j]".
" [SERVER STATUS] : ".$pt->translateIt($result[$j][0], 2).
" [SERVER NAME] : ".$pt->translateIt($result[$j][2],2).
" [SERVER IP] : ".$pt->translateIt($result[$j][3],3).
" [SERVER PORT] : ".$pt->translateIt($result[$j][4],4);
if(substr_count($pt->translateIt($result[$j][2],3), "RTS") == 0 && substr_count($pt->translateIt($result[$j][2],3), "FHS")==0) continue;
$command = "bin/arcmond_client ".$pt->translateIt($result[$j][3],3)." 8787 1";
$raid_res = exec($command);
echo "";
$raid_str = explode(":",$raid_res);
?>
| (=$pt->translateIt($result[$j][0],1)?> =$pt->translateIt($result[$j][1],0)?>) =$result[$j][2]?> |
=$pt->translateIt($result[$j][3],3)?> |
=$pt->translateIt($result[$j][4],4)?> |
=date("Y-m-d H:i:s", $raid_str[1])?> |
$raid_res="";
$last_num = count($raid_str) - 1;
//echo $raid_str[0]." ";
//echo $command;
if($raid_str[0]=="0")
{
echo $pt->translateIt(1,1);
echo "translateIt($result[$j][3],3)."&mode=2','viewDetail','width=600, height=650, left=300,top=300, resizable=no, scrollbars=yes, status=yes')\" >";
echo "NO EVENT";
echo "";
//echo $raid_str[2];
}
elseif($raid_str[0]=="1")
{
echo $pt->translateIt(2,1);
echo "translateIt($result[$j][3],3)."&mode=2','viewDetail','width=600, height=650, left=300,top=300, resizable=no, scrollbars=yes, status=yes')\" >";
echo "$raid_str[$last_num]";
echo "";
}
else
{
echo $pt->translateIt(0,1);
//echo "";
echo "translateIt($result[$j][3],3)."&mode=2','viewDetail','width=600, height=650, left=300,top=300, resizable=no, scrollbars=yes, status=yes')\" >";
echo "check err $raid_str[2]$raid_str[3]";
echo "";
}
?>
|
}
?>
|
if($i%3 == 2) echo "