Changes between Version 2 and Version 3 of GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Analyze


Ignore:
Timestamp:
03/14/13 14:06:53 (11 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Analyze

    v2 v3  
     1== F. Analyze ==
     2
     3{{{
     4#!html
     5<div style="text-align:left; width:323px; margin-left:auto; margin-right:auto;">
     6<img id="Image-Maps_2201210012154478" src="http://emmy9.casa.umass.edu/images/GIMI_workflow_G.jpg" usemap="#Image-Maps_2201210012154478" border="0" width="323" height="531" alt="" />
     7<map id="_Image-Maps_2201210012154478" name="Image-Maps_2201210012154478">
     8<area shape="rect" coords="14,16,52,54" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/environment" alt="" title=""    />
     9<area shape="rect" coords="53,10,152,60" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Environment" alt="" title=""    />
     10<area shape="rect" coords="53,86,152,136" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Slice" alt="" title=""    />
     11<area shape="rect" coords="53,162,152,212" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Orchestrate" alt="" title=""    />
     12<area shape="rect" coords="53,237,152,287" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Observe" alt="" title=""    />
     13<area shape="rect" coords="52,312,151,362" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Toirods" alt="" title=""    />
     14<area shape="rect" coords="53,387,152,437" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Fromirods" alt="" title=""    />
     15<area shape="rect" coords="169,388,268,438" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Analyze" alt="" title=""    />
     16<area shape="rect" coords="53,462,152,512" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Cleanup" alt="" title=""    />
     17<area shape="rect" coords="12,91,55,128" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Slice" alt="" title=""    />
     18<area shape="rect" coords="11,167,54,204" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Orchestrate" alt="" title=""    />
     19<area shape="rect" coords="11,242,54,279" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Observe" alt="" title=""    />
     20<area shape="rect" coords="9,317,52,354" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Toirods" alt="" title=""    />
     21<area shape="rect" coords="269,393,312,430" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Analyze" alt="" title=""    />
     22<area shape="rect" coords="10,391,53,428" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Fromirods" alt="" title=""    />
     23<area shape="rect" coords="11,467,54,504" href="http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Cleanup" alt="" title=""    />
     24<area shape="rect" coords="321,529,323,531" href="http://www.image-maps.com/index.php?aff=mapped_users_2201210012154478" alt="Image Map" title="Image Map" />
     25</map>
     26<!-- Image map text links - End - -->
     27
     28</div>
     29}}}
     30
     31In Section F we went through the exercise of retrieving data from iRODS to a local computer. In this Section, we will introduce
     32two different methods that can be used to analyze the measurement data. Analysis of measurement data obtained with OMF/OML is not
     33limited to these two methods, we simply use them for demonstration purposes.
     34
     35----
     36
     37=== G.1 R Scripts ===
     38
     39One potential way to visualize the data is making use of [http://www.r-project.org/ R], which provides a visualization language.
     40For this tutorial, we have create a set of R scripts, which we briefly discuss in the following.
     41
     42The first [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_ping.r R script] creates a plot of the RTTs for each ping that's carried out in the experiment in the initial experiment we ran in the tutorial.
     43
     44{{{
     45library(RSQLite)
     46con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-2012-10-18t14.03.42-04.00.sq3")
     47dbListTables(con)
     48dbReadTable(con,"pingmonitor_myping")
     49
     50mydata1 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.10'")
     51rtt1 <- abs(mydata1$rtt)
     52
     53mydata2 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.12'")
     54rtt2 <- abs(mydata2$rtt)
     55
     56mydata3 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.11'")
     57rtt3 <- abs(mydata3$rtt)
     58
     59mydata4 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.12'")
     60rtt4 <- abs(mydata4$rtt)
     61
     62mydata5 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.13'")
     63rtt5 <- abs(mydata5$rtt)
     64
     65mydata6 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.11'")
     66rtt6 <- abs(mydata6$rtt)
     67
     68mydata7 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.10'")
     69rtt7 <- abs(mydata7$rtt)
     70
     71mydata8 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.13'")
     72rtt8 <- abs(mydata8$rtt)
     73
     74mydata9 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.14'")
     75rtt9 <- abs(mydata9$rtt)
     76
     77mydata10 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.10'")
     78rtt10 <- abs(mydata10$rtt)
     79
     80mydata11 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.12'")
     81rtt11 <- abs(mydata11$rtt)
     82
     83mydata12 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.12'")
     84rtt12 <- abs(mydata12$rtt)
     85
     86png(filename="gimi20-nmetrics-eth", height=650, width=900,
     87 bg="white")
     88g_range <- range(0,rtt1,rtt2,rtt3,rtt4,rtt5,rtt6,rtt7,rtt8,rtt9,rtt10,rtt11,rtt12)
     89
     90plot(rtt1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="RTT")
     91lines(rtt2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data")
     92lines(rtt3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data")
     93lines(rtt4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data")
     94lines(rtt5,type="o",col="violetred",xlab="Experiment Interval",ylab="Received Data")
     95lines(rtt6,type="o",col="springgreen",xlab="Experiment Interval",ylab="Received Data")
     96lines(rtt7,type="o",col="skyblue",xlab="Experiment Interval",ylab="Received Data")
     97lines(rtt8,type="o",col="sienna",xlab="Experiment Interval",ylab="Received Data")
     98lines(rtt9,type="o",col="pink",xlab="Experiment Interval",ylab="Received Data")
     99lines(rtt10,type="o",col="yellow",xlab="Experiment Interval",ylab="Received Data")
     100lines(rtt11,type="o",col="thistle",xlab="Experiment Interval",ylab="Received Data")
     101lines(rtt12,type="o",col="orange",xlab="Experiment Interval",ylab="Received Data")
     102
     103title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4)
     104legend("topright", g_range[4], legend=c("192.168.4.10","192.168.5.12","192.168.4.11","192.168.2.12","192.168.5.11","192.168.2.10","192.168.3.13","192.168.6.14","192.168.1.10","192.168.3.12","192.168.6.12"), cex=0.8,
     105   col=c("blue","red","green","purple","violetred","springgreen","skyblue","sienna","pink","yellow","thistle","orange"), pch=15:16:17:18:19:20:21:22:23:24:25:26, lty=1:2:3:4:5:6:7:8:9:10:11:12);
     106
     107dev.off()
     108}}}
     109
     110The resulting plot is shown below.
     111
     112[[Image(gimi20-ping.png)]]
     113
     114----
     115
     116The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_otr.r R script] plots otr results from the
     1174th experiment we executed in Section C.
     118
     119{{{
     120
     121library(RSQLite)
     122con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3")
     123dbListTables(con)
     124dbReadTable(con,"otr2_udp_in")
     125
     126mydata1 <- dbGetQuery(con, "select oml_sender_id, pkt_length from otr2_udp_in where src_host='192.168.4.10'")
     127pkt_length <- mydata1$pkt_length
     128#plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data")
     129
     130
     131png(filename="gimi20_otg1.png", height=650, width=900,
     132 bg="white")
     133g_range <- range(0,pkt_length)
     134
     135plot(pkt_length,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Packet Size")
     136
     137title(main="Received packet size with sender address 192.168.4.10", col.main="red", font.main=4)
     138legend("bottomright", g_range[1], legend=c("interface1"), cex=0.8,
     139   col=c("blue"), pch=21, lty=1);
     140
     141dev.off()
     142}}}
     143
     144
     145The resulting plot is shown below.
     146
     147[[Image(gimi20_otg1.png)]]
     148
     149----
     150
     151The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_nmetrics.r script] plots part of nmetrics results from the
     1524th experiment we executed.
     153
     154{{{
     155library(RSQLite)
     156con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3")
     157dbListTables(con)
     158dbReadTable(con,"nmetrics_net_if")
     159
     160mydata1 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=1")
     161rx_bytes1 <- abs(mydata1$rx_bytes)
     162#plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data")
     163
     164mydata2 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=2")
     165rx_bytes2 <- abs(mydata2$rx_bytes)
     166
     167mydata3 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=3")
     168rx_bytes3 <- abs(mydata3$rx_bytes)
     169
     170mydata4 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=4")
     171rx_bytes4 <- abs(mydata4$rx_bytes)
     172
     173png(filename="gimi20-nmetrics-eth", height=650, width=900,
     174 bg="white")
     175g_range <- range(0,rx_bytes1,rx_bytes2,rx_bytes3,rx_bytes4)
     176
     177plot(rx_bytes1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Received Data")
     178lines(rx_bytes2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data")
     179lines(rx_bytes3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data")
     180lines(rx_bytes4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data")
     181title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4)
     182legend("bottomright", g_range[4], legend=c("interface1","interface2","interface3","interface4"), cex=0.8,
     183   col=c("blue","red","green","purple"), pch=21:22:23:24, lty=1:2:3:4);
     184}}}
     185
     186
     187The resulting plot is shown below.
     188
     189[[Image(gimi20-nmetrics-eth.png)]]
     190
     191All three scripts are simply executed with:
     192
     193{{{
     194R -f <script_name>
     195}}}
     196
     197The benefit of using R scripts is that they can produce graphs that can be used in documents!
     198
     199The results can then be stored into iRODS using the itools presented in Section E.2.
     200
     201
     202----
     203
     204=== G.2 omf_web ===
     205
     206The second alternative we use in the tutorial is omf_web, which already has been presented in Section D.
     207
     208----
     209 
     210[[BR]]
     211[[BR]]
     212
     213
     214[[http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Toirods Back to previous step]]
     215
     216[[http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/Fromirods Forward to next step]]
     217
     218[[http://groups.geni.net/geni/wiki/GIMI-GEC16-Tutorials/GIMI-GEC16-TutorialB/ Back to tutorial main page]]