perfSONAR_PS::Client::Echo - A module that provides methods for interacting with perfSONAR Echo services.


This module allows one to test whether or not a perfSONAR service is running by testing by pinging it using the standardized pS ping request.

The module is to be treated as an object, where each instance of the object represents a connection to an endpoint. Each method may then be invoked on the object for the specific endpoint.


        use perfSONAR_PS::Client::Echo;

        my $echo_client = new perfSONAR_PS::Client::Echo("http://localhost:4801/axis/services/status");
        if (not defined $echo_client) {
                print "Problem creating echo client for service\n";

        my ($status, $res) = $echo_client->ping;
        if ($status != 0) {
                print "Problem pinging service: $res\n";



The API os perfSONAR_PS::Client::Echo is rather simple and greatly resembles the messages types received by the server.

new($package, $uri_string, $eventType)

The new function takes a URI connection string as its first argument. This specifies which service to interact with. The function can take an optional eventType argument which can be used if a service only supports a specific echo request event type.


The ping function is used to test if the service is up. It returns an array containing two values. The first value is a number which specifies whether the ping succeeded. If it's 0, that means the ping succeeded and the second value is undefined. If it is -1, that means the ping failed and the second value contains an error message.

setURIString($self, $uri_string)

The setURIString function changes the MA that the instance uses.

setEventType($self, $eventType)

The setEventType function changes the eventType that the instance uses.


perfSONAR_PS::Common, perfSONAR_PS::Transport, perfSONAR_PS::Messages, perfSONAR_PS::XML::Document_string, Log::Log4perl

To join the 'perfSONAR-PS' mailing list, please visit:

The perfSONAR-PS subversion repository is located at: 

Questions and comments can be directed to the author, or the mailing list.




Aaron Brown, Jason Zurawski,


You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <>


Copyright (c) 2004-2008, Internet2 and the University of Delaware

All rights reserved.