wiki:Tutorial/HowToCommand

Version 1 (modified by thierry, 17 years ago) ( diff )

Go back —> Tutorials

How to use execute a shell command on the nodes

This feature is only available in NodeHandler v4 and above.

Before going through this tutorial, you should know how to install a disk image.

You should also have installed a disk image with Node Agent v4 on the nodes of the testbed you are using (e.g. "baseline-7.11.ndz").

Goal

In this tutorial, you will learn a simple way to run a shell commands on the nodes of a testbed.

The tutorial experiment

This experiment is given in the attached script tut_cmd_1.rb.

This file contains extensive comments that should help you understand the different steps involved in executing a shell command on the nodes of a testbed. For more information on the basics of writing and using an experiment script, please refer to the previous tutorials, here and here.

To run this example script, use the following command:

 nodehandler4 tut_cmd_1

(This assumes that you previously logged in to the a testbed, and imaged its nodes with the a disk image such as "baseline-7.11.ndz".)

The Results

The experiment screen output should then look like this. And the experiment log file should look like this.

More…

This other script tut_topo_1_more.rb contains an extended version of the above script with more optional features.

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.