ps-watcher periodically a gets a list of process names via ps. A configuration file specifies a list of Perl regular-expression patterns to match the processes against. For each match, a Perl expression specified for that pattern is evaluated. The evaluated expression can refer to variables which are set by ps and pertain to the matched process(es), including the amount memory consumed by the process, or the total elapsed time. If the Perl expression for a matched pattern evaluates true, then an action can be run such as killing the program, restarting it, or mailing an alert.