The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perfsonar.pl - An basic Measurement Collection framework

DESCRIPTION

This script shows how a script for a given service should look.

SYNOPSIS

./perfsonar-collector.pl [--verbose --help --config=config.file --piddir=/path/to/pid/dir --pidfile=filename.pid]\n";

The verbose flag allows lots of debug options to print to the screen. If the option is omitted the service will run in daemon mode.

handleCollector($args) The registerLS function is called in a separate process or thread and is responsible for calling the specified service's 'registerLS' function regularly.

daemonize Sends the program to the background by eliminating ties to the calling terminal.

lockPIDFile($piddir, $pidfile); The lockPIDFile function checks for the existence of the specified file in the specified directory. If found, it checks to see if the process in the file still exists. If there is no running process, it returns the filehandle for the open pidfile that has been flock(LOCK_EX).

unlockPIDFile($) This file writes the pid of the call process to the filehandle passed in, unlocks the file and closes it.

killChildren Kills all the children for this process off. It uses global variables because this function is used by the signal handler to kill off all child processes.

signalHandler Kills all the children for the process and then exits

SEE ALSO

perfSONAR_PS::Services::Base, perfSONAR_PS::Services::MA::General, perfSONAR_PS::Common, perfSONAR_PS::Messages, perfSONAR_PS::Transport, perfSONAR_PS::Client::Status::MA, perfSONAR_PS::Client::Topology::MA

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

https://mail.internet2.edu/wws/info/i2-perfsonar

The perfSONAR-PS subversion repository is located at:

https://svn.internet2.edu/svn/perfSONAR-PS

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

VERSION

$Id:$

AUTHOR

Aaron Brown, aaron@internet2.edu

LICENSE

You should have received a copy of the Internet2 Intellectual Property Framework along with this software. If not, see <http://www.internet2.edu/membership/ip.html>

COPYRIGHT

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

All rights reserved.