Binary package “ps-watcher” in ubuntu bionic

monitoring a system via ps-like commands

 This program runs the ps command periodically and triggers commands on matches.
 The match patterns are Perl regular expressions which can refer to the process
 information via variables.
 .
 For example it can be used to ensure that a daemon is running, or is not
 running too many times. It can also be used to determine when a process has
 consumed too many resources, perhaps due to a memory leak.