Changes between Version 8 and Version 9 of Tutorials/a0Basic/Tutorial3


Ignore:
Timestamp:
Nov 23, 2005, 5:51:22 PM (18 years ago)
Author:
Surya Satyavolu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/a0Basic/Tutorial3

    v8 v9  
    44It is important to understand how measurements were collected and organized to be able to interpret them. The [wiki:OML ORBIT Measurement Framework] provides tools to insert points to tap available information and to effectively collect that information in a timely manner. And after the experiment is done, the user would get access to the exprimenet database generated. In general, the results of the experiment is in one [http://www.mysql.com MySQL] database. Different participating nodes populate different tables of this database. Usually, user would like to post-process or visualize those raw measurements for further analysis.
    55
    6 A number of different tools are available to interpret experimental results.  The choice of tools depends upon availability and the nature of the measurements.  Microsoft Excel can be used to analyze an experiment as shown below.
     6A number of different tools are available to interpret experimental results.  The choice of tools depends upon availability and the nature of the measurements. '''Excel and Matlab connections from your local laptop to our database server may be blocked by the firewall. Hence, until we are working on figuring out a proxy service to expose these databases based on user credentials, please use the Perl script approach.'''
    77
    8 [[Image(Excelexample.PNG)]]
    98
    10 The user could import MySQL database to Microsoft Excel and use chart and other tools to analyze the measurements.
    11 
    12 Matlab is another tool can be used.  Sample Matlab code is shown below
    13 {{{
    14 function nsf(dbServer, dbUser, dbPW, database);
    15 % Part where we retrieve data from the database;
    16 mysql('open',dbServer, dbUser, dbPW);
    17 mysql('use', database);
    18 output = struct('time',[],'thr_all',[],'node',[]);
    19 [output.time, output.thr_all, output.node] = mysql('select timestamp, throughput, node_id from group2');
    20 [thru1_4, time1_4, thru3_1, time3_1] = sort_mysql(output);
    21 % Finally, the plotting part
    22 subplot(2,1,1);
    23 plot(time1_4, thru1_4, '-*');
    24 title('Throughput On Obstructed Link');
    25 xlabel('Time (sec)'); ylabel('Throuhput (bps)'); grid on;
    26 subplot(2,1,2);
    27 plot(time3_1, thru3_1, '-*');
    28 title('Throughput On Monitor Node'); xlabel('Time (sec)');
    29 ylabel('Throuhput (bps)'); grid on;
    30 }}}
    31 
    32 And the resulting graph is show below:
    33 
    34 [[Image(Matlabexample.PNG)]]
    35 
     9== Using Perl scripts ==
    3610
    3711Sample Perl script that gets data from the database:
     
    8458
    8559A more specific Perl script for OTG/OTR application can be found [wiki:OTG/Measurement/DatabaseProcess here]
     60== Using Microsoft Excel ==
     61
     62Microsoft Excel can be used to analyze an experiment as shown below.
     63
     64[[Image(Excelexample.PNG)]]
     65
     66The user could import MySQL database to Microsoft Excel and use chart and other tools to analyze the measurements.
     67
     68==Using Matlab ==
     69
     70Matlab is another tool can be used.  Sample Matlab code is shown below
     71{{{
     72function nsf(dbServer, dbUser, dbPW, database);
     73% Part where we retrieve data from the database;
     74mysql('open',dbServer, dbUser, dbPW);
     75mysql('use', database);
     76output = struct('time',[],'thr_all',[],'node',[]);
     77[output.time, output.thr_all, output.node] = mysql('select timestamp, throughput, node_id from group2');
     78[thru1_4, time1_4, thru3_1, time3_1] = sort_mysql(output);
     79% Finally, the plotting part
     80subplot(2,1,1);
     81plot(time1_4, thru1_4, '-*');
     82title('Throughput On Obstructed Link');
     83xlabel('Time (sec)'); ylabel('Throuhput (bps)'); grid on;
     84subplot(2,1,2);
     85plot(time3_1, thru3_1, '-*');
     86title('Throughput On Monitor Node'); xlabel('Time (sec)');
     87ylabel('Throuhput (bps)'); grid on;
     88}}}
     89
     90And the resulting graph is show below:
     91
     92[[Image(Matlabexample.PNG)]]