Changes between Initial Version and Version 1 of User/4aConfApps


Ignore:
Timestamp:
Feb 18, 2019, 6:29:40 PM (6 years ago)
Author:
seskar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • User/4aConfApps

    v1 v1  
     1= Configuring OML Client Applications =
     2
     3[[TOC(heading=OML Documentation, OML/*, depth=1)]]
     4
     5Once an application has been modified to integrate OML measurements, two possible configurations are possible; either by passing general arguments in the command line of the enhanced application or by using a XML configuration file.
     6
     7We recommend the use of the second kind of configuration, i.e., XML configuration file. Indeed, this is the only configuration that will allow the user to multiplex the measurement stream and applied different filters inside the application and between Measurement Points.
     8
     9As an overview, the configuration of an OML application will allow to:
     10* configure the output of the measurement: file or/and address of OML server
     11* configure the two available by default filters
     12* disable measurements by OML
     13* configure the log information
     14
     15== Command line configuration ==
     16The first configuration possibility of OML is by using arguments on the command line when starting the application. The possible arguments are described in the OML Generic Interface.
     17
     18=== Usage ===
     19The command line configuration should be used only for a debugging purpose as it is limited compare to the XML configuration file. Indeed, the following limitations have been identified.
     20
     21You can only use either the --oml-samples or the --oml-interval configuration. These two configurations define the filter to be applied on the measurement points.
     22
     23== XML configuration file ==
     24We present in this section the configuration of OML using an XML file. This file allows the user to completely use all the capabilities of OML. It allows to multiplex the measurement streams contained in an application and it also allows to apply specific filters to every tuple defined in a Measurement Point.
     25
     26In order to present these capabilities in a clear way, we will go through the configuration of OML for the OTR application, the receiver part of the OTG, traffic generator. This traffic generator, developed as one of the companion application of OML, generate UDP packet following different parameters such as the packet length or the generation pattern (exponential vs constant bit rate).
     27
     28=== Presentation of OTR's Measurement Point ===
     29
     30OTR defines one Measurement Point injected through OML for every received packet. This MP is constituted by the following fields:
     31
     32* ts: OML_DOUBLE_VALUE, the time-stamp of the reception of the UDP packet;
     33* flow_id: OML_INT32_VALUE, the flow id as defined in the sender side;
     34* seq_no: OML_UINT32_VALUE, the sequence number as defined in the sender side;
     35* pkt_length: OML_UINT32_VALUE, the packet length;
     36* dst_host: OML_STRING_VALUE, the IP address of the destination;
     37* dst_port: OML_UINT32_VALUE, the destination port number.
     38
     39=== Configuration of the application ===
     40In this configuration we want to capture only the packet size from the previously introduced measurement point. Furthermore we want to apply two different filters to this measure and based on the filter we create two measurement streams targeting either a file or the OML server.
     41
     42This configuration can be synthesised as follows:
     43
     44[[Image(XML.png)]]
     45
     46This configuration can not be obtained through the command line configuration since we are configuring two writers (the file and the server) and two filters (average ad fist).
     47
     48In order to realise this configuration, once needs to write the following XML code:
     49
     50{{{
     51 1<omlc id='Receiver1' domain='npc_2010_04_19_13_24_48'>
     52 2  <collect url='tcp:10.0.0.200:3003'>
     53 3    <stream mp='udp_in' interval='2'>
     54 4      <filter operation='avg' field='pkt_length' rename='myFilterA'/>
     55 5    </stream>
     56 6  </collect>
     57 7  <collect url='file:/root/save.txt'>
     58 8    <stream name='udp_in' samples='1'>
     59 9      <filter operation='first' field='pkt_length' rename='myFilterB'/>
     6010    </stream>
     6111  </collect>
     6212</omlc>
     63}}}
     64
     65* line 1: General information about the experiment. We define here the name of the experimental domain with the domain attribute. This will also be the name of the database on the server side.
     66* lines 2 to 6: We define here the bottom part of the previous figure. Indeed we define the measurement stream going the OML server. Furthermore, we define which Measurement Point we want to capture and the frequency of this measurement. Then, we define which field in particular we want to capture and its associated filter.
     67  * line 2: We configure the writer we want to use. In this case we want to send the stream that will be defined in this tag to the OML server which is listening on the port 3003 with the IP address 10.0.0.200.
     68  * line 3: We configure OML to only measure in this stream the MP called 'udp_in'. Furthermore, we want to collect this information with a frequency of 2 seconds
     69  * line 4: We configure OML to only measure in this stream the field called 'pkt_length'. We want to apply the average filter to this measurement.
     70* lines 7 to 11: We define here the upper part of the previous figure. Indeed we define the measurement stream going the a local file. Furthermore, we define here which Measurement Point we want to capture and the frequency of this measurement. Then, we define which field in particular we want to capture and its associated filter.
     71* line 7: We configure the writer we want to use. In this case we want to send the measurement that will be defined in this tag to the local file '/root/save.txt'.
     72  * line 8: We configure OML to only measure in this stream the MP called 'udp_in'. Furthermore, we want to collect this information with a frequency of 1 injection (i.e. we inject and save all the measurement captured).
     73  * line 9: We configure OML to only measure in this stream the field called 'pkt_length'. We want to apply the first filter to this measurement.
     74
     75Finally to use the previous script, a user needs to save in a file and start the application with the command line argument --oml-config <name of the XML file>
     76
     77== XML Elements and Attributes ==
     78
     79See liboml2.conf for an exhaustive documentation.
     80
     81||Element/Attribute Name || Description ||Accepted Values ||
     82||omlc      ||Start of the configuration for the OML instance ||n/a ||
     83||id        ||the ID for the oml instance ||any string ||
     84||domain    ||the ID of the experiment ||any string ||
     85||collect   ||Definition of streams to be sent to a given collection point ||n/a ||
     86||url       ||collection point for the associated measurement stream ||tcp:<IP address of the server>:<port number of the server> or file:/dir/file ||
     87||stream    ||Create a new stream ||n/a ||
     88||mp        ||Name of the Measurement Point to use as the data source for the stream ||Measurement Point names ||
     89||interval  ||frequency of the measurement in seconds ||INT ||
     90||samples   ||frequency of the measurement in size of the sampling ||INT ||
     91||filter    ||Definition of the filter to apply to a given field ||n/a ||
     92||field     ||Name of the field to filter ||an existing tuple in the MP ||
     93||operation ||Name of the filter ||an existing OML filter ||
     94||rename    ||Name of the output field containing the filtered data ||any string (will be suffixed with the name of the filter until bug is fixed)||