|
IEPM Web Services
|
The IEPM group is now providing access to some of its measurement data via Web Services.
There are 3 components to the SLAC IEPM Web services:
We have implemented a SOAP server and an XMLRPC server. We will show how to make a request to each one of them.
Access to the measurement is also provided via a WSDL file IEPM.wsdl.
We have two SOAP web-based client that can be used to access (print or plot) measurements:
Note= we still support the previous IEPM schema. Reference to this can be found in here
To make a request to the SLAC web services you must follow the schema
defined by the Network Measurement Working Group.
The schema can be found at:
NM-WG Request schema
There are 3 input quantities that you have to provide at request time:
The following is the list of available characteristics:
| Name | ToolName | Project |
|---|---|---|
| path.bandwidth.hoplist | traceroute | IEPM-BW |
| path.delay.roundTrip | ping | PingER |
| path.bandwidth.achievable.TCP | iperf | IEPM-BW |
| path.bandwidth.achievable.TCP.multiStream | iperf, bbftp, GridFTP | IEPM-BW |
| path.bandwidth.capacity | ABwE | IEPM-BW |
| path.bandwidth.utilization | ABwE | IEPM-BW |
We provide example code for SOAP and XMLRPC Perl clients.
We also provide example code for making a request with a SOAP Python client.
#!/usr/local/bin/perl -w
use SOAP::Lite;
use Data::Dumper;
my $startDate = "2004-06-01";
my $endDate = "2004-06-04";
my $destination = "node1.cacr.caltech.edu";
my %request =
(
characteristic => "path.bandwidth.achievable.TCP",
subject =>
{
path =>
{
destination =>
{
name => "$destination",
},
},
},
methodology => {
tool => { name => "iperf",},
},
startTime => "$startDate",
endTime => "$endDate",
);
my $measurement = SOAP::Lite
->uri('NetworkMonWebServices')
->proxy('http://www-iepm.slac.stanford.edu/cgi-wrap/maggie.cgi')
->NetworkMeasurementRequest(\%request)
->result;
print Dumper ($measurement);
exit;
#!/usr/local/bin/perl -w
use XMLRPC::Lite;
use Data::Dumper;
my $startDate = "2004-06-01";
my $endDate = "2004-06-04";
my $destination = "node1.cacr.caltech.edu";
my %request =
(
characteristic => "path.bandwidth.achievable.TCP",
subject =>
{
path =>
{
destination =>
{
name => "$destination",
},
},
},
methodology => {
tool => { name => "iperf",},
},
startTime => "$startDate",
endTime => "$endDate",
);
my $measurement = XMLRPC::Lite
->proxy('http://www-iepm.slac.stanford.edu/cgi-wrap/advisor.cgi')
->call('NetworkMonWebServices.NetworkMeasurementRequest',
\%request)
->result;
print Dumper ($measurement);
exit;
#!/usr/bin/python
from SOAPpy import SOAPProxy
request = {"characteristic": "path.bandwidth.achievable.TCP.multiStream",
"subject": {"path":
{"destination":
{"name": "node1.cacr.caltech.edu"}}},
"methodology" : {"tool":
{"name":"iperf",
"sourceCommandLine":{"arg":"8"}
}
},
"startTime": "2004-08-01T00:00:00-5:00",
"endTime": "2004-08-01T23:59:59-5:00"
}
service = SOAPProxy("http://www-iepm.slac.stanford.edu/cgi-wrap/maggie.cgi",
namespace="http://www-iepm.slac.stanford.edu/NetworkMonWebServices",
soapaction="http://www-iepm.slac.stanford.edu/NetworkMonWebServices#NetworkMe
asurementRequest")
result = service.NetworkMeasurementRequest(request)
print "The characteristic returned is = ", result.networkMeasurementSet.networkMeasurement.charac
teristic
print "The destination node is = ", result.networkMeasurementSet.networkMeasurement.subject.path.
destination.name
print "The results are = " , result.networkMeasurementSet.networkMeasurement.results
The response provided by the SLAC IEPM Web Services follows the schema defined by the Network Measurement Working Group. The latest schema can be found here: NM-WG report schema
Any report will contain the following quantities:
The Perl module Data::Dumper can help in reviewing the structure of the data returned. An example report will look like:
$VAR1 = {
'networkMeasurementSet' => {
'networkMeasurement' => {
'characteristic' => 'path.bandwidth.achievable.TCP',
'methodology' => {
'tool' => {
'versionString' => '',
'name' => 'iperf'
}
},
'subject' => {
'path' => {
'destination' => {
'name' => 'node1.cacr.caltech.edu'
},
'source' => {
'name' => 'SLAC'
}
}
},
'results' => {
'timeInterval' => {
'timestampEnd' => '1086393000',
'timestampStart' => '1086377400'
},
'result0001' => {
'timeInterval' => {
'timestamp' => '1086378987'
},
'achievableBandwidth' => '233.45'
},
'result0002' => {
'timeInterval' => {
'timestamp' => '1086384389'
},
'achievableBandwidth' => '236.2'
}
}
},
'version' => 'http://www-didc.lbl.gov/NMWG/schemas/relax/report.html'
}
};