NAME
Monitoring::Sneck::Checks::pid_file - checks the process in a PID file is running
VERSION
Version 0.0.1
SYNOPSIS
nginx_pid|perl:pid_file -f /var/run/nginx.pid -n nginx
unbound_pid|perl:pid_file -f /var/run/local_unbound.pid
DESCRIPTION
Reads the PID file and checks the process is running, through kill 0, which works without being able to signal it. A PID file that is not there, or does not start with a PID, is CRITICAL, as is the process not running, or with --name, being something else, as for a PID used again after the one it was for died.
--name is checked through Proc::ProcessTable, against the process name, which Linux cuts to 15 characters.
OPTIONS
- -f, --file :: The PID file. Required.
- -n, --name :: The name the process must have.
METHODS
check
Does the check.