Developing Experiments

This page introduces the concepts of developing experiment scripts and running experiments. After reviewing this page, you should go through the simple step-by-step "Hellow World" tutorial located click here.

Before you start, ensure that:

  • you have a valid account to log on to the OMF system deployed on a particular testbed
  • you have reserved a time slot for running your experiment

For more information about obtaining an account and making a reservation, see the Getting Started page.

Experiment Controller Commands

To access a testbed using the OMF system, you will need to log on to a 'console' machine on that testbed. Logging access to that console machine is through ssh, and is only available during your approved time slot. Once you are logged on to the console machine for a testbed, you will have access to all the resources on this testbed.

For example, if you wish to access the testbed called 'sb1' (for sandbox 1) on the 'norbit.npc.nicta.com' domain, you would type in the following command:

ssh username@sb1.norbit.npc.nicta.com.au

Once logged in, you can invoke the OMF Experiment Controller via the omf command and its set of sub-commands and options. With this command, you can:

  • run an experiment
  • save a disk image of a given node
  • load a saved disk image on nodes
  • switch a given set of nodes On/Off
  • view the status of a set of nodes

The usage format for the omf command is:

omf [SUBCOMMAND] [ARGUMENT]...

The following table lists the omf sub-commands and describes their functions:

omf Command Description
omf help Display the help for using omf commands.
omf exec Execute an experiment script.
omf load Load a disk image on a given set of nodes.
omf save Save a disk image from a given node into a file.
omf tell Switch a given set of nodes ON/OFF.
omf stat Returns the status of a given set of nodes

If you want more information about using a specific command, you can type the following:

omf help [SUBCOMMAND]

Examples:

  • omf help exec to return usage/help for the exec command
  • omf help load to return usage/help for the load command

With this knowledge omf commands, you can proceed to developing and running experiments. As you go through the rest of this guide, you will learn more about different omf commands and how to use them.

Developing the Experiment Script

Before you can run an experiment on the testbed, you need to first describe it in a script. The script can be written in a Domain-specific Language based on Ruby. You do not need to learn Ruby for this; you can get started as soon as you are familiar with a few patterns in Ruby. The full programming capability is still available and can be very useful for advanced experimenters.

If you are new user and need help with writing a script, refer to the Basic Tutorial page of this user guide. If you need information about using advanced features to develop more complex experiments, refer to the Advanced Tutorials page. You can also access information about Ruby and OMF's Ruby-based API.

Running an Experiment

Once your experiment script is ready and you have logged on to the Console, start your experiment using the Experiment Controller.

To start your experiment, use the command:

omf exec <experiment_name>

For example, if your experiment is in a script file called 'test.rb' that resides in '/foo/bar/', you would execute it as follows:

omf exec /foo/bar/test.rb 

You can also change to the directory in which the script resides and then execute it without giving the full path. By default the Experiment Controller will look for the experiment script at the given path. If the script is not found there, the Experiment Controller will then look for it in its bundled script directory. Another way to denote paths is to use a colon(:), which is substituted with a slash(/) by the Experiment Controller at runtime.

omf exec foo:bar:test 

After your experiment has finished running, by default the involved nodes are left powered On. The -f option of omf exec can be used to switch the nodes Off after an experiment has been run.

Next...


EXPID.png (19.9 kB) Vidya Sunder, 29/01/2009 09:16 am

omfexechelp.png (20.7 kB) Vidya Sunder, 29/01/2009 09:19 am

OMF_Commands.png (9.8 kB) Vidya Sunder, 29/01/2009 09:25 am