xpdtest - Man Page

xproofd test utility

Synopsis

xpdtest [options]

Description

This manual page documents the xpdtest program, an utility whose purpose is to test the status of an xproofd daemon running on the local machine. The target is to run xpdtest inside a monitor infrastructure, for example monit (see http://mmonit.com/monit/ ), capable to take some decisions and to do some actions following the result of xpdtest.

Options

--help,  -h

Gives a short list of options available, and exit

-t <test>

type of test to be run:
   0       ping the daemon (includes process existence check if pid specified; see below)
   1       ping the daemon and check connection for default user
   2       ping the daemon and check connection for the default user and all recent users

The default user is the one specified in the URL (e.g. 'user' for user@localhost); if no explicit specification is found in the URL, the user under which xpdtest is run is used; it can be also passed via the environment variable XPDTEST_TEST.

-u <url>

URL where the xproofd under test responds; it can be also passed via the environment variable XPDTEST_URL (default is 'localhost:1093').

-d <sbdir>

sandbox directory used to find out the users of the facility when test is 2; it can be also passed via the environment variable XPDTEST_SBOXDIR (default is '/tmp/proofbox').

-s <span>

define the time interval, in minutes, to define 'recent' users when test is 2: only users who connected within this interval are checked; use -1 for infinite; it can be also passed via the environment variable XPDTEST_TIMESPAN (default is -1).

-T <timeout>

define the time, in seconds, waited for the session to start successfully; it can be also passed via the environment variable XPDTEST_TIMESOUT (default is 10 seconds).

-l <logfile>

log file if not screen; deleted if the required test fails unless '-k' is specified (see below);it can be also passed via the environment variable XPDTEST_LOGFILE.

-p <pidfile>

file with the process ID as a integer number in the first line; if this file is given a quick test on the process existence is done using kill(pid,0); it can be also passed via the environment variable XPDTEST_PIDFILE.

-k

keep log file at path given via '-l' in all cases; it can be also passed via the environment variable XPDTEST_KEEP (default is 'no keep').

-v

set gDebug=1 for the underline ROOT calls; it can be also passed via the environment variable XPDTEST_VERBOSE (default is 'no verbose').

Return

xpdtest returns 0 on success and 1 in case of test failure. Errors are printed on the screen or saved into the specified log file.

Files

The file xpdtest_popen_file in the temporary directory (typically /tmp) is used to parse the output of TProof::Open(). The file is overwritten by each new attempt; after a run of xpdtest it contains the result of the last session open attempt.

Notes

The connection attempt is done in 'masteronly' mode. For daemons running in 'worker' mode the attempt will fail with a well defined error message ('Server not allowed to be top master'); since this indicates that the daemon is anyhow responsive, a positive detection of such a pattern in the error message is interpreted as the attempt having being successful.

Original Authors

The ROOT team:

Rene Brun and Fons Rademakers

More information can be found at the ROOT website: http://root.cern

Author

This manual page was written by Gerardo Ganis <gerardo.ganis@cern.ch>, for the GNU/Linux system (but may be used by others).

Info

Version 5 ROOT