Changes between Version 5 and Version 6 of GEC17Agenda/GettingStartedWithGENI_III_GIMI/Procedure/Finish


Ignore:
Timestamp:
06/21/13 23:44:18 (11 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/GettingStartedWithGENI_III_GIMI/Procedure/Finish

    v5 v6  
    9696[[BR]]
    9797[[BR]]
     98
     99In Section F we went through the exercise of retrieving data from iRODS to a local computer. In this Section, we will introduce
     100two different methods that can be used to analyze the measurement data. Analysis of measurement data obtained with OMF/OML is not
     101limited to these two methods, we simply use them for demonstration purposes.
     102
     103----
     104
     105=== G.1 R Scripts ===
     106
     107One potential way to visualize the data is making use of [http://www.r-project.org/ R], which provides a visualization language.
     108For this tutorial, we have create a set of R scripts, which we briefly discuss in the following.
     109
     110The 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.
     111
     112{{{
     113library(RSQLite)
     114con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-2012-10-18t14.03.42-04.00.sq3")
     115dbListTables(con)
     116dbReadTable(con,"pingmonitor_myping")
     117
     118mydata1 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.10'")
     119rtt1 <- abs(mydata1$rtt)
     120
     121mydata2 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.12'")
     122rtt2 <- abs(mydata2$rtt)
     123
     124mydata3 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.11'")
     125rtt3 <- abs(mydata3$rtt)
     126
     127mydata4 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.12'")
     128rtt4 <- abs(mydata4$rtt)
     129
     130mydata5 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.13'")
     131rtt5 <- abs(mydata5$rtt)
     132
     133mydata6 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.11'")
     134rtt6 <- abs(mydata6$rtt)
     135
     136mydata7 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.10'")
     137rtt7 <- abs(mydata7$rtt)
     138
     139mydata8 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.13'")
     140rtt8 <- abs(mydata8$rtt)
     141
     142mydata9 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.14'")
     143rtt9 <- abs(mydata9$rtt)
     144
     145mydata10 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.10'")
     146rtt10 <- abs(mydata10$rtt)
     147
     148mydata11 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.12'")
     149rtt11 <- abs(mydata11$rtt)
     150
     151mydata12 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.12'")
     152rtt12 <- abs(mydata12$rtt)
     153
     154png(filename="gimi20-nmetrics-eth", height=650, width=900,
     155 bg="white")
     156g_range <- range(0,rtt1,rtt2,rtt3,rtt4,rtt5,rtt6,rtt7,rtt8,rtt9,rtt10,rtt11,rtt12)
     157
     158plot(rtt1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="RTT")
     159lines(rtt2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data")
     160lines(rtt3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data")
     161lines(rtt4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data")
     162lines(rtt5,type="o",col="violetred",xlab="Experiment Interval",ylab="Received Data")
     163lines(rtt6,type="o",col="springgreen",xlab="Experiment Interval",ylab="Received Data")
     164lines(rtt7,type="o",col="skyblue",xlab="Experiment Interval",ylab="Received Data")
     165lines(rtt8,type="o",col="sienna",xlab="Experiment Interval",ylab="Received Data")
     166lines(rtt9,type="o",col="pink",xlab="Experiment Interval",ylab="Received Data")
     167lines(rtt10,type="o",col="yellow",xlab="Experiment Interval",ylab="Received Data")
     168lines(rtt11,type="o",col="thistle",xlab="Experiment Interval",ylab="Received Data")
     169lines(rtt12,type="o",col="orange",xlab="Experiment Interval",ylab="Received Data")
     170
     171title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4)
     172legend("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,
     173   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);
     174
     175dev.off()
     176}}}
     177
     178The resulting plot is shown below.
     179
     180[[Image(gimi20-ping.png)]]
     181
     182----
     183
     184The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_otr.r R script] plots otr results from the
     1854th experiment we executed in Section C.
     186
     187{{{
     188
     189library(RSQLite)
     190con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3")
     191dbListTables(con)
     192dbReadTable(con,"otr2_udp_in")
     193
     194mydata1 <- dbGetQuery(con, "select oml_sender_id, pkt_length from otr2_udp_in where src_host='192.168.4.10'")
     195pkt_length <- mydata1$pkt_length
     196#plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data")
     197
     198
     199png(filename="gimi20_otg1.png", height=650, width=900,
     200 bg="white")
     201g_range <- range(0,pkt_length)
     202
     203plot(pkt_length,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Packet Size")
     204
     205title(main="Received packet size with sender address 192.168.4.10", col.main="red", font.main=4)
     206legend("bottomright", g_range[1], legend=c("interface1"), cex=0.8,
     207   col=c("blue"), pch=21, lty=1);
     208
     209dev.off()
     210}}}
     211
     212
     213The resulting plot is shown below.
     214
     215[[Image(gimi20_otg1.png)]]
     216
     217----
     218
     219The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_nmetrics.r script] plots part of nmetrics results from the
     2204th experiment we executed.
     221
     222{{{
     223library(RSQLite)
     224con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3")
     225dbListTables(con)
     226dbReadTable(con,"nmetrics_net_if")
     227
     228mydata1 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=1")
     229rx_bytes1 <- abs(mydata1$rx_bytes)
     230#plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data")
     231
     232mydata2 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=2")
     233rx_bytes2 <- abs(mydata2$rx_bytes)
     234
     235mydata3 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=3")
     236rx_bytes3 <- abs(mydata3$rx_bytes)
     237
     238mydata4 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=4")
     239rx_bytes4 <- abs(mydata4$rx_bytes)
     240
     241png(filename="gimi20-nmetrics-eth", height=650, width=900,
     242 bg="white")
     243g_range <- range(0,rx_bytes1,rx_bytes2,rx_bytes3,rx_bytes4)
     244
     245plot(rx_bytes1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Received Data")
     246lines(rx_bytes2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data")
     247lines(rx_bytes3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data")
     248lines(rx_bytes4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data")
     249title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4)
     250legend("bottomright", g_range[4], legend=c("interface1","interface2","interface3","interface4"), cex=0.8,
     251   col=c("blue","red","green","purple"), pch=21:22:23:24, lty=1:2:3:4);
     252}}}
     253
     254
     255The resulting plot is shown below.
     256
     257[[Image(gimi20-nmetrics-eth.png)]]
     258
     259All three scripts are simply executed with:
     260
     261{{{
     262R -f <script_name>
     263}}}
     264
     265The benefit of using R scripts is that they can produce graphs that can be used in documents!
     266
     267The results can then be stored into iRODS using the itools presented in Section E.2.
     268
     269
     270----
     271
     272=== G.2 omf_web ===
     273
     274The second alternative we use in the tutorial is omf_web, which already has been presented in Section D.
     275
     276----
     277 
     278[[BR]]
     279[[BR]]