xpdtest man page
xpdtest — xproofd test utility
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.
- --help, -h
Gives a short list of options avaliable, 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.
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').
set gDebug=1 for the underline ROOT calls; it can be also passed via the environment variable XPDTEST_VERBOSE (default is 'no verbose').
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.
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.
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.
The ROOT team:
Rene Brun and Fons Rademakers
More information can be found at the ROOT website: http://root.cern.ch
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
This manual page was written by Gerardo Ganis <email@example.com>, for the GNU/Linux system (but may be used by others).