Commit d154a0ea authored by Venkat Chakravarthy's avatar Venkat Chakravarthy

Update and Cleanup of the log analyzer script for the supafly application.

README also provided.
parent 80fd027f
README File for using the scripts to analyze the logs of the supafly
application.
Author : Venkat Chakravarthy <vchakra@flux.utah.edu>
Date : October 09, 2006
CONTENTS OF THE CHECKOUT:
1) The checked out directory contains the log files generated by profiling the
supafly application on Emulab, Planetlab and Pelab. These are in the
respective "logs_<name_of_lab>" subdirectories.
2) There is also a sample set of logs in the "logs_sample" subdirectory.
3) The main PERL script is the "log_analyzer.pl" file.
4) There is also a shell script file called "plot.sh" that contains Gnuplot
commands to plot the graphs. This shell script gets called by the above
PERL script. The shell script was written to automate the process of
generating the graphs.
RUNNING THE SCRIPT:
1) The checked in version of the script will run fine and generate the graphs
for the logs_emulab, logs_pelab and the logs_sample log files.
NOTE: To run it on the logs_planetlab a slight modification has to be done!
This is explained in Step 3.
The following example shows how to run the script on the Emulab logs.
USAGE : ./log_analyzer.pl <middleman> <sender> <receiver> <<fillme>lab>
EXAMPLE:
% ./log_analyzer.pl logs_emulab/middleman.log logs_emulab/sender.log
logs_emulab/receiver.log emulab
2) You must provide all the four command line arguments. Running the script
will create a generated/<<fillme>lab> subdirectory and place all the
generated data(.dat) and graph(.eps) files there. The following files will
be generated for the above emulab example.
a) emulab.dat - This is the data file fed to Gnuplot. It contains two
columns, "middleman timestamps in diffs" and
"(receiverTS - senderTS)"
b) emulab_stat_file - This contains statistical information like the max,
min, mean, variance and standard deviation of three
datasets: the perceived duration at the middleman
the timestamps recorded at the middleman
the (rcvTS-sndTS) computed at sender and receiver
c) emulab_lag.eps - The plot of the "(rcvTS-sndTS)" on the Y-axis against
the "timestamp diffs recorded at the middleman" on the
X-axis. All values are in seconds.
d) There are some other generated temporary files as well. Ignore those.
3) To run the script for the checked in Planetlab logs, modify the
"log_analyzer.pl" script at the section marked "NOTE" in the source code.
Instructions on commenting and uncommenting are provided in the source code
itself.
%!PS-Adobe-2.0 EPSF-2.0
%%Title: dur_vs_fin.eps
%%Creator: gnuplot 4.0 patchlevel 0
%%CreationDate: Mon Oct 9 17:30:59 2006
%%DocumentFonts: (atend)
%%BoundingBox: 50 50 590 302
%%Orientation: Portrait
%%EndComments
/gnudict 256 dict def
gnudict begin
/Color false def
/Solid false def
/gnulinewidth 5.000 def
/userlinewidth gnulinewidth def
/vshift -66 def
/dl {10.0 mul} def
/hpt_ 31.5 def
/vpt_ 31.5 def
/hpt hpt_ def
/vpt vpt_ def
/Rounded false def
/M {moveto} bind def
/L {lineto} bind def
/R {rmoveto} bind def
/V {rlineto} bind def
/N {newpath moveto} bind def
/C {setrgbcolor} bind def
/f {rlineto fill} bind def
/vpt2 vpt 2 mul def
/hpt2 hpt 2 mul def
/Lshow { currentpoint stroke M
0 vshift R show } def
/Rshow { currentpoint stroke M
dup stringwidth pop neg vshift R show } def
/Cshow { currentpoint stroke M
dup stringwidth pop -2 div vshift R show } def
/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
/hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def
/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }
{pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse } def
/BL { stroke userlinewidth 2 mul setlinewidth
Rounded { 1 setlinejoin 1 setlinecap } if } def
/AL { stroke userlinewidth 2 div setlinewidth
Rounded { 1 setlinejoin 1 setlinecap } if } def
/UL { dup gnulinewidth mul /userlinewidth exch def
dup 1 lt {pop 1} if 10 mul /udl exch def } def
/PL { stroke userlinewidth setlinewidth
Rounded { 1 setlinejoin 1 setlinecap } if } def
/LTw { PL [] 1 setgray } def
/LTb { BL [] 0 0 0 DL } def
/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def
/LT0 { PL [] 1 0 0 DL } def
/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def
/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def
/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def
/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def
/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def
/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def
/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def
/Pnt { stroke [] 0 setdash
gsave 1 setlinecap M 0 0 V stroke grestore } def
/Dia { stroke [] 0 setdash 2 copy vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath stroke
Pnt } def
/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V
currentpoint stroke M
hpt neg vpt neg R hpt2 0 V stroke
} def
/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath stroke
Pnt } def
/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M
hpt2 vpt2 neg V currentpoint stroke M
hpt2 neg 0 R hpt2 vpt2 V stroke } def
/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath stroke
Pnt } def
/Star { 2 copy Pls Crs } def
/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath fill } def
/TriUF { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath fill } def
/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath stroke
Pnt } def
/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath fill} def
/DiaF { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath fill } def
/Pent { stroke [] 0 setdash 2 copy gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath stroke grestore Pnt } def
/PentF { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath fill grestore } def
/Circle { stroke [] 0 setdash 2 copy
hpt 0 360 arc stroke Pnt } def
/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def
/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def
/C1 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc closepath fill
vpt 0 360 arc closepath } bind def
/C2 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C3 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C4 { BL [] 0 setdash 2 copy moveto
2 copy vpt 180 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C5 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc
2 copy moveto
2 copy vpt 180 270 arc closepath fill
vpt 0 360 arc } bind def
/C6 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C7 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 270 arc closepath fill
vpt 0 360 arc closepath } bind def
/C8 { BL [] 0 setdash 2 copy moveto
2 copy vpt 270 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C9 { BL [] 0 setdash 2 copy moveto
2 copy vpt 270 450 arc closepath fill
vpt 0 360 arc closepath } bind def
/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
2 copy moveto
2 copy vpt 90 180 arc closepath fill
vpt 0 360 arc closepath } bind def
/C11 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 180 arc closepath fill
2 copy moveto
2 copy vpt 270 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C12 { BL [] 0 setdash 2 copy moveto
2 copy vpt 180 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C13 { BL [] 0 setdash 2 copy moveto
2 copy vpt 0 90 arc closepath fill
2 copy moveto
2 copy vpt 180 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/C14 { BL [] 0 setdash 2 copy moveto
2 copy vpt 90 360 arc closepath fill
vpt 0 360 arc } bind def
/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
vpt 0 360 arc closepath } bind def
/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
neg 0 rlineto closepath } bind def
/Square { dup Rec } bind def
/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def
/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def
/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def
/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def
/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill
exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
2 copy vpt Square fill
Bsquare } bind def
/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def
/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
Bsquare } bind def
/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
Bsquare } bind def
/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def
/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
2 copy vpt Square fill Bsquare } bind def
/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def
/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def
/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def
/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def
/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def
/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def
/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def
/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def
/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def
/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def
/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def
/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def
/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def
/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def
/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def
/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def
/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def
/DiaE { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V closepath stroke } def
/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V closepath stroke } def
/TriUE { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V closepath stroke } def
/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V closepath stroke } def
/PentE { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
closepath stroke grestore } def
/CircE { stroke [] 0 setdash
hpt 0 360 arc stroke } def
/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def
/DiaW { stroke [] 0 setdash vpt add M
hpt neg vpt neg V hpt vpt neg V
hpt vpt V hpt neg vpt V Opaque stroke } def
/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M
0 vpt2 neg V hpt2 0 V 0 vpt2 V
hpt2 neg 0 V Opaque stroke } def
/TriUW { stroke [] 0 setdash vpt 1.12 mul add M
hpt neg vpt -1.62 mul V
hpt 2 mul 0 V
hpt neg vpt 1.62 mul V Opaque stroke } def
/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M
hpt neg vpt 1.62 mul V
hpt 2 mul 0 V
hpt neg vpt -1.62 mul V Opaque stroke } def
/PentW { stroke [] 0 setdash gsave
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
Opaque stroke grestore } def
/CircW { stroke [] 0 setdash
hpt 0 360 arc Opaque stroke } def
/BoxFill { gsave Rec 1 setgray fill grestore } def
/BoxColFill {
gsave Rec
/Fillden exch def
currentrgbcolor
/ColB exch def /ColG exch def /ColR exch def
/ColR ColR Fillden mul Fillden sub 1 add def
/ColG ColG Fillden mul Fillden sub 1 add def
/ColB ColB Fillden mul Fillden sub 1 add def
ColR ColG ColB setrgbcolor
fill grestore } def
%
% PostScript Level 1 Pattern Fill routine
% Usage: x y w h s a XX PatternFill
% x,y = lower left corner of box to be filled
% w,h = width and height of box
% a = angle in degrees between lines and x-axis
% XX = 0/1 for no/yes cross-hatch
%
/PatternFill { gsave /PFa [ 9 2 roll ] def
PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
gsave 1 setgray fill grestore clip
currentlinewidth 0.5 mul setlinewidth
/PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
0 0 M PFa 5 get rotate PFs -2 div dup translate
0 1 PFs PFa 4 get div 1 add floor cvi
{ PFa 4 get mul 0 M 0 PFs V } for
0 PFa 6 get ne {
0 1 PFs PFa 4 get div 1 add floor cvi
{ PFa 4 get mul 0 2 1 roll M PFs 0 V } for
} if
stroke grestore } def
%
/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
currentdict end definefont pop
end
%%EndProlog
gnudict begin
gsave
50 50 translate
0.050 0.050 scale
0 setgray
newpath
(Helvetica) findfont 200 scalefont setfont
1.000 UL
LTb
1020 600 M
63 0 V
9377 0 R
-63 0 V
900 600 M
gsave 0 setgray
( 0) Rshow
grestore
1.000 UL
LTb
1020 1020 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 50) Rshow
grestore
1.000 UL
LTb
1020 1440 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 100) Rshow
grestore
1.000 UL
LTb
1020 1860 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 150) Rshow
grestore
1.000 UL
LTb
1020 2280 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 200) Rshow
grestore
1.000 UL
LTb
1020 2700 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 250) Rshow
grestore
1.000 UL
LTb
1020 3120 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 300) Rshow
grestore
1.000 UL
LTb
1020 3540 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 350) Rshow
grestore
1.000 UL
LTb
1020 3960 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 400) Rshow
grestore
1.000 UL
LTb
1020 4380 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 450) Rshow
grestore
1.000 UL
LTb
1020 4800 M
63 0 V
9377 0 R
-63 0 V
-9497 0 R
gsave 0 setgray
( 500) Rshow
grestore
1.000 UL
LTb
1020 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 0) Cshow
grestore
1.000 UL
LTb
2593 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 5) Cshow
grestore
1.000 UL
LTb
4167 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 10) Cshow
grestore
1.000 UL
LTb
5740 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 15) Cshow
grestore
1.000 UL
LTb
7313 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 20) Cshow
grestore
1.000 UL
LTb
8887 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 25) Cshow
grestore
1.000 UL
LTb
10460 600 M
0 63 V
0 4137 R
0 -63 V
0 -4337 R
gsave 0 setgray
( 30) Cshow
grestore
1.000 UL
LTb
1.000 UL
LTb
1020 600 M
9440 0 V
0 4200 V
-9440 0 V
0 -4200 V
LTb
/Times findfont 200 scalefont setfont
200 2700 M
gsave 0 setgray
currentpoint gsave translate 90 rotate 0 0 M
(Duration \(microseconds\)) Cshow
grestore
grestore
/Helvetica findfont 200 scalefont setfont
LTb
/Times findfont 200 scalefont setfont
5740 100 M
gsave 0 setgray
(Finish Time \(seconds\)) Cshow
grestore
/Helvetica findfont 200 scalefont setfont
1.000 UP
1.000 UL
LT0
LTb
9557 4637 M
gsave 0 setgray
(Cumulative Lag) Rshow
grestore
LT0
9677 4637 M
543 0 V
1020 3708 M
33 -151 V
34 126 V
36 -126 V
0 67 V
0 -67 V
58 0 V
2 0 V
37 0 V
26 0 V
8 0 V
27 0 V
8 0 V
26 0 V
9 0 V
25 0 V
19 0 V
17 0 V
4 0 V
28 0 V
5 0 V
28 0 V
4 0 V
24 0 V
8 0 V
23 8 V
9 -8 V
4 0 V
28 0 V
4 0 V
22 0 V
10 0 V
20 0 V
9 0 V
6 0 V
22 0 V
7 0 V
6 0 V
22 0 V
7 0 V
21 0 V
5 0 V
9 8 V
21 101 V
5 -118 V
7 9 V
21 0 V
7 0 V
7 0 V
19 0 V
9 0 V
3 0 V
20 0 V
9 0 V
4 0 V
37 0 V
0 75 V
0 118 V
19 -193 V
32 0 V
14 0 V
26 0 V
17 0 V
18 0 V
23 0 V
10 0 V
23 0 V
14 0 V
19 0 V
13 -9 V
26 9 V
3 -9 V
23 118 V
10 -109 V
47 8 V
0 160 V
8 -168 V
32 0 V
24 0 V
18 0 V
32 0 V
24 117 V
11 -117 V
31 8 V
23 -8 V
12 0 V
30 0 V
8 0 V
27 0 V
8 0 V
26 0 V
7 0 V
26 0 V
20 0 V
12 0 V
20 0 V
15 0 V
5 0 V
25 0 V
8 0 V