Command Measurement Point

From GEANT2-JRA1 Wiki

Contents

Command Measurement Point (CMP)

Command Measurement Point (CMP) can execute arbitrary commands with arbitrary arguments as specified in the XML request sent to CMP. The executed command should return time-series data (tuples of timestamp and value). The command can be executed locally on the computer running CMP server or remotely on another computer over SSH connection.

Installation

Requirements:

  • Python 2.3 or better (developed on 2.4)
  • SOAPpy, NMWGpy and SONARpy packages

Follow instructions in doc/README file in the distribution package.

Example - local command

See the full example files CommandRequest-1.xml and CommandResponse-1.xml in client/schema/example-instances/sonar subdirectory.

The following example executes command ping_rtt.sh www.cesnet.cz 3 locally. The command makes 3 ICMP echo requests and returns RTT.

<nmwg:eventType>command</nmwg:eventType>
<nmwg:parameters id="param1">
   <nmwg:parameter name="command">ping_rtt.sh</nmwg:parameter>
   <nmwg:parameter name="argument">www.cesnet.cz</nmwg:parameter>
   <nmwg:parameter name="argument">3</nmwg:parameter>
</nmwg:parameters>

Example - remote command

See the full example files CommandRequest-2.xml and CommandResponse-2.xml in client/schema/example-instances/sonar subdirectory.

In order to execute a command remotely, specify the name and arguments of the command in the same way as for locally executed command (see the previous example), but add specification of remote execution.

The following example executes the command on the scampi1.cesnet.cz computer using MyUser username. A public ssh key authentication should be established that allows CMP service to login without password to the remote computer.

<command:subject id="sub1">
   <nmwgt:interface>
      <nmwgt:ifAddress type="ipv4">195.113.147.23</nmwgt:ifAddress>
      <nmwgt:hostName>scampi1.cesnet.cz</nmwgt:hostName>
      <nmwgt:ifName>MyUser</nmwgt:ifName>
   </nmwgt:interface>
</command:subject>

Download

perfSONAR-CMP.tgz

Contact

Developed by Aleš Friedl, CESNET.

Contact ales.friedl (-at-) email.cz or ubik (-at-) cesnet.cz

Personal tools