NAME
perfSONAR_PS::Services::MP::Agent::Ping - A module that will run a ping and return it's output in a suitable internal data structure.
DESCRIPTION
Inherited perfSONAR_PS::Services::MP::Agent::CommandLine class that allows a command to be executed. This class overwrites the parse and
SYNOPSIS
# create and setup a new Agent
my $agent = perfSONAR_PS::Services::MP::Agent::Ping( );
$agent->init();
# collect the results (i.e. run the command)
if( $mp->collectMeasurements() == 0 )
{
# get the raw datastructure for the measurement
use Data::Dumper;
print "Results:\n" . Dumper $self->results() . "\n";
}
# opps! something went wrong! :(
else {
print STDERR "Command: '" . $self->commandString() . "' failed with result '" . $self->results() . "': " . $agent->error() . "\n";
}
new( $command, $options, $namespace)
Creates a new ping agent class
init()
inherited from parent classes. makes sure that the ping executable is existing.
command()
accessor/mutator for the ping executable file
cont( $string )
accessor/mutator method to set the number of packets to ping to
interval( $string )
accessor/mutator method to set the period between packet pings
packetInterval( $string )
accessor/mutator method to set the period between packet pings
deadline( $string )
accessor/mutator method to set the deadline value of the pings
packetSize( $string )
accessor/mutator method to set the packetSize of the pings
ttl( $string )
accessor/mutator method to set the ttl of the pings
ttl( $string )
accessor/mutator method to set the ttl of the pings
parse()
parses the output from a command line measurement of pings