perfsonar-dev - [pS-dev] [GEANT/SA2/SA2T3-OPPD] r780 - in branches/perfsonar-oppd-all-0.53: build/rpm/SPECS lib/perfSONAR lib/perfSONAR/DataStruct lib/perfSONAR/MP tools/perfSONAR-client
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/SA2T3-OPPD] r780 - in branches/perfsonar-oppd-all-0.53: build/rpm/SPECS lib/perfSONAR lib/perfSONAR/DataStruct lib/perfSONAR/MP tools/perfSONAR-client
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/SA2T3-OPPD] r780 - in branches/perfsonar-oppd-all-0.53: build/rpm/SPECS lib/perfSONAR lib/perfSONAR/DataStruct lib/perfSONAR/MP tools/perfSONAR-client
- Date: Fri, 7 Dec 2012 07:22:15 +0000 (GMT)
Author: dfn.calim
Date: 2012-12-07 07:22:15 +0000 (Fri, 07 Dec 2012)
New Revision: 780
Modified:
branches/perfsonar-oppd-all-0.53/build/rpm/SPECS/oppd-MDM.spec
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm
branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP/OWAMP.pm
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
Log:
Add new schema code for summary and raw data in OWAMP MP
Modified: branches/perfsonar-oppd-all-0.53/build/rpm/SPECS/oppd-MDM.spec
===================================================================
--- branches/perfsonar-oppd-all-0.53/build/rpm/SPECS/oppd-MDM.spec
2012-11-30 09:13:25 UTC (rev 779)
+++ branches/perfsonar-oppd-all-0.53/build/rpm/SPECS/oppd-MDM.spec
2012-12-07 07:22:15 UTC (rev 780)
@@ -42,6 +42,7 @@
Requires: perl(URI)
Requires: perl(XML::LibXML)
Requires: perl(XML::LibXML::NodeList)
+Requires: perl(TimeDate)
Obsoletes: oppd
Obsoletes: perfsonar-oppd < 0.53
Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
2012-11-30 09:13:25 UTC (rev 779)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/DataStruct/NMWG.pm
2012-12-07 07:22:15 UTC (rev 780)
@@ -62,6 +62,7 @@
$self->{NS}->{MPBWCTL} = "http://ggf.org/ns/nmwg/tools/iperf/2.0/";
$self->{NS}->{MPOWAMP} = "http://ggf.org/ns/nmwg/tools/owamp/2.0/";
+ $self->{NS}->{OWAMPSUMMARY} =
"http://ggf.org/ns/nmwg/characteristic/delay/summary/20070921/";
$self->{NS}->{STORE} = "http://ggf.org/ns/nmwg/ops/store/2.0/";
$self->{NS}->{RAW} = "http://ggf.org/ns/nmwg/tools/owd/raw";
$self->{NS}->{HADES} =
"http://ggf.org/ns/nwmg/tools/hades/aggregated";
@@ -514,6 +515,14 @@
$datalines_ref = $res[0];
$ns = $res[1];
}
+ # Get if OWAMP the ns for summary or raw
+ my $owampoutput;
+ $owampoutput = $$ds->{SERVICE}->{DATA}->{$id}->{OUTPUTTYPE} if
defined $$ds->{SERVICE}->{DATA}->{$id}->{OUTPUTTYPE};
+ if (defined $owampoutput && $$ds->{SERVICE}->{NAME} =~ /OWAMP/ ){
+ if ( $owampoutput=~ /summary/ ){
+ $ns = $self->{NS}->{OWAMPSUMMARY};
+ }
+ }
$$ds->{REQUESTMSG}->set_data_ns ($id, $ns, @$datalines_ref);
my $storesuccess = 1;
Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP/OWAMP.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP/OWAMP.pm 2012-11-30
09:13:25 UTC (rev 779)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP/OWAMP.pm 2012-12-07
07:22:15 UTC (rev 780)
@@ -273,13 +273,13 @@
}elsif ($resultline =~
#first: 2012-10-17T11:45:00.601
/first:\s+(\d+-\d+-\d+T\d+:\d+:\d+.\d+)/){
- my $starttime = $1;
+ my $starttime = $self->parseOWAMPTime($1);
$self->{LOGGER}->info("Starttime: $starttime");
$data_hash{"startTime"} = $starttime;
}elsif ($resultline =~
#last: 2012-11-29T15:13:11.386
/last:\s+(\d+-\d+-\d+T\d+:\d+:\d+.\d+)/){
- my $endTime = $1;
+ my $endTime = $self->parseOWAMPTime($1);
$data_hash{"endTime"} = $endTime;
} elsif ($resultline =~
#one-way delay min/median/max = 0.202/0.4/0.582 ms,
(err=0.628 ms)
@@ -350,4 +350,37 @@
}#End foreach
return;
}
+
+=head2 parseOWAMPTime(owamptime)
+The owping returns a time stamp of format:
year-month-dayThours:minutes:seconds.millisecond
+Use this method to get a time stamp like Wed Aug 25 14:20:09.2638497491 UTC
2010
+=cut
+sub parseOWAMPTime{
+
+ my ($self,$starttime) = @_;
+ my ($date,$time) = split ("T", $starttime);
+ my ($year,$month,$day) = split ("-", $date);
+ my ($hour,$min,$asec) = split (":", $time);
+ my ($sec,$msec) = split ('\.', $asec);
+
+ my $dt = DateTime->new(
+ year => $year,
+ month => $month,
+ day => $day,
+ hour => $hour,
+ minute => $min,
+ second => $sec,
+ nanosecond => $msec * 1000
+ #time_zone => strftime("%Z", localtime())
+
+ );
+
+
+ # We need the UTC Time
+ my $isoTS = $dt->day_abbr ." ". $dt->month_abbr . " ". $dt->day ." ".
$dt->hms ."." . $msec ." UTC " . $dt->year;
+ $self->{LOGGER}->info($isoTS);
+ return $isoTS;
+
+}
+
1;
Modified: branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm
===================================================================
--- branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm 2012-11-30
09:13:25 UTC (rev 779)
+++ branches/perfsonar-oppd-all-0.53/lib/perfSONAR/MP.pm 2012-12-07
07:22:15 UTC (rev 780)
@@ -203,6 +203,7 @@
my @mresult = $self->parse_result($ds,$id);
#$self->{LOGGER}->info(Dumper(@mresult));
$$ds->{SERVICE}->{DATA}->{$id}->{MRESULT} =
\@mresult;
+ $$ds->{SERVICE}->{DATA}->{$id}->{OUTPUTTYPE} = $self->{OUTPUTTYPE};
#$logger->info(Dumper(@mresult));
}#End foreach my $id
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
2012-11-30 09:13:25 UTC (rev 779)
+++
branches/perfsonar-oppd-all-0.53/tools/perfSONAR-client/template-owamp-mp.xml
2012-12-07 07:22:15 UTC (rev 780)
@@ -20,7 +20,8 @@
</nmwgt:endPointPair>
</owamp:subject>
- <nmwg:eventType>http://ggf.org/ns/nmwg/tools/owamp/2.0</nmwg:eventType>
+ <nmwg:eventType>http://ggf.org/ns/nmwg/tools/owamp/2.0</nmwg:eventType>
-->
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/delay/summary</nmwg:eventType>
<nmwg:parameters id="owamp-parameters">
<!-- count - number of test packets-->
<nmwg:parameter name="count" value=VALUE/>
@@ -32,14 +33,16 @@
<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="600"/>
</nmwg:parameters>
</nmwg:metadata>
- [pS-dev] [GEANT/SA2/SA2T3-OPPD] r780 - in branches/perfsonar-oppd-all-0.53: build/rpm/SPECS lib/perfSONAR lib/perfSONAR/DataStruct lib/perfSONAR/MP tools/perfSONAR-client, svn-noreply, 12/07/2012
Archive powered by MHonArc 2.6.16.