Commit 20b78207 authored by 's avatar
Browse files

IPv6 as L3 protocol


git-svn-id: file:///home/svn/mapi/trunk@1408 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 2885d4c1
...@@ -12,7 +12,7 @@ define(ABW_DIR, "/usr/local/abw"); ...@@ -12,7 +12,7 @@ define(ABW_DIR, "/usr/local/abw");
define(ABW_VAR_DIR, "/var/lib/abw"); define(ABW_VAR_DIR, "/var/lib/abw");
/* Directory on the web server where ABW scripts should be installed */ /* Directory on the web server where ABW scripts should be installed */
define(WEB_DIR, "/var/www/abw"); define(WEB_DIR, "/srv/www/abw");
/* /*
* Define subjects * Define subjects
...@@ -24,9 +24,11 @@ define(WEB_DIR, "/var/www/abw"); ...@@ -24,9 +24,11 @@ define(WEB_DIR, "/var/www/abw");
* the abw.conf configuration file. * the abw.conf configuration file.
*/ */
$subject_label=array( $subject_label=array(
"Prague_PoP" "sa3-pm1",
/* , "cityA_to_cityB" */ "sa3-pm2",
/* , "cityC_to_cityD" */ "sa3-pm3",
"sa3-pm4",
"sa3-pm5"
); );
/* /*
...@@ -35,9 +37,11 @@ $subject_label=array( ...@@ -35,9 +37,11 @@ $subject_label=array(
* the abw.conf configuration file, but it is not required. * the abw.conf configuration file, but it is not required.
*/ */
$subject_description=array( $subject_description=array(
"Prague PoP", "SA3 PM1",
/* , "city A to city B" */ "SA3 PM2",
/* , "city C to city D" */ "SA3 PM3",
"SA3 PM4",
"SA3 PM5"
); );
/* /*
...@@ -47,18 +51,20 @@ $subject_description=array( ...@@ -47,18 +51,20 @@ $subject_description=array(
* individual remote monitoring stations directly. * individual remote monitoring stations directly.
*/ */
$subject_hostname=array( $subject_hostname=array(
"perfmon1.cesnet.cz", "sa3-pm1.geant2.net",
/* , "central_station.your_domain.org" */ "sa3-pm2.geant2.net",
/* , "monitoring_station.your_domain.org" */ "sa3-pm3.geant2.net",
"sa3-pm4.geant2.net",
"sa3-pm5.geant2.net"
); );
/* If 1 then the subject is disabled (shown gray in the user interface) */ /* If 1 then the subject is disabled (shown gray in the user interface) */
$subject_disabled=array( 0 /* , 0, 1 */ ); $subject_disabled=array( 0, 0, 0, 0, 0 );
/* The following is optional configuration - you do not need to include it */ /* The following is optional configuration - you do not need to include it */
/* Picture of the monitored network to be shown in the user interface */ /* Picture of the monitored network to be shown in the user interface */
define(NET_IMG, "cesnet-logo-137.png"); define(NET_IMG, "GEANT2_logo_72dpi_RGB.jpg");
/* END OF USER CONFIGURATION SECTION */ /* END OF USER CONFIGURATION SECTION */
......
...@@ -62,7 +62,7 @@ $time_length[6]="1year"; ...@@ -62,7 +62,7 @@ $time_length[6]="1year";
*/ */
$graph_type_label=array("l4", "apps"); $graph_type_label=array("l4", "apps");
$graph_type_description=array("L4 protocols", "Application protocols"); $graph_type_description=array("L3/L4 protocols", "Application protocols");
/* /*
* Set global variables (from the web form) * Set global variables (from the web form)
...@@ -74,8 +74,8 @@ $graph_type_description=array("L4 protocols", "Application protocols"); ...@@ -74,8 +74,8 @@ $graph_type_description=array("L4 protocols", "Application protocols");
*/ */
if (!isset($default)) { if (!isset($default)) {
$graph_types[0]="l4"; $graph_types[0]="apps";
$graph_types[1]="apps"; /* $graph_types[1]="l4" */;
$subject_all=1; $subject_all=1;
$times[0]=$r1[0] . "_" . $r2[0] . "_" . $time_length[0]; $times[0]=$r1[0] . "_" . $r2[0] . "_" . $time_length[0];
/* $times[1]=$r1[1] . "_" . $r2[1] . "_" . $time_length[1]; /* $times[1]=$r1[1] . "_" . $r2[1] . "_" . $time_length[1];
...@@ -161,7 +161,7 @@ syslog(LOG_INFO, "$func: starting"); ...@@ -161,7 +161,7 @@ syslog(LOG_INFO, "$func: starting");
echo "<html>\n"; echo "<html>\n";
echo "<head>\n"; echo "<head>\n";
echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style.css\">\n"; echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"../style.css\">\n";
echo "</head>\n"; echo "</head>\n";
echo "<body>\n"; echo "<body>\n";
...@@ -209,7 +209,7 @@ echo "<p>\n"; ...@@ -209,7 +209,7 @@ echo "<p>\n";
echo "<b>Step 2: Select monitored links:</b><p>\n"; echo "<b>Step 2: Select monitored links:</b><p>\n";
echo "<table border=1>\n"; echo "<table border=1>\n";
foreach ($subject_label as $key => $value) { foreach ($subject_label as $key => $value) {
if (($i%2)==0) /* if (($i%2)==0) */
echo "<tr>\n"; echo "<tr>\n";
echo "<td>$subject_description[$key]</td>"; echo "<td>$subject_description[$key]</td>";
echo "<td><input type=checkbox name=\"subjects[]\" value=\"$value\""; echo "<td><input type=checkbox name=\"subjects[]\" value=\"$value\"";
...@@ -220,13 +220,13 @@ foreach ($subject_label as $key => $value) { ...@@ -220,13 +220,13 @@ foreach ($subject_label as $key => $value) {
if ($subject_disabled[$key] > 0) if ($subject_disabled[$key] > 0)
echo " disabled"; echo " disabled";
echo "></td>\n"; echo "></td>\n";
if (($i%2)>0) /* if (($i%2)>0) */
echo "</tr>\n"; echo "</tr>\n";
$i++; $i++;
} }
if (($i%2)==0) /* if (($i%2)==0)
echo "<tr>\n"; echo "<tr>\n"; */
echo "<td>all links</td>\n"; echo "<td>all links</td>\n";
echo "<td><input type=checkbox name=\"subject_all\""; echo "<td><input type=checkbox name=\"subject_all\"";
if ($subject_all) if ($subject_all)
...@@ -423,9 +423,9 @@ if ($action=="gen_graph") { ...@@ -423,9 +423,9 @@ if ($action=="gen_graph") {
(isset($times) || $time_all || strcmp($time_type, "predefined"))) { (isset($times) || $time_all || strcmp($time_type, "predefined"))) {
$total_time=0; $total_time=0;
echo "<p>\n"; /* echo "<p>\n";
echo "<table>\n"; echo "<table border=1>\n";
echo "<tr><td>Graph type</td><td>Link</td><td>Time (gen / copy)</td></tr>\n"; echo "<tr><td>Graph type</td><td>Link</td><td>Time (gen / copy)</td></tr>\n"; */
mkdir($GRAPH_DIR . "/" . $session); mkdir($GRAPH_DIR . "/" . $session);
...@@ -444,7 +444,12 @@ if ($action=="gen_graph") { ...@@ -444,7 +444,12 @@ if ($action=="gen_graph") {
$hostname=$subject_hostname[$i]; $hostname=$subject_hostname[$i];
$command="ssh " . $REMOTE_USERNAME . "@" . $subject_hostname[$i] . " \"" . $GRAPH_SCRIPT . " --session=" . $session . " --graph_type=" . $graph_type_value . " --label=" . $subject_value . " --parameters_id=1"; if ($hostname!="localhost")
$command="ssh " . $REMOTE_USERNAME . "@" . $hostname;
else
$command="";
$command=$command . " \"" . $GRAPH_SCRIPT . " --session=" . $session . " --graph_type=" . $graph_type_value . " --label=" . $subject_value . " --parameters_id=1";
/* If maxline is not default ("a"), then request it */ /* If maxline is not default ("a"), then request it */
...@@ -534,25 +539,30 @@ if ($action=="gen_graph") { ...@@ -534,25 +539,30 @@ if ($action=="gen_graph") {
$time2=gettimeofday(); $time2=gettimeofday();
$diff=time_diff($time1, $time2); $diff=time_diff($time1, $time2);
$total_time+=$diff; $total_time+=$diff;
printf("<tr><td>%s</td><td>%s</td><td>%.02fs / ", /* printf("<tr><td>%s</td><td>%s</td><td>%.02fs / ",
$graph_type_description[$graph_type_key], $subject_value, $graph_type_description[$graph_type_key], $subject_value,
$diff); $diff); */
$command="scp " . $REMOTE_USERNAME . "@" . $subject_hostname[$i] . ":" . $REMOTE_GRAPH_DIR . "/" . $session . "/* " . $GRAPH_DIR . "/" . $session; if ($hostname!="localhost")
$command="scp " . $REMOTE_USERNAME . "@" . $hostname . ":";
else
$command="cp ";
$command=$command . $REMOTE_GRAPH_DIR . "/" . $session . "/* " . $GRAPH_DIR . "/" . $session;
syslog(LOG_DEBUG, "Command: $command"); syslog(LOG_DEBUG, "Command: $command");
$time1=gettimeofday(TRUE); $time1=gettimeofday(TRUE);
system($command); system($command);
$time2=gettimeofday(TRUE); $time2=gettimeofday(TRUE);
$diff=time_diff($time1, $time2); $diff=time_diff($time1, $time2);
$total_time+=$diff; $total_time+=$diff;
printf("%.02fs</td></tr>\n", $diff); /* printf("%.02fs</td></tr>\n", $diff); */
} }
$i++; $i++;
} }
} /* if (in_array($graph_type_value, $graph_types)) */ } /* if (in_array($graph_type_value, $graph_types)) */
} /* foreach($graph_type_label as $graph_type_key => $graph_type_value) */ } /* foreach($graph_type_label as $graph_type_key => $graph_type_value) */
printf("<tr><td>Total time</td><td>&nbsp;</td><td>%.02fs</td></tr>\n", $total_time); /* printf("<tr><td>Total time</td><td>&nbsp;</td><td>%.02fs</td></tr>\n", $total_time);
echo "</table>\n"; echo "</table>\n"; */
echo "<p>\n<table>\n"; echo "<p>\n<table>\n";
$graphs=0; $graphs=0;
......
...@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then ...@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label "out Mb/s in" \ --slope-mode --interlaced --vertical-label "out Mb/s in" \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \
DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:all_in_max_r2=${PREFIX_IN}-all.rrd:mbps:MAX:step=$R2 \ DEF:all_in_max_r2=${PREFIX_IN}-all.rrd:mbps:MAX:step=$R2 \
...@@ -118,7 +118,7 @@ elif [ "x$PREFIX_IN" != "x" ]; then ...@@ -118,7 +118,7 @@ elif [ "x$PREFIX_IN" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label " Mb/s in" \ --slope-mode --interlaced --vertical-label " Mb/s in" \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \
DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:all_in_max_r2=${PREFIX_IN}-all.rrd:mbps:MAX:step=$R2 \ DEF:all_in_max_r2=${PREFIX_IN}-all.rrd:mbps:MAX:step=$R2 \
...@@ -144,7 +144,7 @@ elif [ "x$PREFIX_OUT" != "x" ]; then ...@@ -144,7 +144,7 @@ elif [ "x$PREFIX_OUT" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label "out Mb/s " \ --slope-mode --interlaced --vertical-label "out Mb/s " \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg/max $R2 seconds" -X 0 \
DEF:all_out=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_out=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_out_avg_r2=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_out_avg_r2=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:all_out_max_r2=${PREFIX_OUT}-all.rrd:mbps:MAX:step=$R2 \ DEF:all_out_max_r2=${PREFIX_OUT}-all.rrd:mbps:MAX:step=$R2 \
......
...@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then ...@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label "out Mb/s in" \ --slope-mode --interlaced --vertical-label "out Mb/s in" \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \
DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:tcp_in=${PREFIX_IN}-tcp.rrd:mbps:AVERAGE:step=$R1 \ DEF:tcp_in=${PREFIX_IN}-tcp.rrd:mbps:AVERAGE:step=$R1 \
...@@ -113,7 +113,7 @@ elif [ "x$PREFIX_IN" != "x" ]; then ...@@ -113,7 +113,7 @@ elif [ "x$PREFIX_IN" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label " Mb/s in" \ --slope-mode --interlaced --vertical-label " Mb/s in" \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \
DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_in=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_in_avg_r2=${PREFIX_IN}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:tcp_in=${PREFIX_IN}-tcp.rrd:mbps:AVERAGE:step=$R1 \ DEF:tcp_in=${PREFIX_IN}-tcp.rrd:mbps:AVERAGE:step=$R1 \
...@@ -137,7 +137,7 @@ elif [ "x$PREFIX_OUT" != "x" ]; then ...@@ -137,7 +137,7 @@ elif [ "x$PREFIX_OUT" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \ --start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label "out Mb/s " \ --slope-mode --interlaced --vertical-label "out Mb/s " \
--title "${TITLE}: L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \ --title "${TITLE}: L3/L4 protocols, interval $R1 second(s), avg $R2 seconds" -X 0 \
DEF:all_out=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R1 \ DEF:all_out=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R1 \
DEF:all_out_avg_r2=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R2 \ DEF:all_out_avg_r2=${PREFIX_OUT}-all.rrd:mbps:AVERAGE:step=$R2 \
DEF:tcp_out=${PREFIX_OUT}-tcp.rrd:mbps:AVERAGE:step=$R1 \ DEF:tcp_out=${PREFIX_OUT}-tcp.rrd:mbps:AVERAGE:step=$R1 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment