Watchdog::Process - Check for process in process table


Watchdog documentation  | view source Contained in the Watchdog distribution.

Index


NAME

Top

Watchdog::Process - Check for process in process table

SYNOPSIS

Top

  use Watchdog::Process;
  $s = new Watchdog::Process($name,$pstring);
  print $s->id, $s->is_alive ? ' is alive' : ' is dead', "\n";

DESCRIPTION

Top

Watchdog::Process is an extension for monitoring processes running on a Unix host. The class provides a trivial method for determining whether a service is alive. This class has only been successfully tested on Solaris 2.6.

CLASS METHODS

Top

new($name,$pstring)

Returns a new Watchdog::Process object. $name is a string which will identify the service to a human. $pstring is a string which can be used to identify a process in the process table.

is_alive()

Returns true if the service is alive, else false.

BUGS

Top

This class is unreliable on Linux as Proc::ProcessTable::Process::cmndline() sometimes returns undef.

SEE ALSO

Top

Proc::ProcessTable

AUTHOR

Top

Paul Sharpe <paul@miraclefish.com>

COPYRIGHT

Top


Watchdog documentation  | view source Contained in the Watchdog distribution.