NAME - An basic Measurement Collection framework


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


./ [--verbose --help --config=config.file --piddir=/path/to/pid/dir]\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


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:

The perfSONAR-PS subversion repository is located at:

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




Aaron Brown,


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


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

All rights reserved.