Commit 69644079 authored by 's avatar

Bug fixes


git-svn-id: file:///home/svn/mapi/trunk@778 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent b1b197df
......@@ -75,11 +75,25 @@ $subject_hostname=array(
/*
* Predefined time intervals and granularities
*
* Keep in mind the following requirements:
*
* - each resolution must be >= time of one pixel on X axis
* (set in rrd_graph_all.sh) otherwise time of one pixel is used
*
* - UNIX timestamps of both start time and end time must be multiples
* of both resolutions (set time_length accordingly and compute
* end time to be on boundary) and it is safer to skip the most recent
* samples, see variable $hhmmYYYYMMDD below
*
* - RRD files must include RRA samples for the whole requested period,
* create RRD files to include enough RRA samples for possible browsing
* in time axis
*/
$time_description[0]="last 10 mins (interval 1 sec, avg/max 30 sec)";
$time_description[1]="last 1 hour (interval 6 sec, avg/max 3 min)";
$time_description[2]="last 6 hours (interval 36 sec, avg/max 20 min)";
$time_description[1]="last 1 hour (interval 10 sec, avg/max 3 min)";
$time_description[2]="last 10 hours (interval 1 min, avg/max 20 min)";
$time_description[3]="last 1 day (interval 3 min, avg/max 1 hour)";
$time_description[4]="last 1 week (interval 20 min, avg/max 6 hour)";
$time_description[5]="last 1 month (interval 3 hour, avg/max 1 day)";
......@@ -89,13 +103,13 @@ $r1[0]=1;
$r2[0]=30;
$time_length[0]="10min";
$r1[1]=6;
$r1[1]=10;
$r2[1]=180;
$time_length[1]="1h";
$r1[2]=36;
$r1[2]=60;
$r2[2]=1200;
$time_length[2]="6h";
$time_length[2]="10h";
$r1[3]=180;
$r2[3]=3600;
......@@ -195,9 +209,19 @@ foreach ($subject_label as $key => $value) {
echo "</tr>\n";
$i++;
}
if (($i%2)==0)
echo "<tr>\n";
echo "<td>all subjects</td>\n";
echo "<td><input type=checkbox name=\"subject_all\"";
if ($subject_all)
echo " checked";
echo "></td>\n";
$i++;
if (($i%2)>0)
echo "<td>&nbsp;</td><td>&nbsp;</td>";
echo "</table>\n";
echo "</tr></table>\n";
/*
* Print form to select time granularities and periods
......@@ -217,14 +241,14 @@ foreach ($time_description as $key => $value) {
$time_label=$r1[$key] . "_" . $r2[$key] . "_" . $time_length[$key];
echo "<td><input type=checkbox name=\"times[]\" value=\"" . $time_label . "\"";
if (isset($times)) {
if (in_array($time_label, $times) || $time_all)
if (in_array($time_label, $times))
echo " checked";
}
echo "></td>\n";
echo "</tr>\n";
}
echo "<tr>\n";
echo "<td>all</td>\n";
echo "<td>all predefined time periods</td>\n";
echo "<td><input type=checkbox name=\"time_all\"";
if ($time_all)
echo " checked";
......@@ -307,7 +331,8 @@ echo "</form><br>\n";
if ($action=="gen_graph") {
$hhmmYYYYMMDD=date("G:i Ymd");
$current_time=date("G:i:s Ymd", time());
echo "current_time: $current_time<br>\n";
foreach (glob(GRAPH_DIR . "/*") as $filename)
unlink($filename);
......@@ -315,7 +340,9 @@ if ($action=="gen_graph") {
/* If at least one graph type, one subject and one time period were
selected, then generate and show graphs */
if (isset($graph_types) && isset($subjects) && isset($times)) {
if (isset($graph_types) &&
(isset($subjects) || $subject_all) &&
(isset($times) || $time_all)) {
/* Go over all selected graph types */
......@@ -326,7 +353,9 @@ if ($action=="gen_graph") {
$i=0;
foreach ($subject_label as $subject_key => $subject_value) {
if (in_array($subject_value, $subjects)) {
if (($subject_all || in_array($subject_value, $subjects)) &&
!$subject_disabled[$subject_key]) {
$hostname=$subject_hostname[$i];
$command="ssh " . REMOTE_USERNAME . "@" . $subject_hostname[$i] .
......@@ -339,6 +368,9 @@ if ($action=="gen_graph") {
$time_label=$r1[$time_key] . "_" . $r2[$time_key] . "_" .
$time_length[$time_key];
if ($time_all || in_array($time_label, $times)) {
$hhmmYYYYMMDD=date("G:i Ymd", (int)(time() / $r2[$time_key]) * $r2[$time_key] - $r2[$time_key]);
echo "r2: $r2[$time_key], hhmmYYMMDD: $hhmmYYYYMMDD<br>\n";
$command=$command . " --time=\\\"" .
$r1[$time_key] . " " . $r2[$time_key] . " " .
$time_length[$time_key] . " " . $hhmmYYYYMMDD . "\\\"";
......@@ -362,7 +394,8 @@ if ($action=="gen_graph") {
foreach($graph_types as $graph_type) {
foreach ($subject_label as $subject_key => $subject_value) {
if (in_array($subject_value, $subjects)) {
if (($subject_all || in_array($subject_value, $subjects)) &&
!$subject_disabled[$subject_key]) {
foreach ($time_description as $time_key => $time_value) {
$time_label=$r1[$time_key] . "_" . $r2[$time_key] . "_" .
$time_length[$time_key];
......@@ -399,7 +432,7 @@ if ($action=="gen_graph") {
echo "</table>\n";
} /* if (isset($graph_types) && isset($subjects) && isset($times) */
} /* if (isset($graph_types) && ... */
} /* if ($action=="gen_graph") */
......
......@@ -4,9 +4,11 @@ if [ $# != 1 ]; then
fi
# Keep 1 second averages for 3 hours
# 10 second 1 day
# 10 second 2 days
# 30 second 2 days
# 60 second 2 weeks
# 300 second 2 weeks
# 180 second 2 weeks
# 600 second 2 months
# 1 hour 2 years
rm -f $1
......@@ -14,17 +16,23 @@ rrdtool create $1 --start 0 --step 1 \
DS:packets:GAUGE:5:U:U \
DS:bytes:GAUGE:5:U:U \
DS:mbps:GAUGE:5:U:U \
RRA:AVERAGE:0:1:600 \
RRA:AVERAGE:0.5:10:600 \
RRA:AVERAGE:0.5:60:600 \
RRA:AVERAGE:0.5:600:600 \
RRA:AVERAGE:0.5:3600:600 \
RRA:MIN:0.5:10:600 \
RRA:MIN:0.5:60:600 \
RRA:MIN:0.5:600:600 \
RRA:MIN:0.5:3600:600 \
RRA:MAX:0.5:10:600 \
RRA:MAX:0.5:60:600 \
RRA:MAX:0.5:600:600 \
RRA:MAX:0.5:3600:600
RRA:AVERAGE:0:1:7200 \
RRA:AVERAGE:0.5:10:17280 \
RRA:AVERAGE:0.5:30:5760 \
RRA:AVERAGE:0.5:60:20160 \
RRA:AVERAGE:0.5:180:6720 \
RRA:AVERAGE:0.5:600:8640 \
RRA:AVERAGE:0.5:3600:17520 \
RRA:MIN:0.5:10:17280 \
RRA:MIN:0.5:30:5760 \
RRA:MIN:0.5:60:20160 \
RRA:MIN:0.5:180:6720 \
RRA:MIN:0.5:600:8640 \
RRA:MIN:0.5:3600:1752 \
RRA:MAX:0.5:10:17280 \
RRA:MAX:0.5:30:5760 \
RRA:MAX:0.5:60:20160 \
RRA:MAX:0.5:180:6720 \
RRA:MAX:0.5:600:8640 \
RRA:MAX:0.5:3600:17520
......@@ -6,6 +6,8 @@ GRAPH_DIR=/usr/local/abw/graph
ABW_INFO_COMMAND=${ABW_DIR}/bin/abw_info
ABW_CONF=${ABW_DIR}/etc/abw.cfg
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
usage() {
echo "Usage: $0 [ -r ] \\"
echo " --protocols={l4|apps} \\"
......@@ -155,9 +157,10 @@ for (( I=0 ; $I<$SUBJECT_LABEL_NO ; I++ )) ; do
echo -n "Generating graphs for subject_id/label"
echo " ${SUBJECT_ID[$I]}/${LABEL[$I]} and parameters_id ${PARAMETERS_ID[$I]}"
###################################################
### If --subject_id was specified (not --label) ###
###################################################
############################################################################
### If --subject_id was specified (not --label), then a single graph for ###
### one direction of traffic will be generated ###
############################################################################
if [ ${SUBJECT_ID[$I]} -gt 0 ]; then
......@@ -195,9 +198,10 @@ for (( I=0 ; $I<$SUBJECT_LABEL_NO ; I++ )) ; do
echo "LABEL: $LABEL"
echo "DESCRIPTION: $DESCRIPTION"
###################################################
### If --label was specified (not --subject_id) ###
###################################################
##########################################################################
### If --label was specified (not --subject_id), then a dual graph for ###
### both directions of traffic will be generated ###
##########################################################################
else
......@@ -215,60 +219,56 @@ for (( I=0 ; $I<$SUBJECT_LABEL_NO ; I++ )) ; do
echo "command: $COMMAND"
MEASUREMENT_ARRAY_OUT=(`$COMMAND`)
if [ "${MEASUREMENT_ARRAY_IN[0]}" = "unknown" -a "${MEASUREMENT_ARRAY_OUT[0]}" = "unknown" ]; then
if [ ${MEASUREMENT_ARRAY_IN[0]} = "unknown" -a ${MEASUREMENT_ARRAY_OUT[0]} = "unknown" ]; then
echo "Unknown label or parameters_id"
exit -1
fi
if [ "${MEASUREMENT_ARRAY_IN[0]}" != "unknown" ]; then
HOSTNAME_IN=${MEASUREMENT_ARRAY_IN[0]}
INTERFACE_IN=${MEASUREMENT_ARRAY_IN[1]}
PREFIX_IN=${MEASUREMENT_ARRAY_IN[2]}
LABEL_IN=${MEASUREMENT_ARRAY_IN[3]}
DESCRIPTION_IN=${MEASUREMENT_ARRAY_IN[4]}
J=5
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_IN[*]} -a $END -eq 0 ]; do
DESCRIPTION_IN="$DESCRIPTION_IN ${MEASUREMENT_ARRAY_IN[$J]}"
if [ "${MEASUREMENT_ARRAY_IN[$J]: -1}" = "\"" ]; then
END=1
fi
J=`expr $J + 1`
done
DESCRIPTION_IN=${DESCRIPTION_IN:1:${#DESCRIPTION_IN}-2}
echo "HOSTNAME_IN: $HOSTNAME_IN"
echo "INTERFACE_IN: $INTERFACE_IN"
echo "PREFIX_IN: $PREFIX_IN"
echo "LABEL_IN: $LABEL_IN"
echo "DESCRIPTION_IN: $DESCRIPTION_IN"
fi
HOSTNAME_IN=${MEASUREMENT_ARRAY_IN[0]}
INTERFACE_IN=${MEASUREMENT_ARRAY_IN[1]}
PREFIX_IN=${MEASUREMENT_ARRAY_IN[2]}
LABEL_IN=${MEASUREMENT_ARRAY_IN[3]}
if [ "${MEASUREMENT_ARRAY_OUT[0]}" != "unknown" ]; then
HOSTNAME_OUT=${MEASUREMENT_ARRAY_OUT[0]}
INTERFACE_OUT=${MEASUREMENT_ARRAY_OUT[1]}
PREFIX_OUT=${MEASUREMENT_ARRAY_OUT[2]}
LABEL_OUT=${MEASUREMENT_ARRAY_OUT[3]}
DESCRIPTION_OUT=${MEASUREMENT_ARRAY_OUT[4]}
J=5
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_OUT[*]} -a $END -eq 0 ]; do
DESCRIPTION_OUT="$DESCRIPTION_OUT ${MEASUREMENT_ARRAY_OUT[$J]}"
if [ "${MEASUREMENT_ARRAY_OUT[$J]: -1}" = "\"" ]; then
END=1
fi
J=`expr $J + 1`
done
DESCRIPTION_OUT=${DESCRIPTION_OUT:1:${#DESCRIPTION_OUT}-2}
echo "HOSTNAME_OUT: $HOSTNAME_OUT"
echo "INTERFACE_OUT: $INTERFACE_OUT"
echo "PREFIX_OUT: $PREFIX_OUT"
echo "LABEL_OUT: $LABEL_OUT"
echo "DESCRIPTION_OUT: $DESCRIPTION_OUT"
fi
HOSTNAME_OUT=${MEASUREMENT_ARRAY_OUT[0]}
INTERFACE_OUT=${MEASUREMENT_ARRAY_OUT[1]}
PREFIX_OUT=${MEASUREMENT_ARRAY_OUT[2]}
LABEL_OUT=${MEASUREMENT_ARRAY_OUT[3]}
DESCRIPTION_IN=${MEASUREMENT_ARRAY_IN[4]}
J=5
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_IN[*]} -a $END -eq 0 ]; do
DESCRIPTION_IN="$DESCRIPTION_IN ${MEASUREMENT_ARRAY_IN[$J]}"
if [ "${MEASUREMENT_ARRAY_IN[$J]: -1}" = "\"" ]; then
END=1
fi
J=`expr $J + 1`
done
DESCRIPTION_IN=${DESCRIPTION_IN:1:${#DESCRIPTION_IN}-2}
DESCRIPTION_OUT=${MEASUREMENT_ARRAY_OUT[4]}
J=5
END=0
while [ $J -lt ${#MEASUREMENT_ARRAY_OUT[*]} -a $END -eq 0 ]; do
DESCRIPTION_OUT="$DESCRIPTION_OUT ${MEASUREMENT_ARRAY_OUT[$J]}"
if [ "${MEASUREMENT_ARRAY_OUT[$J]: -1}" = "\"" ]; then
END=1
fi
J=`expr $J + 1`
done
DESCRIPTION_OUT=${DESCRIPTION_OUT:1:${#DESCRIPTION_OUT}-2}
echo "HOSTNAME_IN: $HOSTNAME_IN"
echo "INTERFACE_IN: $INTERFACE_IN"
echo "PREFIX_IN: $PREFIX_IN"
echo "LABEL_IN: $LABEL_IN"
echo "DESCRIPTION_IN: $DESCRIPTION_IN"
echo "HOSTNAME_OUT: $HOSTNAME_OUT"
echo "INTERFACE_OUT: $INTERFACE_OUT"
echo "PREFIX_OUT: $PREFIX_OUT"
echo "LABEL_OUT: $LABEL_OUT"
echo "DESCRIPTION_OUT: $DESCRIPTION_OUT"
fi
......@@ -300,17 +300,13 @@ for (( I=0 ; $I<$SUBJECT_LABEL_NO ; I++ )) ; do
if [ ${SUBJECT_ID[$I]} -gt 0 ]; then
COMMAND="$COMMAND ${PREFIX[$I]} \"\""
else
COMMAND="$COMMAND \"${PREFIX_IN[$I]}\" \"${PREFIX_OUT[$I]}\""
COMMAND="$COMMAND ${PREFIX_IN[$I]} ${PREFIX_OUT[$I]}"
fi
COMMAND="$COMMAND ${GRAPH_DIR}/graph_${LABEL[$I]}_${GRAPH_TYPE}_${R1}s_${R2}s_${TIME_LENGTH}.png end-${TIME_LENGTH} \"${END_TIME}\" ${R1} ${R2}"
if [ ${SUBJECT_ID[$I]} -gt 0 ]; then
COMMAND="$COMMAND \"${DESCRIPTION}\""
else
if [ "${DESCRIPTION_IN}x" != "x" ]; then
COMMAND="$COMMAND \"${DESCRIPTION_IN}\""
else
COMMAND="$COMMAND \"${DESCRIPTION_OUT}\""
fi
COMMAND="$COMMAND \"${DESCRIPTION_IN}\""
fi
echo "COMMAND: $COMMAND"
......
RRD_DIR=/var/lib/rrd
usage() {
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if [ $# -ne 8 ]; then
echo "Usage: $0 <prefix_in> <prefix_out> <filename_graph> <start_time> <end_time> <resolution 1> <resolution 2> <title>"
echo "One of <prefix_in> or <prefix_out> can be empty string \"\""
echo "<prefix_out> can be empty string \"\""
echo "Example:"
echo "$0 \\"
echo " /var/lib/rrd/perfmon-plzen.cesnet.cz-eth1-0-1 \\"
......@@ -11,10 +13,6 @@ usage() {
echo " \"14:33 20060504\" \"15:00 20060504\""
echo " 1 60"
echo " \"CESNET - GN2\""
}
if [ $# -ne 8 ]; then
usage
exit -1
fi
......@@ -27,9 +25,9 @@ R1=$6
R2=$7
TITLE=$8
if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
if [ "x$PREFIX_OUT" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
rrdtool graph ${FILENAME_GRAPH} --width 650 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label "out Mb/s in" \
--title "${TITLE}: applications, interval $R1 second(s), avg/max $R2 seconds" -X 0 \
......@@ -87,11 +85,11 @@ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
LINE2:all_out_neg_max_r2#0000FF \
LINE:0#000000
elif [ "x$PREFIX_IN" != "x" ]; then
else
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
rrdtool graph ${FILENAME_GRAPH} --width 650 --height 225 \
--start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label " Mb/s in" \
--slope-mode --interlaced --vertical-label " Mb/s " \
--title "${TITLE}: applications, 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 \
......@@ -116,50 +114,4 @@ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
LINE2:all_in_max_r2#0000FF:"Maximum ($R2 seconds)" \
LINE:0#000000
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}: applications, 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 \
DEF:http_out=${PREFIX_OUT}-http.rrd:mbps:AVERAGE:step=$R1 \
DEF:https_out=${PREFIX_OUT}-https.rrd:mbps:AVERAGE:step=$R1 \
DEF:ftp_out=${PREFIX_OUT}-ftp.rrd:mbps:AVERAGE:step=$R1 \
DEF:gnutella_out=${PREFIX_OUT}-gnutella.rrd:mbps:AVERAGE:step=$R1 \
DEF:torrent_out=${PREFIX_OUT}-torrent.rrd:mbps:AVERAGE:step=$R1 \
DEF:dc_out=${PREFIX_OUT}-dc.rrd:mbps:AVERAGE:step=$R1 \
DEF:edonkey_out=${PREFIX_OUT}-edonkey.rrd:mbps:AVERAGE:step=$R1 \
CDEF:all_out_neg=all_out,-1,* \
CDEF:all_out_neg_avg_r2=all_out_avg_r2,-1,* \
CDEF:all_out_neg_max_r2=all_out_max_r2,-1,* \
CDEF:http_out_neg=http_out,-1,* \
CDEF:https_out_neg=https_out,-1,* \
CDEF:ftp_out_neg=ftp_out,-1,* \
CDEF:gnutella_out_neg=gnutella_out,-1,* \
CDEF:torrent_out_neg=torrent_out,-1,* \
CDEF:dc_out_neg=dc_out,-1,* \
CDEF:edonkey_out_neg=edonkey_out,-1,* \
AREA:all_out_neg#FFFF00 \
LINE:0 \
AREA:http_out_neg#00FF00::STACK \
AREA:https_out_neg#FF0000::STACK \
AREA:ftp_out_neg#FF00FF::STACK \
AREA:gnutella_out_neg#50FF00::STACK \
AREA:torrent_out_neg#FF5000::STACK \
AREA:dc_out_neg#FF50FF::STACK \
AREA:edonkey_out_neg#5050FF::STACK \
LINE2:all_out_neg_avg_r2#00FFFF \
LINE2:all_out_neg_max_r2#0000FF \
LINE:0#000000
else
echo "At least one of <prefix_in> or <prefix_out> must be non-empty"
echo ""
usage
exit -1
fi
RRD_DIR=/usr/local/abw/rrd
usage() {
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if [ $# -ne 8 ]; then
echo "Usage: $0 <prefix_in> <prefix_out> <filename_graph> <start_time> <end_time> <resolution 1> <resolution 2> <title>"
echo "One of <prefix_in> or <prefix_out> can be empty string \"\""
echo "<prefix_out> can be empty string \"\""
echo "Example:"
echo "$0 \\"
echo " /usr/local/abw/rrd/perfmon-plzen.cesnet.cz-eth1-0-1 \\"
......@@ -11,10 +13,6 @@ usage() {
echo " \"14:33 20060504\" \"15:00 20060504\""
echo " 1 60"
echo " \"CESNET - GN2\""
}
if [ $# -ne 8 ]; then
usage
exit -1
fi
......@@ -27,7 +25,7 @@ R1=$6
R2=$7
TITLE=$8
if [ "x$PREFIX_OUT" != "x" -a "x$PREFIX_IN" != "x" ]; then
if [ "x$PREFIX_OUT" != "x" ]; then
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
--start "${START_TIME}" --end "${END_TIME}" \
......@@ -75,11 +73,11 @@ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
LINE2:ip6_out_neg#000000D0 \
LINE:0#000000
elif [ "x$PREFIX_IN" != "x" ]; then
else
rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
rrdtool graph ${FILENAME_GRAPH} --width 700 --height 250 \
--start "${START_TIME}" --end "${END_TIME}" \
--slope-mode --interlaced --vertical-label " Mb/s in" \
--slope-mode --interlaced --vertical-label " Mb/s " \
--title "${TITLE}: 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 \
......@@ -99,43 +97,4 @@ rrdtool graph ${FILENAME_GRAPH} --width 600 --height 450 \
LINE2:ip6_in#000000D0:"IPv6" \
LINE:0#000000
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 \
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 \
DEF:tcp_out=${PREFIX_OUT}-tcp.rrd:mbps:AVERAGE:step=$R1 \
DEF:udp_out=${PREFIX_OUT}-udp.rrd:mbps:AVERAGE:step=$R1 \
DEF:multicast_out=${PREFIX_OUT}-multicast.rrd:mbps:AVERAGE:step=$R1 \
DEF:ip6_out=${PREFIX_OUT}-ip6.rrd:mbps:AVERAGE:step=$R1 \
CDEF:other_out=all_out,tcp_out,-,udp_out,- \
CDEF:all_out_neg=all_out,-1,* \
CDEF:all_out_neg_avg_r2=all_out_avg_r2,-1,* \
CDEF:all_out_neg_max_r2=all_out_max_r2,-1,* \
CDEF:tcp_out_neg=tcp_out,-1,* \
CDEF:udp_out_neg=udp_out,-1,* \
CDEF:multicast_out_neg=multicast_out,-1,* \
CDEF:ip6_out_neg=ip6_out,-1,* \
CDEF:other_out_neg=other_out,-1,* \
AREA:all_out_neg#FF0000 \
LINE:0 \
AREA:udp_out_neg#FFFF00::STACK \
AREA:tcp_out_neg#00FF00::STACK \
LINE2:all_out_neg_avg_r2#00FFFF \
LINE2:all_out_neg_max_r2#0000FF \
LINE2:multicast_out_neg#FF00FF \
LINE2:ip6_out_neg#000000D0 \
LINE:0#000000
else
echo "At least one of <prefix_in> or <prefix_out> must be non-empty"
echo ""
usage
exit -1
fi
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