"; $res=mysqli_query($pubConn,$sql); $num=mysqli_num_rows($res); if($num != 1) { return 0; } $row=@mysqli_fetch_array($res); $baseStat=$row[detailStat]; $compStat=substr($baseStat,38); $compStatLen=strlen($compStat)-1; //echo "$compStat
"; $index=0; $i=0; while($i<$compStatLen) { $tmp=substr($compStat,$i,4); $component[$index][ID]=$tmp+0; $i+=4; $tmp=substr($compStat,$i,4); $component[$index][Length]=hexdec($tmp); $i+=4; $component[$index][Content]=substr($compStat,$i,$component[$index][Length]*2); $i+=$component[$index][Length]*2; $index++; } //echo "
";
	//print_r($component);
	//echo "
"; if($component[8][Length] > 0) { $snmp_hb=$component[8][Content]; //echo "{$component[8][Length]}
$snmp_hb
"; //Start Time $pos=0; $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $plat[StartTime][Value]=date("Y-m-d H:i:s",$tmpValue); $plat[StartTime][Color]="#0000ff"; $plat[StartTime][Display]="block"; $pos+=8; //CPU Use Rate $tmpValue=100-hexdec(substr($snmp_hb,$pos,2)); $plat[CPURate][Value]="{$tmpValue}%"; $plat[CPURate][Color]="#000000"; $plat[CPURate][Display]="block"; //崝樓 $plat[CPU]=GetLabel(floor($tmpValue/10)); //崝樓 //CPU Use Rate Process Num $plat[CPURatePN][Value]=floor($tmpValue/10); $plat[CPURatePN][Color]="#0000ff"; $plat[CPURatePN][Display]="Rect"; $pos+=2; //Physical Memory Used/Total $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue1=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue2=floor(($tmpValue/$tmpValue1)*100); $plat[PMTotalRate][Value]="{$tmpValue2}%"; $plat[PMTotalRate][Color]="#000000"; $plat[PMTotalRate][Display]="block"; $plat[PMTotalRateV][Value]=(floor($tmpValue/1024))."M/".(floor($tmpValue1/1024))."M"; $plat[PMTotalRateV][Color]="#000000"; $plat[PMTotalRateV][Display]="block"; $plat[PMTotalRatePN][Value]=floor($tmpValue2/10); $plat[PMTotalRatePN][Color]="#0000ff"; $plat[PMTotalRatePN][Display]="Rect"; //Physical Memory Used/Swap $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue1=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue2=floor(($tmpValue/$tmpValue1)*100); $plat[PMSwapRate][Value]="{$tmpValue2}%"; $plat[PMSwapRate][Color]="#000000"; $plat[PMSwapRate][Display]="block"; $plat[PMSwapRateV][Value]=(floor($tmpValue/1024))."M/".(floor($tmpValue1/1024))."M"; $plat[PMSwapRateV][Color]="#000000"; $plat[PMSwapRateV][Display]="block"; $plat[PMSwapRatePN][Value]=floor($tmpValue2/10); $plat[PMSwapRatePN][Color]="#0000ff"; $plat[PMSwapRatePN][Display]="Rect"; //Physical Memory Buffers $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $plat[PMBuffers][Value]=(floor($tmpValue/1024))."M"; $plat[PMBuffers][Color]="#000000"; $plat[PMBuffers][Display]="block"; //Physical Memory Cached $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $plat[PMCached][Value]=(floor($tmpValue/1024))."M"; $plat[PMCached][Color]="#000000"; $plat[PMCached][Display]="block"; //Harddisk $tmpValue=hexdec(substr($snmp_hb,$pos,2)); $pos+=2; $plat[HDNum]=$tmpValue; for($i=0;$i<$plat[HDNum];$i++) { $tmpValue=hexdec(substr($snmp_hb,$pos,2)); $pos+=2; $path_len=$tmpValue; $path=""; for($j=0;$j<$path_len;$j++) { $path.=chr(hexdec(substr($snmp_hb,$pos,2))); $pos+=2; } $plat[HD][$i][Path][Value]="($path)"; $plat[HD][$i][Path][Color]="#000000"; $plat[HD][$i][Path][Display]="block"; $tmpValue=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue1=hexdec(substr($snmp_hb,$pos,8)); $pos+=8; $tmpValue2=floor(($tmpValue/$tmpValue1)*100); $plat[HD][$i][PN][Value]=floor($tmpValue2/10); $plat[HD][$i][PN][Color]="#0000ff"; $plat[HD][$i][PN][Display]="Rect"; $plat[HD][$i][V][Value]=(floor($tmpValue/1024))."M/".(floor($tmpValue1/1024))."M"; $plat[HD][$i][V][Color]="#000000"; $plat[HD][$i][V][Display]="block"; $plat[HD][$i][Rate][Value]="{$tmpValue2}%"; $plat[HD][$i][Rate][Color]="#000000"; $plat[HD][$i][Rate][Display]="block"; } } return $plat; } ?> "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; /* echo ""; */ echo ""; echo ""; echo "
"; echo "Advanced > PLAT Status"; echo ""; showHelp($helpId); echo "
"; echo " "; echo ""; //echo "$strBlack"; echo "back"; echo "
"; adjust_title_tail(); adjust_content_head(); ?> PLAT STATUS information( Version:"; $table_title.="{$platDetailInfo[version][Status][Value]}"; $table_title.=")"; echo "
$table_title

"; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; //Start Time echo ""; echo ""; echo ""; //echo ""; echo ""; //CPU Use Rate echo ""; echo ""; echo ""; //echo ""; echo ""; //CPU Use Rate Process Num echo ""; echo ""; echo ""; //echo ""; echo ""; //Physical Memory Used/Total echo ""; echo ""; echo ""; //echo ""; echo ""; //Physical Memory Used/Swap echo ""; echo ""; echo ""; //echo ""; echo ""; //Harddisk echo ""; echo ""; echo ""; //echo ""; echo ""; echo "
StatusY--
Dual server modeSingle
Reflash time{$platDetailInfo[RefreshTime][Value]}--
Start time{$plat_status[StartTime][Value]}--
CPU use rate/Process Num"; echo "{$plat_status[CPU]}"; echo "{$plat_status[CPURate][Value]}/{$plat_status[CPURatePN][Value]}--/--
Physical Memory Used/Total{$plat_status[PMTotalRate][Value]}/ {$plat_status[PMTotalRateV][Value]} / {$plat_status[PMTotalRatePN][Value]}--/--/--
Physical Memory Used/Swap{$plat_status[PMSwapRate][Value]}/{$plat_status[PMSwapRateV][Value]}/{$plat_status[PMSwapRatePN][Value]}--/--/--
Physical Memory Buffers/Cached{$plat_status[PMBuffers][Value]}/{$plat_status[PMCached][Value]}--/--/--
Harddisk{$plat_status[PMBuffers][Value]}/{$plat_status[PMCached][Value]}--/--/--
"; ?> "; echo ""; //echo "back"; echo ""; echo "back"; echo ""; echo ""; echo ""; ?>