Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
20b78207
Commit
20b78207
authored
Jun 02, 2008
by
Browse files
IPv6 as L3 protocol
git-svn-id:
file:///home/svn/mapi/trunk@1408
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
2885d4c1
Changes
4
Show whitespace changes
Inline
Side-by-side
applications/abw/htdocs/conf.php
View file @
20b78207
...
...
@@ -12,7 +12,7 @@ define(ABW_DIR, "/usr/local/abw");
define
(
ABW_VAR_DIR
,
"/var/lib/abw"
);
/* 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
...
...
@@ -24,9 +24,11 @@ define(WEB_DIR, "/var/www/abw");
* the abw.conf configuration file.
*/
$subject_label
=
array
(
"Prague_PoP"
/* , "cityA_to_cityB" */
/* , "cityC_to_cityD" */
"sa3-pm1"
,
"sa3-pm2"
,
"sa3-pm3"
,
"sa3-pm4"
,
"sa3-pm5"
);
/*
...
...
@@ -35,9 +37,11 @@ $subject_label=array(
* the abw.conf configuration file, but it is not required.
*/
$subject_description
=
array
(
"Prague PoP"
,
/* , "city A to city B" */
/* , "city C to city D" */
"SA3 PM1"
,
"SA3 PM2"
,
"SA3 PM3"
,
"SA3 PM4"
,
"SA3 PM5"
);
/*
...
...
@@ -47,18 +51,20 @@ $subject_description=array(
* individual remote monitoring stations directly.
*/
$subject_hostname
=
array
(
"perfmon1.cesnet.cz"
,
/* , "central_station.your_domain.org" */
/* , "monitoring_station.your_domain.org" */
"sa3-pm1.geant2.net"
,
"sa3-pm2.geant2.net"
,
"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) */
$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 */
/* Picture of the monitored network to be shown in the user interface */
define
(
NET_IMG
,
"
cesnet-logo-137.pn
g"
);
define
(
NET_IMG
,
"
GEANT2_logo_72dpi_RGB.jp
g"
);
/* END OF USER CONFIGURATION SECTION */
...
...
applications/abw/htdocs/index.php
View file @
20b78207
...
...
@@ -62,7 +62,7 @@ $time_length[6]="1year";
*/
$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)
...
...
@@ -74,8 +74,8 @@ $graph_type_description=array("L4 protocols", "Application protocols");
*/
if
(
!
isset
(
$default
))
{
$graph_types
[
0
]
=
"
l4
"
;
$graph_types
[
1
]
=
"
apps"
;
$graph_types
[
0
]
=
"
apps
"
;
/*
$graph_types[1]="
l4" */
;
$subject_all
=
1
;
$times
[
0
]
=
$r1
[
0
]
.
"_"
.
$r2
[
0
]
.
"_"
.
$time_length
[
0
];
/* $times[1]=$r1[1] . "_" . $r2[1] . "_" . $time_length[1];
...
...
@@ -161,7 +161,7 @@ syslog(LOG_INFO, "$func: starting");
echo
"<html>
\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
"<body>
\n
"
;
...
...
@@ -209,7 +209,7 @@ echo "<p>\n";
echo
"<b>Step 2: Select monitored links:</b><p>
\n
"
;
echo
"<table border=1>
\n
"
;
foreach
(
$subject_label
as
$key
=>
$value
)
{
if
((
$i
%
2
)
==
0
)
/*
if (($i%2)==0)
*/
echo
"<tr>
\n
"
;
echo
"<td>
$subject_description[$key]
</td>"
;
echo
"<td><input type=checkbox name=
\"
subjects[]
\"
value=
\"
$value
\"
"
;
...
...
@@ -220,13 +220,13 @@ foreach ($subject_label as $key => $value) {
if
(
$subject_disabled
[
$key
]
>
0
)
echo
" disabled"
;
echo
"></td>
\n
"
;
if
((
$i
%
2
)
>
0
)
/*
if (($i%2)>0)
*/
echo
"</tr>
\n
"
;
$i
++
;
}
if
((
$i
%
2
)
==
0
)
echo
"<tr>
\n
"
;
/*
if (($i%2)==0)
echo "<tr>\n";
*/
echo
"<td>all links</td>
\n
"
;
echo
"<td><input type=checkbox name=
\"
subject_all
\"
"
;
if
(
$subject_all
)
...
...
@@ -423,9 +423,9 @@ if ($action=="gen_graph") {
(
isset
(
$times
)
||
$time_all
||
strcmp
(
$time_type
,
"predefined"
)))
{
$total_time
=
0
;
echo
"<p>
\n
"
;
echo
"<table>
\n
"
;
echo
"<tr><td>Graph type</td><td>Link</td><td>Time (gen / copy)</td></tr>
\n
"
;
/*
echo "<p>\n";
echo "<table
border=1
>\n";
echo "<tr><td>Graph type</td><td>Link</td><td>Time (gen / copy)</td></tr>\n";
*/
mkdir
(
$GRAPH_DIR
.
"/"
.
$session
);
...
...
@@ -444,7 +444,12 @@ if ($action=="gen_graph") {
$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 */
...
...
@@ -534,25 +539,30 @@ if ($action=="gen_graph") {
$time2
=
gettimeofday
();
$diff
=
time_diff
(
$time1
,
$time2
);
$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,
$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
"
);
$time1
=
gettimeofday
(
TRUE
);
system
(
$command
);
$time2
=
gettimeofday
(
TRUE
);
$diff
=
time_diff
(
$time1
,
$time2
);
$total_time
+=
$diff
;
printf
(
"%.02fs</td></tr>
\n
"
,
$diff
);
/*
printf("%.02fs</td></tr>\n", $diff);
*/
}
$i
++
;
}
}
/* if (in_array($graph_type_value, $graph_types)) */
}
/* foreach($graph_type_label as $graph_type_key => $graph_type_value) */
printf
(
"<tr><td>Total time</td><td> </td><td>%.02fs</td></tr>
\n
"
,
$total_time
);
echo
"</table>
\n
"
;
/*
printf("<tr><td>Total time</td><td> </td><td>%.02fs</td></tr>\n", $total_time);
echo "</table>\n";
*/
echo
"<p>
\n
<table>
\n
"
;
$graphs
=
0
;
...
...
applications/abw/scripts/rrd_graph_l4.sh
View file @
20b78207
...
...
@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_IN
}
-all
.rrd:mbps:AVERAGE: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
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_IN
}
-all
.rrd:mbps:AVERAGE: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
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_OUT
}
-all
.rrd:mbps:AVERAGE:step
=
$R2
\
DEF:all_out_max_r2
=
${
PREFIX_OUT
}
-all
.rrd:mbps:MAX:step
=
$R2
\
...
...
applications/abw/scripts/rrd_graph_l4_nomax.sh
View file @
20b78207
...
...
@@ -65,7 +65,7 @@ if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_IN
}
-all
.rrd:mbps:AVERAGE:step
=
$R2
\
DEF:tcp_in
=
${
PREFIX_IN
}
-tcp
.rrd:mbps:AVERAGE:step
=
$R1
\
...
...
@@ -113,7 +113,7 @@ elif [ "x$PREFIX_IN" != "x" ]; then
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_IN
}
-all
.rrd:mbps:AVERAGE:step
=
$R2
\
DEF:tcp_in
=
${
PREFIX_IN
}
-tcp
.rrd:mbps:AVERAGE:step
=
$R1
\
...
...
@@ -137,7 +137,7 @@ elif [ "x$PREFIX_OUT" != "x" ]; then
rrdtool graph
${
FILENAME_GRAPH
}
--width
600
--height
450
\
--start
"
${
START_TIME
}
"
--end
"
${
END_TIME
}
"
\
--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_avg_r2
=
${
PREFIX_OUT
}
-all
.rrd:mbps:AVERAGE:step
=
$R2
\
DEF:tcp_out
=
${
PREFIX_OUT
}
-tcp
.rrd:mbps:AVERAGE:step
=
$R1
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment