psmon

Process Table Monitoring Script
Download

psmon Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Nicola Worthington
  • Publisher web site:
  • http://search.cpan.org/~nicolaw/

psmon Tags


psmon Description

Process Table Monitoring Script psmon is a Perl script that monitors the process table using Proc::ProcessTable, and will respawn or kill processes based on a set of rules defined in an Apache style configuration file.Processes will be respawned if a spawn command is defined for a process, and no occurrences of that process are running. If the --user command line option is specified, then the process will only be spawned if no instances are running as the specified userid.Processes can be killed off if they have been running for too long, use too much CPU or memory resources, or have too many concurrent versions running. Exceptions can be made to kill rulesets using the PIDFile and LastSafePID directives.If a PID file is declared for a process, psmon will never kill the process ID that is contained within the pid file. This is useful if for example, you have a script which spawns hundreds of child processes which you may need to automatically kill, but you do not want to kill the parent process.Any actions performed will be logged to the DAEMON syslog facility by default. There is support to optionally also send notifications emails to an administrator on a global or pre-rule basis.SYNOPSIS Syntax: psmon --help Display this help --version Display full version information --dryrun Dry run (do not actually kill or spawn any processes) --daemon Spawn in to background daemon --cron Disables 'already running' errors with the --daemon option --conf=str Specify alternative config filename --user=str Only scan the process table for processes running as str --nouser Force scanning for all users when not run as superuser --adminemail=str Force all notification emails to be sent to str --verbose Output more verbose informationcrontabSingle user account crontab operation: MAILTO="nicolaw@cpan.org" HOME=/home/nicolaw USER=nicolaw */5 * * * * psmon --daemon --cron --conf=$HOME/etc/psmon.conf --user=$USER --adminemail=$MAILTORegular system-wide call from cron every 10 minutes to ensure that psmon is still running as a daemon: 0,10,20,30,40,50 * * * * psmon --daemon --cronOnly check processes during working office hours: * 9-17 * * * psmon Requirements: · Perl


psmon Related Software