Skip to Content.
Sympa Menu

perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r801 - branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client

Subject: perfsonar development work

List archive

[pS-dev] [GEANT/SA2/SA2T3-OPPD] r801 - branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client


Chronological Thread 
  • From:
  • To:
  • Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r801 - branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client
  • Date: Fri, 12 Apr 2013 11:30:57 +0100 (BST)
  • Authentication-results: sfpop-ironport02.merit.edu; dkim=neutral (message not signed) header.i=none

Author: dfn.calim
Date: 2013-04-12 11:30:57 +0100 (Fri, 12 Apr 2013)
New Revision: 801

Modified:
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/OWAMP-Scheduler.pl

branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
Log:
changed OWAMP scheduler with command line parameters

Modified:
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/OWAMP-Scheduler.pl
===================================================================
---
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/OWAMP-Scheduler.pl
2013-04-05 14:12:55 UTC (rev 800)
+++
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/OWAMP-Scheduler.pl
2013-04-12 10:30:57 UTC (rev 801)
@@ -1,30 +1,73 @@
#!/usr/bin/perl

+use Getopt::Std;
+use strict;
+use Data::Dumper;

my $port = 8090;
my $tool = "perfsonar-client.pl";
-my $path = "/usr/lib/perfsonar/services/oppd/tools/perfsonar-client";
+my $path = "./";
my $stand_count=100;
+my $intermedia = 0;
+sub usage{
+ print "\tUsage: OWAMP-Scheduler.pl -f -s <source IP> -d <destination
IP> -c <count> -i <intermedia>
+ \t\t-s <source IP>\tSource IP of measueement point
+ \t\t-d <destination IP>\tDestination IP of measuement point
+ \t\t-c <count>\tThe unit of packages which will be send during
test. This is optional and default is 100
+ \t\t-f \tUse this option to send FROM destination IP to source
IP (reverse mode). This is optional and default is sending TO destination IP.
+ \t\t-i <intermedia>\tNumber of test packets (to summarize per
sub-session) this is useful for scheduling. This is optional and default is
set to:0
+ ";
+ exit 0;

-my ($src, $dst, $count) = @ARGV;
+}

+my ($src, $dst, $count,$direction,$schedule);
+my %args;
+
+usage() if (! getopts('s:d:c:i:f', \%args) );
+print Dumper(%args);
+#Check if values are set
+foreach my $arg ( keys %args ){
+ print "Key: $arg ";
+ if ( $arg =~ /s/ ){
+ print "bin in s\n";
+ $src = $args{$arg};
+ } elsif ( $arg =~ /d/ ) {
+ print "bin in d\n";
+ $dst = $args{$arg};
+ } elsif ( $arg =~ /c/ ) {
+ $count = $args{$arg};
+ } elsif ( $arg =~ /i/ ){
+ $schedule = $args{$arg};
+ } elsif ( $arg =~ /f/ ) {
+ $direction = "from";
+ }else{
+ usage();
+ }
+} # End foreach
+
if (!$src || !$dst){
- print "usage: OWAMP-Scheduler.pl <src> <dst> <count>\n";
- exit;
+ print "Source or destination IP is not set\n";
+ usage();
}

#check if src and dst are ip-adresses
if (!($src =~ /\d+\.\d+\.\d+\.\d+/) || !($dst =~ /\d+\.\d+\.\d+\.\d+/)){
print "<src> and <dst> must be IP adresses!\n";
- exit;
}

if (! $count){
print "No <count> defined. Setting it to $stand_count!\n";
$count = $stand_count;
}
+if (! $schedule){
+ $schedule = 0;
+}
+if (! $direction ) {
+ $direction = "to";
+}

-my $template = "$path/template-owamp-mp.xml";
+my $template = "./template-owamp-mp.xml";

#read in template XML file, set src/dst/count paramters
my $request;
@@ -35,6 +78,8 @@
$line =~ s/src type="ipv4" value="src"/src type="ipv4" value="$src"/;
$line =~ s/dst type="ipv4" value="dst"/dst type="ipv4" value="$dst"/;
$line =~ s/name="count" value=VALUE/name="count" value="$count"/;
+ $line =~ s/name="one_way" value=VALUE/name="one_way" value="$direction"/;
+ $line =~ s/name="intermediates" value=VALUE/name="intermediates"
value="$schedule"/;
$request .= $line;
}

@@ -46,6 +91,6 @@
print REQUEST $request;
close REQUEST;

-my $status = `$path/$tool --reqfile=$req_file
--uri=http://$src:$port/services/MP/OWAMP --host=$src`;
+my $status = `./$tool --reqfile=$req_file
--uri=http://$src:$port/services/MP/OWAMP --host=$src`;
print "Status: $status\n";
unlink $req_file;

Modified:
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
===================================================================
---
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
2013-04-05 14:12:55 UTC (rev 800)
+++
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
2013-04-12 10:30:57 UTC (rev 801)
@@ -1,17 +1,28 @@
+<!--
+ 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="owamp-req-1.0 "
+ 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: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>
@@ -20,8 +31,8 @@
</nmwgt:endPointPair>
</owamp:subject>

- <nmwg:eventType>http://ggf.org/ns/nmwg/tools/owamp/2.0</nmwg:eventType>
- <nmwg:parameters id="owamp-parameters">
+ <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)
@@ -32,18 +43,36 @@
<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="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"/> -->
+ <!-- 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"/>



  • [pS-dev] [GEANT/SA2/SA2T3-OPPD] r801 - branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client, svn-noreply, 04/12/2013

Archive powered by MHonArc 2.6.16.

Top of Page