init web ems all
This commit is contained in:
289
wxc2_omc/performance/mhcCsta/csta_down.php
Executable file
289
wxc2_omc/performance/mhcCsta/csta_down.php
Executable file
@@ -0,0 +1,289 @@
|
||||
<?php
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
|
||||
<?php
|
||||
//============scroll the page====================
|
||||
if($scroll_y > 0){
|
||||
//echo "<body style=\"overflow-x:hidden\" topmargin=\"5\" leftmargin=\"12\" onLoad='self.scrollBy(0,$scroll_y)'>";
|
||||
echo "<body leftmargin=\"15\" rightmargin=\"10\" onload=\"javascript:scroll_div('$scroll_y');javascript:adjust_frame('down');\" onresize=\"javascript:adjust_frame('down');\" style=\"overflow:hidden;overflow-x:hidden;overflow-y:hidden;\">";
|
||||
}else{
|
||||
echo "<body leftmargin=\"15\" rightmargin=\"10\" onload=\"javascript:adjust_frame('down');\" onresize=\"javascript:adjust_frame('down');\" style=\"overflow:hidden;overflow-x:hidden;overflow-y:hidden;\">";
|
||||
}
|
||||
|
||||
adjust_head_frame("down");
|
||||
adjust_title_head_frame("down");
|
||||
adjust_title_tail_frame("down");
|
||||
|
||||
adjust_content_head_frame("down");
|
||||
echo "<br>";
|
||||
//=====================================================================================|
|
||||
//============================Function Flag============================================|
|
||||
//=====================================================================================|
|
||||
$Hide_Show_Function_On=0;
|
||||
$DEBUG=0;
|
||||
//=====================================================================================|
|
||||
//============================Data From Index Page=====================================|
|
||||
//=====================================================================================|
|
||||
if(0)
|
||||
{
|
||||
|
||||
$url_temp=$_SERVER["REQUEST_URI"];
|
||||
echo "This page URL:$url_temp<br>";
|
||||
|
||||
echo "sel_date_from:$sel_date_from<br>";
|
||||
echo "sel_date_to:$sel_date_to<br>";
|
||||
}
|
||||
//=====================================================================================|
|
||||
//============================Define The Data==========================================|
|
||||
//=====================================================================================|
|
||||
$csta_field=array(
|
||||
0=>"hlr_noti_mhc",
|
||||
1=>"mhc_noti_hlr",
|
||||
2=>"rep_att",
|
||||
3=>"rep_suc",
|
||||
4=>"rep_fail",
|
||||
5=>"veri_att",
|
||||
6=>"veri_suc",
|
||||
7=>"veri_fail",
|
||||
8=>"veri_del_att",
|
||||
9=>"veri_del_suc",
|
||||
10=>"veri_del_fail",
|
||||
11=>"veri_dld_att",
|
||||
12=>"veri_dld_suc",
|
||||
13=>"veri_dld_fail",
|
||||
14=>"mhc_msg_sent",
|
||||
15=>"mhc_msg_recv",
|
||||
);
|
||||
|
||||
$csta_show_field=array(
|
||||
0=>"HLR Notify MHC",
|
||||
1=>"MHC Notify HLR",
|
||||
2=>"Replication Attempt",
|
||||
3=>"Replication Success",
|
||||
4=>"Replication Fail",
|
||||
5=>"Verification Attempt",
|
||||
6=>"Verification Success",
|
||||
7=>"Verification Fail",
|
||||
8=>"Verification Deleted Attempt",
|
||||
9=>"Verification Deleted Success",
|
||||
10=>"Verification Deleted Fail",
|
||||
11=>"Verification Download Attempt",
|
||||
12=>"Verification Download Success",
|
||||
13=>"Verification Download Fail",
|
||||
14=>"MHC Message Sent",
|
||||
15=>"MHC Message Received",
|
||||
);
|
||||
|
||||
//data define
|
||||
for($i=0;$i<sizeof($csta_field);$i++)
|
||||
{
|
||||
$service_csta[$i]=0;
|
||||
}
|
||||
|
||||
/*
|
||||
0-16 MHC Node
|
||||
0-6 out_attempt,out_success,out_fail,in_attempt,in_success,in_fail
|
||||
*/
|
||||
for($i=0;$i<16;$i++)
|
||||
{
|
||||
for($j=0;$j<6;$j++)
|
||||
{
|
||||
$sync_csta[$i][$j]=0;
|
||||
}
|
||||
}
|
||||
|
||||
//===================================================================================|
|
||||
//========================Get The Data From DB=======================================|
|
||||
//===================================================================================|
|
||||
$db="CSTA_DB";
|
||||
$bgn_time=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$sel_date_from,date("Y")));
|
||||
$end_time=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-$sel_date_to,date("Y")));
|
||||
//get the numbers of days that selected
|
||||
$slot=$sel_date_from-$sel_date_to+1;
|
||||
if(0)
|
||||
{
|
||||
echo "bgn_time:$bgn_time<br>";
|
||||
echo "end_time:$end_time<br>";
|
||||
echo "slot:$slot<br>";
|
||||
echo "db:$csta_db<br>";
|
||||
}
|
||||
|
||||
$sql_sum="";
|
||||
for($i=0;$i<sizeof($csta_field);$i++)
|
||||
{
|
||||
$sql_sum.="sum(".$csta_field[$i].") as ".$csta_field[$i].",";
|
||||
}
|
||||
for($i=0;$i<96;$i++)
|
||||
{
|
||||
$j=$i%6;
|
||||
$k=floor($i/6);
|
||||
switch($j)
|
||||
{
|
||||
case 0:
|
||||
$sql_sum.="sum(syn_o_a_".$k.") as syn_o_a_".$k.",";
|
||||
break;
|
||||
case 1:
|
||||
$sql_sum.="sum(syn_o_s_".$k.") as syn_o_s_".$k.",";
|
||||
break;
|
||||
case 2:
|
||||
$sql_sum.="sum(syn_o_f_".$k.") as syn_o_f_".$k.",";
|
||||
break;
|
||||
case 3:
|
||||
$sql_sum.="sum(syn_i_a_".$k.") as syn_i_a_".$k.",";
|
||||
break;
|
||||
case 4:
|
||||
$sql_sum.="sum(syn_i_s_".$k.") as syn_i_s_".$k.",";
|
||||
break;
|
||||
case 5:
|
||||
$sql_sum.="sum(syn_i_f_".$k.") as syn_i_f_".$k.",";
|
||||
break;
|
||||
}
|
||||
}
|
||||
$sql_sum=substr($sql_sum,0,strlen($sql_sum)-1);
|
||||
|
||||
//$key_type_relation=array(5=>0,6=>1,7=>2,8=>3,9=>4,10=>5,11=>6,12=>7,13=>8,14=>9,15=>10,16=>11);
|
||||
for($day=0;$day<$slot;$day++)
|
||||
{
|
||||
$table_name="mhcDetail";
|
||||
$temp=date("d",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
|
||||
$table_name=$table_name."_".$temp;
|
||||
|
||||
//echo "table_name:$table_name<br>";
|
||||
$from_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
|
||||
$to_time=date("Y-m-d H:i:s",mktime(23,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
|
||||
//echo "from:$from_time--to:$to_time<br>";
|
||||
|
||||
$select="select $sql_sum ";
|
||||
$from="from $table_name ";
|
||||
$service_where="and key_type=1 ";
|
||||
$where="where csta_datetime >='$from_time' and csta_datetime <'$to_time' ".$service_where;
|
||||
$group="group by key_type ";
|
||||
$order="order by key_type ";
|
||||
$sql=$select.$from.$where.$group.$order;
|
||||
//echo "$sql<br>";
|
||||
$result=@mysqli_query($pubConn,$sql);
|
||||
$rows=@mysqli_fetch_array($result);
|
||||
|
||||
if(!$rows)
|
||||
continue;
|
||||
|
||||
do{
|
||||
$field_num=sizeof($csta_field);
|
||||
for($tt=0;$tt<$field_num;$tt++)
|
||||
{
|
||||
$service_csta[$tt]+=$rows[$tt];
|
||||
}
|
||||
for($tt=0;$tt<16;$tt++)
|
||||
{
|
||||
for($i=0;$i<6;$i++)
|
||||
{
|
||||
$sync_csta[$tt][$i]+=$rows[$field_num+$tt*6+$i]+0;
|
||||
}
|
||||
}
|
||||
}while($rows=mysqli_fetch_array($result));
|
||||
}
|
||||
|
||||
//get the 0-hour of the day
|
||||
for($day=0;$day<$slot;$day++)
|
||||
{
|
||||
$table_name="mhcDetail";
|
||||
$temp=date("d",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day-1,date("Y")));
|
||||
$table_name=$table_name."_".$temp;
|
||||
|
||||
//echo "table_name:$table_name<br>";
|
||||
$from_time=date("Y-m-d H:i:s",mktime(23,0,0,date("m"),date("d")-$sel_date_from+$day-1,date("Y")));
|
||||
$to_time=date("Y-m-d H:i:s",mktime(0,0,0,date("m"),date("d")-$sel_date_from+$day,date("Y")));
|
||||
//echo "from:$from_time--to:$to_time<br>";
|
||||
|
||||
$select="select $sql_sum ";
|
||||
$from="from $table_name ";
|
||||
$service_where="and key_type=1 ";
|
||||
$where="where csta_datetime >='$from_time' and csta_datetime <'$to_time' ".$service_where;
|
||||
$group="group by key_type ";
|
||||
$order="order by key_type ";
|
||||
$sql=$select.$from.$where.$group.$order;
|
||||
//echo "$sql<br>";
|
||||
|
||||
$result=@mysqli_query($pubConn,$sql);
|
||||
$rows=@mysqli_fetch_array($result);
|
||||
|
||||
if(!$rows)
|
||||
continue;
|
||||
|
||||
do{
|
||||
$field_num=sizeof($csta_field);
|
||||
for($tt=0;$tt<$field_num;$tt++)
|
||||
{
|
||||
$service_csta[$tt]+=$rows[$tt];
|
||||
}
|
||||
for($tt=0;$tt<16;$tt++)
|
||||
{
|
||||
for($i=0;$i<6;$i++)
|
||||
{
|
||||
$sync_csta[$tt][$i]+=$rows[$field_num+$tt*6+$i]+0;
|
||||
}
|
||||
}
|
||||
}while($rows=mysqli_fetch_array($result));
|
||||
}
|
||||
|
||||
|
||||
//===================================================================================|
|
||||
//=======================Show The Table-1============================================|
|
||||
//===================================================================================|
|
||||
//===table title
|
||||
if($slot==1)
|
||||
$table_title="Statistic Date:".$bgn_time;
|
||||
else
|
||||
$table_title="Statistic Date:".$bgn_time." to ".$end_time;
|
||||
echo "<center><b>$table_title</b></center>";
|
||||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td align=\"center\" width=\"50%\">Type</td>";
|
||||
echo "<td align=\"center\" width=\"50%\">Value</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for($i=0;$i<sizeof($csta_field);$i++)
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>{$csta_show_field[$i]}</td>";
|
||||
echo "<td>{$service_csta[$i]}</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
|
||||
echo "<table border=\"1\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" bordercolor=\"#666666\" bordercolordark=\"#FFFFFF\" bgcolor=\"#FFFFFF\">";
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td rowspan=2 width=10%>Node Index</td>";
|
||||
echo "<td colspan=3 align=center>Synchronization Outgoing</td>";
|
||||
echo "<td colspan=3 align=center>Synchronization Incoming</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr bgcolor=\"#E6E6E6\">";
|
||||
echo "<td align=center>Attempt</td>";
|
||||
echo "<td align=center>Success</td>";
|
||||
echo "<td align=center>Fail</td>";
|
||||
echo "<td align=center>Attempt</td>";
|
||||
echo "<td align=center>Success</td>";
|
||||
echo "<td align=center>Fail</td>";
|
||||
echo "</tr>";
|
||||
echo "</tr>";
|
||||
for($i=0;$i<16;$i++)
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>$i</td>";
|
||||
for($j=0;$j<6;$j++)
|
||||
{
|
||||
echo "<td>{$sync_csta[$i][$j]}</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
|
||||
|
||||
adjust_content_tail("down");
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
21
wxc2_omc/performance/mhcCsta/csta_frame.php
Executable file
21
wxc2_omc/performance/mhcCsta/csta_frame.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
|
||||
|
||||
<frameset rows="75,*" frameborder=0 border=0>
|
||||
<?php
|
||||
echo "<frame scrolling=\"no\" name=\"csta_up\" src=\"csta_up.php\">";
|
||||
echo "<frame name=\"csta_down\" src=\"csta_down.php\">";
|
||||
?>
|
||||
|
||||
<noframes>
|
||||
<body>
|
||||
<p>Frame isn't supported!</p>
|
||||
</body>
|
||||
</noframes>
|
||||
</frameset>
|
||||
|
||||
|
||||
|
||||
|
||||
100
wxc2_omc/performance/mhcCsta/csta_up.php
Executable file
100
wxc2_omc/performance/mhcCsta/csta_up.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
//Include the head file
|
||||
require("../../inc/header.inc");
|
||||
?>
|
||||
|
||||
<script language="JavaScript">
|
||||
//the function is called when the sel_date_from value changed
|
||||
function sel_date_from_change()
|
||||
{
|
||||
var down_date_from=document.myform.sel_date_from.value;
|
||||
var down_date_to=document.myform.sel_date_to.value;
|
||||
//var scrollY=document.body.scrollTop;
|
||||
if(down_date_from<=down_date_to)
|
||||
down_date_to=down_date_from;
|
||||
//var urll='<?php echo"$PHP_SELF";?>?sel_date_from='+down_date_from+'&sel_date_to='+down_date_to+'&scroll_y='+scrollY;
|
||||
var urll='<?php echo"$PHP_SELF";?>?sel_date_from='+down_date_from+'&sel_date_to='+down_date_to;
|
||||
window.location.href=urll;
|
||||
}
|
||||
</script>
|
||||
<base target="csta_down">
|
||||
<body leftmargin="15" rightmargin="10" onload="javascript:adjust_frame('up');" onresize="javascript:adjust_frame('up');" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;">
|
||||
<form action="csta_down.php" method="post" name="myform">
|
||||
<?php
|
||||
adjust_head_frame("up");
|
||||
adjust_title_head_frame("up");
|
||||
echo "<table id=\"table_up\" border=0 width=\"100%\">";
|
||||
echo "<tr>";
|
||||
echo "<td width=50% align=\"left\">";
|
||||
echo "$strTitlePerformance > MHC";
|
||||
echo "</td>";
|
||||
echo "<td align=\"right\">";
|
||||
$helpId="3.14";
|
||||
showHelp($helpId);
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td align=\"left\">";
|
||||
|
||||
if(!isset($sel_date_from))
|
||||
$sel_date_from=0;
|
||||
if(!isset($sel_date_to))
|
||||
$sel_date_to=0;
|
||||
//selection date define
|
||||
$day0=date("Y-m-d",mktime(0,0,0,date("m"),date("d"),date("Y")));
|
||||
$day1=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-1,date("Y")));
|
||||
$day2=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-2,date("Y")));
|
||||
$day3=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-3,date("Y")));
|
||||
$day4=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-4,date("Y")));
|
||||
$day5=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-5,date("Y")));
|
||||
$day6=date("Y-m-d",mktime(0,0,0,date("m"),date("d")-6,date("Y")));
|
||||
?>
|
||||
<select name="sel_date_from" onChange="javascript:sel_date_from_change()">
|
||||
<?php
|
||||
for($i=0;$i<7;$i++)
|
||||
{
|
||||
if($i==$sel_date_from)
|
||||
echo "<option selected value=$i>${day.$i}</option>";
|
||||
else
|
||||
echo "<option value=$i>${day.$i}</option>";
|
||||
}
|
||||
?>
|
||||
</select>to
|
||||
<!--=========================date to selection=================================-->
|
||||
<select name="sel_date_to">
|
||||
<?php
|
||||
for($i=0;$i<=$sel_date_from;$i++)
|
||||
{
|
||||
if($i==$sel_date_to)
|
||||
echo "<option selected value=$i>${day.$i}</option>";
|
||||
else
|
||||
echo "<option value=$i>${day.$i}</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<!--=========================the search button============================-->
|
||||
<span onClick="javascript:myform.submit()" style="cursor:hand">
|
||||
<IMG align=absBottom border=0 src="../../images/search.gif" ><?php echo "$strSearch"; ?>
|
||||
</span>
|
||||
<?php
|
||||
echo "</td>";
|
||||
echo "<td align=\"right\">";
|
||||
?>
|
||||
<!--==========================the print button=============================-->
|
||||
<span onClick="window.print();" style="cursor:hand">
|
||||
<img align=absBottom border=0 src="../../images/printer.gif" width="16" height="16">
|
||||
</span>
|
||||
<?php
|
||||
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
adjust_title_tail_frame("up");
|
||||
adjust_content_head_frame("up");
|
||||
adjust_content_tail_frame("up");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
Reference in New Issue
Block a user