Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfSONAR-developer] Re: [perfsonar-user] perfSONAR APIs

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfSONAR-developer] Re: [perfsonar-user] perfSONAR APIs


Chronological Thread 
  • From: Hakan Calim <>
  • To: Xu Chen <>, Daniel Doyle <>
  • Cc: perfsonar-user <>,
  • Subject: Re: [perfSONAR-developer] Re: [perfsonar-user] perfSONAR APIs
  • Date: Fri, 03 Jul 2015 10:19:14 +0200

HI Chen,

there are no documents which describing this communication process. I attached two templates which you can use as a request message to OWAMP MP or BWCTL MP. In the template are all parameters which are actually supported by OPPD.

I also added the perfsonar client which can send this message to OPPD. It is written in perl. Have a look on it maybe it can help you to develop your request client in python or in which language you prefer to develop the client.

To check the perfsonar-client:
1. Go to the oppd bin folder in your toolkit installation:
# cd /opt/perfsonar_ps/oppd_mp/bin/
2. Copy there the perfsonar-client.pl and template-bwctl-mp.xml
3. Start a request to a BWCTL MP
# ./perfsonar-client.pl -u http://<hostname-of-bwctl-mp>:8090/services/MP/BWCTL -f template-bwctl-mp.xml


Hope this helps.

Best regards,
Hakan

Am 02.07.2015 19:43, schrieb Xu Chen:
Hi Dan & Hakan,

Thank you for your reply. That’s what I am looking for. By the way, do you
have any OPPD tutorials or documents I can read to start?

Best,

Chen
On Jul 2, 2015, at 12:47 PM, Hakan Calim
<>
wrote:

Hi Chen,

as far as I understood your problem what you can do is to use OPPD to start
your test. To send your request, you can use every language which supports
HTTP and XML. So you send your test request to OPPD by HTTP with SOAP
message and get the result as a SOAP message. Hope this answers your question.

Best regards,
Hakan

Am 01.07.2015 19:40, schrieb Daniel Doyle:
Chen,

Currently there is no API for adding a new regular test in the standard toolkit. There
is another effort in the pS community called "OPPD" which was designed to
support on demand testing among other things. I do not believe there is any formal API
documentation for this, however, so I'm forwarding your request to the developer list
so that one of the devs that works on the OPPD suite can work with you.

-Dan

On Jun 29, 2015, at 11:46 AM, Xu Chen
<>
wrote:

Hello all,

I googled perfSONAR APIs and only found APIs for reading and writing data
from MA.

As I mentioned in previous emails, is there a way to start a new regular
test (throughput, ping) in Python or other language? Does perfSONAR provide
such APIs?

Thanks,

Chen
On Jun 25, 2015, at 10:08 AM, Xu Chen
<>
wrote:

Hi Dan,

I mean the regular test, such as throughput and ping.

Chen
On Jun 25, 2015, at 10:03 AM, Daniel Doyle
<>
wrote:

Hi Chen,

Can you clarify what you mean by "start a measurement"? You want to spin up
an ad hoc test or create a new regular test or...?

-Dan

On Jun 25, 2015, at 9:58 AM, Xu Chen
<>
wrote:

Hi all,

I have a question when starting a perfSONAR measurement. Does perfSONAR
provide APIs to start a measurement in Python or other languages?

Thanks,

Chen
Dan Doyle
GlobalNOC Software Developer
1-812-856-3892




Dan Doyle
GlobalNOC Software Developer
1-812-856-3892





Attachment: perfsonar-client.pl
Description: Perl program

<?xml version="1.0" encoding="UTF-8"?>

<nmwg:message type="SetupDataRequest"
                   id="bwctl-request"
                   xmlns="http://ggf.org/ns/nmwg/tools/org/perfsonar/1.0/";
                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
                   xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/";
                   xmlns:bwctl="http://ggf.org/ns/nmwg/tools/bwctl/2.0/";
                   xmlns:iperf="http://ggf.org/ns/nmwg/tools/iperf/2.0/";
                   xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>

  <nmwg:metadata id="bwctl-metadata">
    <bwctl:subject id="bwctl-subject">
      <nmwgt:endPoint type="ipv4" value="src"/>
    </bwctl:subject>

    <nmwg:eventType>http://ggf.org/ns/nmwg/tools/bwctl/2.0</nmwg:eventType>
    <bwctl:parameters id="bwctl-parameters">
      <nmwg:parameter name="duration" value="30"/>
    </bwctl:parameters>
  </nmwg:metadata>

  <nmwg:metadata id="iperf-metadata">
    <iperf:subject id="iperf-subject" metadataIdRef="bwctl-metadata">
      <nmwgt:endPointPair>
        <nmwgt:src type="ipv4" value="src"/>
        <nmwgt:dst type="ipv4" value="dst"/>
      </nmwgt:endPointPair>
    </iperf:subject>
    <iperf:parameters id="iperf-parameters">
      <nmwg:parameter name="interval" value="6"/>
      <nmwg:parameter name="protocol" value="tcp"/>
    </iperf:parameters>
    <nmwg:eventType>http://ggf.org/ns/nmwg/tools/iperf/2.0</nmwg:eventType>
  </nmwg:metadata>

  <!-- triggers to indicate head of chains -->
  <nmwg:data id="1" metadataIdRef="iperf-metadata"/>


</nmwg:message>
<!--
	File:		template-owamp-mp.xml

	Description:	This the temlate file to send request messages to OWAMP MP. You have 2 forms of request
			forms to request measurement data from OWAMP MP. The first one is to get the measurement 
			data as raw data. The second is to get summary data from OWAMP MP. Both are defined from 
			the parameter output. See parameter block below for details.

			
-->

<?xml version="1.0" encoding="UTF-8"?>

<nmwg:message type="SetupDataRequest"
	id="SetupDataRequest-owamp-1.0"
	xmlns:owamp="http://ggf.org/ns/nmwg/tools/owamp/2.0/";
	xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
	xmlns:select="http://ggf.org/ns/nmwg/ops/select/2.0/";
	xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
	xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/";
	xmlns:owd = "http://ggf.org/ns/nmwg/characteristic/delay/one-way/20070914/";
	xmlns:store ="http://ggf.org/ns/nmwg/ops/store/2.0";
	xmlns:summary="http://ggf.org/ns/nmwg/characteristic/delay/summary/20070921/";>


  <nmwg:metadata id="owamp-metadata">
    <owamp:subject id="owamp-subject">
    	<nmwgt:endPointPair>
			<nmwgt:src type="ipv4" value="src"/> 
			<nmwgt:dst type="ipv4" value="dst"/> 
		</nmwgt:endPointPair>
    </owamp:subject>

    <nmwg:eventType>http://ggf.org/ns/nmwg/tools/owamp/2.0</nmwg:eventType> 
    <owamp:parameters id="owamp-parameters">	
		<!--  count - number of test packets-->
		<nmwg:parameter name="count" value=VALUE/>		
		<!-- wait - mean average time between packets (seconds) 
		<nmwg:parameter name="wait" value="VALUE"/> -->
		<!-- timeout - maximum time to wait for a packet before declaring it lost (seconds)
		<nmwg:parameter name="timeout" value="VALUE"/> -->
		<!-- size - size of the padding added to each packet (bytes)
		<nmwg:parameter name="size" value="VALUE"/> -->
		<!-- startdelay - time to wait before executing test (seconds)
		<nmwg:parameter name="startdelay" value="VALUE"/> -->
		<!-- output - set here the outputtype of response data (raw or summary) -->
		<nmwg:parameter name="output" value="summary"/> 
		<!-- DSCP - RFC 2474 style DSCP value for TOS byte
		<nmwg:parameter name="DSCP" value="VALUE"/> -->
		<!-- bucket_width - bin size for histogram calculations
		<nmwg:parameter name="bucket_width" value="VALUE"/> -->
		<!-- one_way - give the direction of test (from/to)-->
		<nmwg:parameter name="one_way" value=VALUE/>
		<!-- intermediates - (packets per sub test session) - number of test packets (to summarize per sub-session) -->
		<nmwg:parameter name="intermediates" value=VALUE/> 
    </owamp:parameters>
  </nmwg:metadata>

  <!-- Use this block to activate store in SQL MA
       To activate it uncomment this block 
  
  <nmwg:metadata id="meta2">
    <nmwg:subject id="store1" dataIdRef="1"/>
    <nmwg:eventType>http://ggf.org/ns/nmwg/ops/store/2.0/</nmwg:eventType>
    <nmwg:parameters id="param2">
      <nmwg:parameter name="uri" value="http://genesis-vm-centos6-32.rrze.uni-erlangen.de:8080/geant2-java-sql-ma/services/MeasurementArchiveService"/>
    </nmwg:parameters>
  </nmwg:metadata>
 
  <nmwg:data id="2" metadataIdRef="meta2"/>
-->
 



  
  <!-- triggers to indicate head of chains -->
  <nmwg:data id="1" metadataIdRef="owamp-metadata"/>

</nmwg:message>



Archive powered by MHonArc 2.6.16.

Top of Page