############################### Simple OMF/OML iperf experiment ############################### This simple tutorial presents all the basic steps to develop, run, and access the result of a wireless network experiment with OMF6 and OML2. This tutorial is based on UTH NITlab scenario (`Wi-Fi `_) - adapted to use with FIT-NITOS Paris platform and `portal.onelab.eu `_ ********************** Experiment Description ********************** This experiment involves two resources of type PC with wireless capabilities: node 1 and node 2. Node 1 is running a simple iperf client application while Node 2 is running a simple iperf server application Node 1 is the “Sender” and will generate and send traffic to the “Receiver” node 2, over a wireless (IEEE 802.11g) channel. We will use oml_iperf as a traffic generator and bandwidth measurement tool. It provides generators producing various forms of packet streams and port for sending these packets via various transports, such as TCP and UDP. The oml_iperf is a wrapper around the traditional iperf application. It captures the outputs and sends them as measurement streams to an OML2 collection point (an OML2 server in this case), which then stores them in a database available to the experimenter. ************* Prerequisites ************* Provisioning and accessing resources ==================================== Before starting this tutorial, please make sure that you have completed the following: - You need to have active account on the OneLab portal (to create an account please follow this tutorial: :doc:`User sign-up`) - You need to create or join existing project (Please follow this tutorial: :ref:`project-label`) - You need to create or join existing slice within the project (Please follow this tutorial: :ref:`slice-label` ) - You need to reserve one node on FIT NITOS Paris (to know how to reserve node please follow this tutorial: :ref:`reservation-with-scheduling-label`) - You have SSH client installed (on OSX and Linux the terminal clients are available by default, on Windows you can donwload and install `Putty `_). Alternatively if you are using FireFox you can install `this plugin `_ to run shell within browser. See more here: :ref:`accessing-reserved-resources-label` Experiment Controller (EC) ========================== .. include:: nitos_exp/ec_nitos.rst OML 2 server (OML2) =================== .. include:: nitos_exp/oml_nitos.rst *********************** Preparing an experiment *********************** .. include:: nitos_exp/prepare_nitos_exp.rst .. literalinclude:: nitos_exp/paris_tutorial001.rb :language: ruby :linenos: ********************* Running an experiment ********************* .. include:: nitos_exp/run_nitos_exp.rst Accessing your account on the gateway server ============================================ .. include:: nitos_exp/access_acount.rst Cleaning up the environment =========================== .. include:: nitos_exp/clean_nitos_env.rst Running your ED script from EC ============================== 1. On the gateway server copy-paste the script to file paris_tutorial001.rb or download :download:`ED_script ` 2. Update the ED file with your reserved node name (using nano or vim) .. code-block:: bash nano paris_tutorial001.rb 2. Start the EC software and tell it to execute the experiment described in your ED file, using the command line: .. code-block:: bash omf_ec -u xmpp://usr:pwd@my_xmpp.com exec paris_tutorial001.rb * replace xmpp://usr:pwd@srv with the credentials for your user on the xmpp pubsub server that is used to communicate with the resources: .. code-block:: bash omf_ec -u xmpp://griffin.ipv6.lip6.fr exec paris_tutorial001.rb If you would like to know more about the other options of the OMF EC software please run the commands: .. code-block:: bash omf_ec help omf_ec help exec Understanding the output ======================== Below is the example output from the experiment that we have defined and run as part of this experiment: - At first the EC provides us with some information about the parameters of this experiment: .. code-block:: console OMF Experiment Controller - Copyright (c) 2012-13 National ICT Australia Limited (NICTA) {:type=>:xml, :authenticate=>nil} 17:11:56 INFO XMPP::Communicator: Connecting to 'griffin.ipv6.lip6.fr' ... 17:11:56 INFO XMPP::Communicator: Connected 17:11:56 INFO Object: OMF Experiment Controller 6.1.1 - Start 17:11:56 INFO Object: Connected using {:proto=>:xmpp, :user=>"griffin-18963", :domain=>"griffin.ipv6.lip6.fr"} 17:11:56 INFO Object: Execute: /home/onelab.upmc.nitos_tut.nitos/tut02.rb 17:11:56 INFO Object: Properties: {} 17:11:56 WARN Context::AppContext: No OML URI configured for measurement collection! (see option 'oml_uri'). Disabling OML Collection for 'transfer'. 17:11:56 INFO OmfEc::Experiment: Experiment: 2015-06-01T15:11:56.496Z starts 17:11:57 INFO OmfEc::Experiment: Configure 'node11' to join 'Receiver' 17:11:57 INFO OmfEc::Experiment: Configure 'node12' to join 'Sender' - It also provides us some feedback about its communication with the XMPP server and other OMF entities: .. code-block:: console 17:11:57 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://node12@griffin.ipv6.lip6.fr 17:11:57 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://node11@griffin.ipv6.lip6.fr 17:11:57 INFO OmfEc::Experiment: Config xmpp://node12@griffin.ipv6.lip6.fr to join Sender 17:11:57 INFO OmfEc::Experiment: Config xmpp://node11@griffin.ipv6.lip6.fr to join Receiver 17:11:58 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://6a9228d3-f2fc-40b0-a7d8-e56b63e823e8@griffin.ipv6.lip6.fr 17:11:58 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://b97dd7c1-fc70-4795-b7bb-b44d14e8eaf3@griffin.ipv6.lip6.fr 17:11:59 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://49bc7e63-745f-4aa1-98f8-dcd1c018ddc9@griffin.ipv6.lip6.fr - Then it also informs us when a defined event has been triggered: .. code-block:: console 17:11:57 INFO OmfEc::Experiment: Event triggered: 'ALL_NODES_UP, ALL_UP' 17:12:00 INFO OmfEc::Experiment: Event triggered: 'ALL_UP_AND_INSTALLED' - Finally, when an event is triggered (such as ALL_UP_AND_INSTALLED), it informs us about the tasks executed for that event, and their results/outputs: .. code-block:: console 17:12:00 INFO Object: This is my first OMF experiment with iperf 17:12:00 INFO OmfEc::Experiment: Newly discovered resource >> xmpp://bacb21f9-b523-4ffa-bc7c-eb0d7a5b5785@griffin.ipv6.lip6.fr 17:12:01 INFO Object: Server has started now... 17:12:01 INFO OmfEc: APP_EVENT STARTED from app iperf_cxt_0 - msg: env -i /usr/bin/oml2-iperf -s -p 5200 17:12:02 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: ------------------------------------------------------------ 17:12:02 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: TCP window size: 85.3 KiByte (default) 17:12:02 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: Server listening on TCP port 5200 17:12:02 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: ------------------------------------------------------------ 17:12:03 INFO Object: Client has started now... 17:12:03 INFO OmfEc: APP_EVENT STARTED from app iperf_cxt_1 - msg: env -i /usr/bin/oml2-iperf -c 192.168.0.3 -p 5200 -t 30 17:12:04 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: [ 4] local 192.168.0.3 port 5200 connected with 192.168.0.2 port 37677 17:12:05 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: ------------------------------------------------------------ 17:12:05 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: TCP window size: 23.5 KiByte (default) 17:12:05 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: Client connecting to 192.168.0.3, TCP port 5200 17:12:05 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: ------------------------------------------------------------ 17:12:05 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: [ 3] local 192.168.0.2 port 37677 connected with 192.168.0.3 port 5200 17:12:34 INFO Object: All my Applications are stopped now. 17:12:34 INFO OmfEc::Experiment: Experiment: 2015-06-01T15:11:56.496Z finished 17:12:34 INFO OmfEc::Experiment: Release applications and network interfaces 17:12:34 INFO OmfEc::Experiment: Exit in 15 seconds... 17:12:38 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: [ 3] 0.0-30.5 sec 20.8 MiBytes 5.72 Mbits/sec 17:12:38 INFO OmfEc: APP_EVENT EXIT from app iperf_cxt_1 - msg: 0 17:12:38 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_1 - msg: [ ID] Interval Transfer Bandwidth 17:12:43 INFO OmfEc: APP_EVENT EXIT from app iperf_cxt_0 - msg: 0 17:12:43 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: [ 4] 0.0-30.6 sec 20.8 MiBytes 5.69 Mbits/sec 17:12:43 INFO OmfEc: APP_EVENT STDOUT from app iperf_cxt_0 - msg: [ ID] Interval Transfer Bandwidth 17:12:48 INFO OmfEc::Experiment: OMF Experiment Controller 6.1.1 - Exit. 17:12:49 INFO XMPP::Communicator: Disconnecting... Accesing Results ================ If all went smoothly, all the results have been saved in a database named after your experiment name (here 2015-06-01T15:11:56.496Z - to kow what is your experiment name look for OmfEc::Experiment: Experiment: in experiment output) on the oml server you defined while executing the omf_ec command. Postgres database for our oml server is accessible via phppgmyadmin web interface: `nitlab.inf.uth.gr/phppgadmin/ `_ with user "oml" and password "oml". Navigate to this link and see your results stored in database!