Changes between Version 28 and Version 29 of Tutorials/a0Basic/Tutorial3


Ignore:
Timestamp:
Oct 22, 2014, 3:32:00 PM (10 years ago)
Author:
nilanjan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/a0Basic/Tutorial3

    v28 v29  
    1212
    1313=== Using Result Service ===
    14 The console has a result service running on port 5054. On the grid console the service can be accessed from the URL: grid.orbit-lab.org:5054/result. From the console the user can use a non-interactve network downloader (ie. wget) to retrieve results. A web browser (ie. Chrome) can also be used however tunneling to the console will need to be set up.
    15 
    16 :
    17 :
    18 :
     14The console has a Result Service running on port 5054. For example on the grid console the service can be accessed at the URL: ''grid.orbit-lab.org:5054/result''. From the console the user can use a non-interactve network downloader (ie. wget) to retrieve results. A web browser (ie. Chrome) on a different machine can also be used however tunneling through the console is required.
     15
     16To view all the services provided use command:
     17{{{
     18nilanjan@console.grid:~$ wget -qO- grid.orbit-lab.org:5054/result | xml_pp
     19}}}
     20
     21The services will be displayed in XML format with a brief description between the ''info'' tags and required argument(s).
     22{{{
     23<?xml version="1.0"?>
     24<services>
     25  <serviceGroup name="result" prefix="/result">
     26    <info>Service to access and query experiment measurement databases</info>
     27
     28    <service name="dumpDatabase">
     29      <info>Dump the complete database holding the measurement results for a given experiment</info>
     30      <args>
     31        <arg isRequired="true" name="expID" value="ExperimentID">
     32          <info>ID of the Experiment</info>
     33        </arg>
     34      </args>
     35    </service>
     36
     37    <service name="getSchema">
     38      <info>Get the Schema of a given experiment measurement database</info>
     39      <args>
     40        <arg isRequired="true" name="expID" value="ExperimentID">
     41          <info>ID of the Experiment</info>
     42        </arg>
     43      </args>
     44    </service>
     45
     46    <service name="listTables">
     47      <info>Get the list of tables in given experiment measurement database</info>
     48      <args>
     49        <arg isRequired="true" name="expID" value="ExperimentID">
     50          <info>ID of the Experiment</info>
     51        </arg>
     52      </args>
     53    </service>
     54
     55    <service name="queryDatabase">
     56      <info>Get the Schema of a given experiment measurement database</info>
     57      <args>
     58        <arg isRequired="true" name="expID" value="ExperimentID">
     59          <info>ID of the Experiment</info>
     60        </arg>
     61        <arg isRequired="true" name="query" value="SQLquery">
     62          <info>An SQLite query to run against the database</info>
     63        </arg>
     64        <arg isRequired="true" name="format" value="raw | xml | json | cvs | merged">
     65          <info>Format to return result in.</info>
     66        </arg>
     67      </args>
     68    </service>
     69  </serviceGroup>
     70
     71</services>
     72}}}
     73
     74Listed below are a few example uses of the services for a given Experiment ID (''default_slice-2014-10-20t10.59.11.720-04.00''). Assume all commands are case-sensitive.
     75 1) Dump the contents of the database in sqlite3 text format:
     76{{{
     77nilanjan@console.grid:~$ wget -qO- grid.orbit-lab.org:5054/result/dumpDatabase?expID=default_slice-2014-10-20t10.59.11.720-04.00
     78}}}
     79
     80 2) Print all tables in the contained in the database in XML format:
     81{{{
     82nilanjan@console.grid:~$ wget -qO- grid.orbit-lab.org:5054/result/listTables?expID=default_slice-2014-10-20t10.59.11.720-04.00 | xml_pp
     83
     84<DATABASE ExperimentID="default_slice-2014-10-20t10.59.11.720-04.00">
     85  <TABLE>_experiment_metadata</TABLE>
     86  <TABLE>iperf_connection</TABLE>
     87  <TABLE>iperf_packets</TABLE>
     88  <TABLE>_senders</TABLE>
     89  <TABLE>iperf_jitter</TABLE>
     90  <TABLE>iperf_settings</TABLE>
     91  <TABLE>iperf_application</TABLE>
     92  <TABLE>iperf_losses</TABLE>
     93  <TABLE>iperf_transfer</TABLE>
     94</DATABASE>
     95}}}
     96
     97 3) Run a query on a database table and display contents in XML format:
     98{{{
     99nilanjan@console.grid:~$ wget -qO- grid.orbit-lab.org:5054/result/queryDatabase?expID=default_slice-2014-10-20t10.59.11.720-04.00\&format=xml\&query="select * from iperf_transfer" | xml_pp
     100
     101<DATABASE ExperimentID="default_slice-2014-10-20t10.59.11.720-04.00">
     102  <QUERY>select * from iperf_transfer</QUERY>
     103  <RESULT>
     104    <FIELDS>oml_tuple_id oml_sender_id oml_seq oml_ts_client oml_ts_server pid connection_id begin_interval end_interval size</FIELDS>
     105    <ROW>1 1 1 5.741186998784542 5.747786 1511 6 0.0 5.0 11534336</ROW>
     106    <ROW>2 1 2 10.765060991048813 10.771641 1511 6 5.0 10.0 12058624</ROW>
     107    <ROW>3 1 3 15.74006099998951 15.746616 1511 6 10.0 15.0 12189696</ROW>
     108    <ROW>4 1 4 20.73482397198677 20.741354 1511 6 15.0 20.0 12713984</ROW>
     109    :
     110    :
     111    :
     112    <ROW>48 1 24 181.04624199867249 181.170476 1535 7 115.0 120.0 12320768</ROW>
     113  </RESULT>
     114</DATABASE>
     115}}}
     116
     117
    19118
    20119=== Using Direct Database Access ===