Skip to Content.
Sympa Menu

perfsonar-user - [perfsonar-user] Always get 0 returns through owamp data query.

Subject: perfSONAR User Q&A and Other Discussion

List archive

[perfsonar-user] Always get 0 returns through owamp data query.


Chronological Thread 
  • From: "Jialu Pu" <>
  • To: <>
  • Subject: [perfsonar-user] Always get 0 returns through owamp data query.
  • Date: Mon, 26 Jul 2010 12:22:34 -0400

I was able to get the endpoints of a site and modify the example code http://psps.perfsonar.net/client-doc.html#MA_BWOW_4
to get owamp data.

I tried to run the perl script to get data in http://ndb1.internet2.edu/perfAdmin/delayGraph.cgi?url="http://sunn-owamp.es.net:8085/perfSONAR_PS/services/pSB&key=88a7e2cc11f905272aac4f7263c10e5f&key2=70eba7b7035a762918944053eafd909f&dst=198.129.254.78&src=198.129.254.54&dhost=sunn-owamp.es.net&shost=pnwg-owamp.es.net&length=86400

I tried both ipv4 and hostname. I also tried other endpoints which is returned from MA.
But it  gives 'query returned 0 result".

The code:

#!/usr/bin/perl
use FindBin;
use lib ("$FindBin::Bin/lib");
use perfSONAR_PS::Client::MA;
use XML::Twig;

# Create client
my $ma = new perfSONAR_PS::Client::MA( { instance => 'http://sunn-owamp.es.net:8085/perfSONAR_PS/services/pSB' } );

# Define subject
my $subject = "<owamp:subject xmlns:owamp=\"http://ggf.org/ns/nmwg/tools/owamp/2.0/\" id=\"subject\">\n";
$subject .=   "    <nmwgt:endPointPair xmlns:nmwgt=\"http://ggf.org/ns/nmwg/topology/2.0/\">";
$subject .=   "        <nmwgt:src type=\"ipv4\" value=\"198.129.254.54\"/>";
$subject .=   "        <nmwgt:dst type=\"ipv4\" value=\"198.129.254.78\"/>";
$subject .=   "    </nmwgt:endPointPair>";
$subject .=   "</owamp:subject>\n";

my @eventTypes = ();

# Set time range
my $end = gmtime;
my $start = $end - 24*3600; #1 day ago

# Send the request
my $result = $ma->setupDataRequest(
        {
            subject    => $subject,
            eventTypes => \@eventTypes,
            start      => $start,
            end        => $end,
        }
    );

#Output XML
my $twig= XML::Twig->new(pretty_print => 'indented');
foreach $metadata(@{$result->{"metadata"}}){
    $twig->parse($metadata);
    $twig->print();
}
foreach $data(@{$result->{"data"}}){
    $twig->parse($data);
    $twig->print();
}




Thanks.
Jialu Pu




Archive powered by MHonArc 2.6.16.

Top of Page