add event labels dynamically for the graph

parent bc84e922
...@@ -22,12 +22,30 @@ grep "s3-eth2" $ep_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$gw_ ...@@ -22,12 +22,30 @@ grep "s3-eth2" $ep_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$gw_
grep "br-tun" $net_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$net_filename grep "br-tun" $net_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$net_filename
grep $comp_port_name $comp_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$comp_filename grep $comp_port_name $comp_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$comp_filename
#in_byte non-zero count value (field 3)
src_start=`cut -d',' -f1,3 $src_filename | grep -v ',0.00' | head -1 | cut -d',' -f1`
src_start_second=$((src_start-start_timestamp))
net_start=`cut -d',' -f1,3 $net_filename | grep -v ',0.00' | head -1 | cut -d',' -f1`
net_start_second=$((net_start-start_timestamp))
#out_byte non-zero count value (field 2)
dst_start=`cut -d',' -f1,2 $dst_filename | grep -v ',0.00' | head -1 | cut -d',' -f1`
dst_start_second=$((dst_start-start_timestamp))
gw_start=`cut -d',' -f1,2 $gw_filename | grep -v ',0.00' | head -1 | cut -d',' -f1`
gw_start_second=$((gw_start-start_timestamp))
comp_start=`cut -d',' -f1,2 $comp_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
comp_start_second=$((comp_start-start_timestamp))
export src_filename export src_filename
export dst_filename export dst_filename
export gw_filename export gw_filename
export net_filename export net_filename
export comp_filename export comp_filename
export output_filename export output_filename
export src_start_second
export dst_start_second
export gw_start_second
export net_start_second
export comp_start_second
./local_gnu_graph.scr ./local_gnu_graph.scr
......
...@@ -6,6 +6,8 @@ net_input="`echo $net_filename`" ...@@ -6,6 +6,8 @@ net_input="`echo $net_filename`"
comp_input="`echo $comp_filename`" comp_input="`echo $comp_filename`"
output_filename="`echo $output_filename`" output_filename="`echo $output_filename`"
start_timestamp="`echo $start_timestamp`" start_timestamp="`echo $start_timestamp`"
service_timestamp="`echo $src_start_second`"
tap_timestamp="`echo $net_start_second`"
set terminal pdfcairo enhanced font "Times-Roman,20" size 12,17 set terminal pdfcairo enhanced font "Times-Roman,20" size 12,17
set output output_filename set output output_filename
...@@ -30,6 +32,18 @@ set style line 3 lt 2 lc rgb "yellow" lw 2 ...@@ -30,6 +32,18 @@ set style line 3 lt 2 lc rgb "yellow" lw 2
set style line 4 lt 2 lc rgb "orange" lw 2 set style line 4 lt 2 lc rgb "orange" lw 2
set key autotitle column set key autotitle column
set key on left set key on left
#event arrows
y=1
d=10 #displacement
x=service_timestamp
set arrow from x,0 to x,y as 1
set label 1 "Event 1" at x-d,y font "Times-Roman,20"
x=tap_timestamp
set arrow from x,0 to x,y as 1
set label 2 "Event 2" at x-d,y font "Times-Roman,20"
ysize = 0.5 ysize = 0.5
xsize = 1 xsize = 1
......
...@@ -25,6 +25,19 @@ grep "wan-br" $wan_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$wan ...@@ -25,6 +25,19 @@ grep "wan-br" $wan_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$wan
grep "br-tun" $net_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$net_filename grep "br-tun" $net_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$net_filename
grep $comp_port_name $comp_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$comp_filename grep $comp_port_name $comp_csv_input | cut -d',' -f1,3,4,9,10 | sort -u -g --output=$comp_filename
#in_byte non-zero count value (field 3)
src_start=`cut -d',' -f1,3 $src_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
src_start_second=$((src_start-start_timestamp))
net_start=`cut -d',' -f1,3 $net_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
net_start_second=$((net_start-start_timestamp))
#out_byte non-zero count value (field 2)
dst_start=`cut -d',' -f1,2 $dst_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
dst_start_second=$((dst_start-start_timestamp))
gw_start=`cut -d',' -f1,2 $gw_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
gw_start_second=$((gw_start-start_timestamp))
comp_start=`cut -d',' -f1,2 $comp_filename | grep -v ',0.00'| head -1 | cut -d',' -f1`
comp_start_second=$((comp_start-start_timestamp))
export src_filename export src_filename
export dst_filename export dst_filename
export gw_filename export gw_filename
...@@ -32,6 +45,11 @@ export wan_filename ...@@ -32,6 +45,11 @@ export wan_filename
export net_filename export net_filename
export comp_filename export comp_filename
export output_filename export output_filename
export src_start_second
export dst_start_second
export gw_start_second
export net_start_second
export comp_start_second
./remote_gnu_graph.scr ./remote_gnu_graph.scr
......
...@@ -7,6 +7,8 @@ net_input="`echo $net_filename`" ...@@ -7,6 +7,8 @@ net_input="`echo $net_filename`"
comp_input="`echo $comp_filename`" comp_input="`echo $comp_filename`"
output_filename="`echo $output_filename`" output_filename="`echo $output_filename`"
start_timestamp="`echo $start_timestamp`" start_timestamp="`echo $start_timestamp`"
service_timestamp="`echo $src_start_second`"
tap_timestamp="`echo $net_start_second`"
set terminal pdfcairo enhanced font "Times-Roman,20" size 12,20 set terminal pdfcairo enhanced font "Times-Roman,20" size 12,20
set output output_filename set output output_filename
...@@ -31,6 +33,18 @@ set style line 3 lt 2 lc rgb "yellow" lw 2 ...@@ -31,6 +33,18 @@ set style line 3 lt 2 lc rgb "yellow" lw 2
set style line 4 lt 2 lc rgb "orange" lw 2 set style line 4 lt 2 lc rgb "orange" lw 2
set key autotitle column set key autotitle column
set key on left set key on left
#event arrows
y=1
d=10 #displacement
x=service_timestamp
set arrow from x,0 to x,y as 1
set label 1 "Event 1" at x-d,y font "Times-Roman,20"
x=tap_timestamp
set arrow from x,0 to x,y as 1
set label 2 "Event 2" at x-d,y font "Times-Roman,20"
ysize = 0.5 ysize = 0.5
xsize = 1 xsize = 1
......
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