View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Aaron Brown > perfSONAR_PS-Services-PingER-0.09 > perfSONAR_PS::Services::MP::PingER



Annotate this POD

View/Report Bugs
Module Version: 0.09   Source  


perfSONAR_PS::Services::MP::PingER - A module that performs the tasks of an MP designed for the ping measurement under the framework of the PingER project


The purpose of this module is to create objects that contain all necessary information to make ping measurements to various hosts. It supports a scheduler to perform the pings as defined in the store.xml file (which is locally stored under $self->{'STORE'}).

Internally, two helper packages are part of this module: an Agent class, which performs the tests, a Scheduler class which organises the tests to be run, and a Config class which parses the STORE file.


    use perfSONAR_PS::Services::MP::PingER;

    my %conf = ();
    # definition of where the list of hosts and parameters to ping are located
    $conf{"METADATA_DB_TYPE"} = "file";
    $conf{"METADATA_DB_NAME"} = "";
    $conf{"METADATA_DB_FILE"} = "pinger-configuraiton.xml";

    # create a new instance of the MP
    my $mp = new perfSONAR_PS::MP::PingER( \%conf );
    # or:
    # $mp = new perfSONAR_PS::MP::PingER;
    # $mp->setConf(\%conf);

        # initiate the mp


new( $conf )

create a new MP instance from hash array $conf.

init( )

Set up the MP and configure the relevant handlers to use in order to enable on-demand measurements.


accessor/mutator for database instance


setup defaults and or new values for the modules configuration variables


returns the defined key on from teh configuration


accessor/mutator for the lookup service


Do we want to register with the LS?


Actually register with the LS information about the pinger mp service. in this case we only register the existance of the MP with teh LS.


Parses the configuration files to ready the schedule for tests


Prepares the schedule from the parsed metadata


Starts the MP server to run forever the tests defined through init().

Iterating through the list of scheduled tests, it will create the relevant agents (which can be overridden with teh getAgent() method locally) to perform the tests defined by their testid.

Each test will be forked off upto a maximum of $self->maxChildren() forks, and tests behind schedule will be delayed.

Once an $agent has completed its collectMeasurements() call, the forked process will call $self->storeData() in order to store the output of the $agent into a MA or similar.


storeData( $agent, $testid )

Does the relevant storage of data collected from the $agent for the test id $testid. For PingER, we only care for storge into the SQL backend provided by the $agent itself.

Returns 0 = everything okay -1 = somethign went wrong

getAgent( $test )

Creates and returns a PingER Agent to run the given $test; must set the relevant data structures so that calling $agent->collectMeasurements() will actually run the test provided.

$test is expected to be a hash of key/values for the ping test


Do something with the message.


Do something with the message.


deal with on-demand measurements through here


perfSONAR_PS::Services::MP::Base, perfSONAR_PS::Services::MP::Scheduler, perfSONAR_PS::Services::Common, perfSONAR_PS::Services::MP::Agent::PingER, perfSONAR_PS::DB::PingER

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.


$Id: 242 2007-06-19 21:22:24Z zurawski $


Yee-Ting Li, <>


Copyright (C) 2007 by Internet2

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: