| 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 | |
| 31 | In Section F we went through the exercise of retrieving data from iRODS to a local computer. In this Section, we will introduce |
| 32 | two different methods that can be used to analyze the measurement data. Analysis of measurement data obtained with OMF/OML is not |
| 33 | limited to these two methods, we simply use them for demonstration purposes. |
| 34 | |
| 35 | ---- |
| 36 | |
| 37 | === G.1 R Scripts === |
| 38 | |
| 39 | One potential way to visualize the data is making use of [http://www.r-project.org/ R], which provides a visualization language. |
| 40 | For this tutorial, we have create a set of R scripts, which we briefly discuss in the following. |
| 41 | |
| 42 | The 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 | {{{ |
| 45 | library(RSQLite) |
| 46 | con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-2012-10-18t14.03.42-04.00.sq3") |
| 47 | dbListTables(con) |
| 48 | dbReadTable(con,"pingmonitor_myping") |
| 49 | |
| 50 | mydata1 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.10'") |
| 51 | rtt1 <- abs(mydata1$rtt) |
| 52 | |
| 53 | mydata2 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.12'") |
| 54 | rtt2 <- abs(mydata2$rtt) |
| 55 | |
| 56 | mydata3 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.4.11'") |
| 57 | rtt3 <- abs(mydata3$rtt) |
| 58 | |
| 59 | mydata4 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.12'") |
| 60 | rtt4 <- abs(mydata4$rtt) |
| 61 | |
| 62 | mydata5 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.13'") |
| 63 | rtt5 <- abs(mydata5$rtt) |
| 64 | |
| 65 | mydata6 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.5.11'") |
| 66 | rtt6 <- abs(mydata6$rtt) |
| 67 | |
| 68 | mydata7 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.2.10'") |
| 69 | rtt7 <- abs(mydata7$rtt) |
| 70 | |
| 71 | mydata8 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.13'") |
| 72 | rtt8 <- abs(mydata8$rtt) |
| 73 | |
| 74 | mydata9 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.14'") |
| 75 | rtt9 <- abs(mydata9$rtt) |
| 76 | |
| 77 | mydata10 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.1.10'") |
| 78 | rtt10 <- abs(mydata10$rtt) |
| 79 | |
| 80 | mydata11 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.3.12'") |
| 81 | rtt11 <- abs(mydata11$rtt) |
| 82 | |
| 83 | mydata12 <- dbGetQuery(con, "select dest_addr, rtt from pingmonitor_myping where dest_addr='192.168.6.12'") |
| 84 | rtt12 <- abs(mydata12$rtt) |
| 85 | |
| 86 | png(filename="gimi20-nmetrics-eth", height=650, width=900, |
| 87 | bg="white") |
| 88 | g_range <- range(0,rtt1,rtt2,rtt3,rtt4,rtt5,rtt6,rtt7,rtt8,rtt9,rtt10,rtt11,rtt12) |
| 89 | |
| 90 | plot(rtt1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="RTT") |
| 91 | lines(rtt2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data") |
| 92 | lines(rtt3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data") |
| 93 | lines(rtt4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data") |
| 94 | lines(rtt5,type="o",col="violetred",xlab="Experiment Interval",ylab="Received Data") |
| 95 | lines(rtt6,type="o",col="springgreen",xlab="Experiment Interval",ylab="Received Data") |
| 96 | lines(rtt7,type="o",col="skyblue",xlab="Experiment Interval",ylab="Received Data") |
| 97 | lines(rtt8,type="o",col="sienna",xlab="Experiment Interval",ylab="Received Data") |
| 98 | lines(rtt9,type="o",col="pink",xlab="Experiment Interval",ylab="Received Data") |
| 99 | lines(rtt10,type="o",col="yellow",xlab="Experiment Interval",ylab="Received Data") |
| 100 | lines(rtt11,type="o",col="thistle",xlab="Experiment Interval",ylab="Received Data") |
| 101 | lines(rtt12,type="o",col="orange",xlab="Experiment Interval",ylab="Received Data") |
| 102 | |
| 103 | title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4) |
| 104 | legend("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 | |
| 107 | dev.off() |
| 108 | }}} |
| 109 | |
| 110 | The resulting plot is shown below. |
| 111 | |
| 112 | [[Image(gimi20-ping.png)]] |
| 113 | |
| 114 | ---- |
| 115 | |
| 116 | The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_otr.r R script] plots otr results from the |
| 117 | 4th experiment we executed in Section C. |
| 118 | |
| 119 | {{{ |
| 120 | |
| 121 | library(RSQLite) |
| 122 | con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3") |
| 123 | dbListTables(con) |
| 124 | dbReadTable(con,"otr2_udp_in") |
| 125 | |
| 126 | mydata1 <- dbGetQuery(con, "select oml_sender_id, pkt_length from otr2_udp_in where src_host='192.168.4.10'") |
| 127 | pkt_length <- mydata1$pkt_length |
| 128 | #plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data") |
| 129 | |
| 130 | |
| 131 | png(filename="gimi20_otg1.png", height=650, width=900, |
| 132 | bg="white") |
| 133 | g_range <- range(0,pkt_length) |
| 134 | |
| 135 | plot(pkt_length,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Packet Size") |
| 136 | |
| 137 | title(main="Received packet size with sender address 192.168.4.10", col.main="red", font.main=4) |
| 138 | legend("bottomright", g_range[1], legend=c("interface1"), cex=0.8, |
| 139 | col=c("blue"), pch=21, lty=1); |
| 140 | |
| 141 | dev.off() |
| 142 | }}} |
| 143 | |
| 144 | |
| 145 | The resulting plot is shown below. |
| 146 | |
| 147 | [[Image(gimi20_otg1.png)]] |
| 148 | |
| 149 | ---- |
| 150 | |
| 151 | The following [http://emmy9.casa.umass.edu/GEC15-GIMI-Tutorial/R_script_nmetrics.r script] plots part of nmetrics results from the |
| 152 | 4th experiment we executed. |
| 153 | |
| 154 | {{{ |
| 155 | library(RSQLite) |
| 156 | con <- dbConnect(dbDriver("SQLite"), dbname = "gimi20-otg-nmetrics.sq3") |
| 157 | dbListTables(con) |
| 158 | dbReadTable(con,"nmetrics_net_if") |
| 159 | |
| 160 | mydata1 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=1") |
| 161 | rx_bytes1 <- abs(mydata1$rx_bytes) |
| 162 | #plot(rx_bytes1, type="o", color="red", xlab="Experiment Interval", ylab="Received data") |
| 163 | |
| 164 | mydata2 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=2") |
| 165 | rx_bytes2 <- abs(mydata2$rx_bytes) |
| 166 | |
| 167 | mydata3 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=3") |
| 168 | rx_bytes3 <- abs(mydata3$rx_bytes) |
| 169 | |
| 170 | mydata4 <- dbGetQuery(con, "select oml_sender_id, rx_bytes from nmetrics_net_if where oml_sender_id=4") |
| 171 | rx_bytes4 <- abs(mydata4$rx_bytes) |
| 172 | |
| 173 | png(filename="gimi20-nmetrics-eth", height=650, width=900, |
| 174 | bg="white") |
| 175 | g_range <- range(0,rx_bytes1,rx_bytes2,rx_bytes3,rx_bytes4) |
| 176 | |
| 177 | plot(rx_bytes1,type="o",col="red",ylim= g_range, lty=2, xlab="Experiment Interval",ylab="Received Data") |
| 178 | lines(rx_bytes2,type="o",col="blue",xlab="Experiment Interval",ylab="Received Data") |
| 179 | lines(rx_bytes3,type="o",col="green",xlab="Experiment Interval",ylab="Received Data") |
| 180 | lines(rx_bytes4,type="o",col="purple",xlab="Experiment Interval",ylab="Received Data") |
| 181 | title(main="nmetrics experiment on ExoGENI (Received Data)", col.main="red", font.main=4) |
| 182 | legend("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 | |
| 187 | The resulting plot is shown below. |
| 188 | |
| 189 | [[Image(gimi20-nmetrics-eth.png)]] |
| 190 | |
| 191 | All three scripts are simply executed with: |
| 192 | |
| 193 | {{{ |
| 194 | R -f <script_name> |
| 195 | }}} |
| 196 | |
| 197 | The benefit of using R scripts is that they can produce graphs that can be used in documents! |
| 198 | |
| 199 | The 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 | |
| 206 | The 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]] |