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