pidstat - Check the existence of a process on a remote machine
pidstat [ --help ] [ --host=host ] [ --port=port ] [ --silent ] [ --version ] [ --debug ] [ exists remotepids ]
Pidstat will contact the PID stat daemon (pidstatd, in the IPC::Locker distribution on CPAN) and perform the requested command(s).
- exists remotepids
Check the existence of a set of process IDs (potentially) on remote hosts.
Takes a list of remote process IDs. These process IDs are understood to be on the host specified by "--host" (default is "localhost"). Alternatively, the host may be overridden by specifying the process IDs in the form <hostname>:<pid>.
The exit value is 0 if all the requested process IDs exist. The exit value is 1 if any of the requested process IDs did not exist, or 2 if any hosts did not have a running daemon. This is roughly the same as "kill -0 <pid>".
The following works well for shell scripts.
if pidstat exists 3459 host1:4220 host2:9821 then print "All processes are up" else print "One of the processes is down" fi
Displays this message and program version and exits.
Specifies host name to check for a process.
Specifies the port number to contact the "pidstatd" on. (default 1752)
Do not print out a line per process checked.
Turns on the debug flag for diagnostic output.
Displays program version and exits.
The latest version is available from CPAN and from http://www.veripool.org/.
Copyright 2002-2013 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
Wilson Snyder <firstname.lastname@example.org>, Stephen Adkins <email@example.com>