Process Resource Monitor

Current Release:
http://www.rfxn.com/downloads/prm-current.tar.gz
http://www.rfxn.com/appdocs/README.prm
http://www.rfxn.com/appdocs/CHANGELOG.prm

Description:
Process Resource Monitor (PRM) is a CPU, Memory, Processes & Run (Elapsed) Time resource monitor for Linux & BSD. The flexibility of PRM is achieved through global scoped resource limits or rule-based per-process / per-user limits. A great deal of control of PRM is maintained through a number of ignore options, ability to configure soft/hard kill triggers, wait/recheck timings and to send kill signals to parent/children process trees. Additionally, the status output is very verbose by default with support for sending log data through syslog.

There is no shortage of usage methods for PRM, especially when leveraging the ignore and kill options with the rule based system. You can easily take control of those run-away aspell/pspell processes eating 80% of memory, errant exim processes threading off 500 processes or prevent scripts executed under apache from running for hours at a time.

Features:
– global resource limits
– per-process/per-user rule based resource limits
– rules only run mode
– alert only run mode
– ignore root processes option
– process list global ignore file
– user based global ignore file
– command based global ignore file
– regex based global and/or per-rule ignore variable
– global scoped resource limits
– per-process or per user rule based resource limits
– set custom kill signals (i.e: SIGHUP)
– parent process kill option to terminate an entire process tree
– kill trigger/wait times allow rechecking usage over a period of time
– kill restart option to execute a custom restart command
– all kill/resource/ignore options can be global or rule defined
– easy to configure percentage of total CPU & MEM limits
– total number of processes limits
– elapsed run time limits

Funding:
Funding for the continued development and research into this and other projects, is solely dependent on public contributions and donations. If this is your first time using this software we ask that you evaluate it and consider a small donation; for those who frequent and are continued users of this and other projects we also ask that you make an occasional small donation to help ensure the future of our public projects.

47 Replies to “Process Resource Monitor”

  1. Oh, sorry, one more…

    When I install in a WHM/cPanel server, do I install in the /root directory?

    If I don’t install in /root, where would I install it?

    Thanks!


  2. Peter M. Abraham:

    Ryan, given
    CMD: /usr/bin/perl mail.cgi
    What file name would I have to use for the command?
    Could mail.cgi.cmd or would I have to use perl.cmd ?
    The former (mail.cgi focus) would be better.
    Thank you.

    Great utility, really enjoying so far, but I would be curious to know about the situation above as well or what the rule file names would be for cron jobs like:

    /path/to/the/file.cgi
    or
    /usr/bin/php -q /path/to/the/file.php
    or
    /usr/nice /usr/bin/php /path/to/the/file.php

    Or is there a better way to monitor cgi and php scripts?

    Thanks!

  3. Ryan, given

    CMD: /usr/bin/perl mail.cgi

    What file name would I have to use for the command?

    Could mail.cgi.cmd or would I have to use perl.cmd ?

    The former (mail.cgi focus) would be better.

    Thank you.

  4. Hi Ryan:


    Ryan M.:

    I have made some changes to try correct this issue, if you can go ahead and run a clean install of PRM you should find the error fixed. Please let me know how it goes, thanks.


    Peter M. Abraham:

    Hi Ryan:
    To see the error, change the rules only from 1 (default) to 0 on a fresh installation.
    Thank you.

    FIXED. Thank you!!!!

  5. I have made some changes to try correct this issue, if you can go ahead and run a clean install of PRM you should find the error fixed. Please let me know how it goes, thanks.


    Peter M. Abraham:

    Hi Ryan:

    To see the error, change the rules only from 1 (default) to 0 on a fresh installation.

    Thank you.

  6. Hi Ryan:

    I removed /usr/local/prm, re-installed (now no default rules, rules directory is empty), and I still get “/usr/local/sbin/prm: line 230: [: : integer expression expected” when I run prm -s

    Thank you.

  7. Peter,
    It sounds to me like you have installed PRM over an old version and it imported the old config and rule files into the new release which are not compatible. PRM 1.x comes with NO default rules, the valid naming convention for rules are USERNAME.user (i.e: nobody.user) and COMMAND.user (i.e: exim.user). Please refer to the README file for some detailed examples of rules.

    I think the integer error you are receiving may also be due to the config and rule files imported from pre-1.x version. Go ahead and do an rm -rf /usr/local/prm* and fresh install, let me know if you continue to experience issues, thanks.


    Peter M. Abraham:

    Ryan, in the readme file, you have the naming convention of USERNAME.user and COMMAND.cmd.

    Yet, in the default rules, there is “proftpd” (without an extension), httpd (without an extension), etc.

    Is that intentional or should they be renamed httpd.cmd, proftpd.cmd and so on?

    Thank you.


    Peter M. Abraham:

    Hi Ryan:

    Also, on the latest version (1.07) on CentOS 5.5 64-bit (latest kernel), when I run prm -s I receive the following errors:

    /usr/local/sbin/prm: line 230: [: : integer expression expected

    The above goes on for some time.

    Thank you.

  8. Hi Ryan:

    Also, on the latest version (1.07) on CentOS 5.5 64-bit (latest kernel), when I run prm -s I receive the following errors:

    /usr/local/sbin/prm: line 230: [: : integer expression expected

    The above goes on for some time.

    Thank you.

  9. Ryan, in the readme file, you have the naming convention of USERNAME.user and COMMAND.cmd.

    Yet, in the default rules, there is “proftpd” (without an extension), httpd (without an extension), etc.

    Is that intentional or should they be renamed httpd.cmd, proftpd.cmd and so on?

    Thank you.

  10. I have made some changes to PRM and put up version 1.0.7, please give it a spin and see if that works for you, thanks.


    Ali:

    I have FreeBsd Ver.7 , the legacy versions of PRM was working fine.(may be 2003-2004)
    But after upgrade to latest one , the first time of
    prm -s
    Exits with error
    —could not find needed binary /usr/bin/exprt, aborting.
    what must I do?
    What is the “exprt”?

  11. I have FreeBsd Ver.7 , the legacy versions of PRM was working fine.(may be 2003-2004)
    But after upgrade to latest one , the first time of
    prm -s
    Exits with error
    —could not find needed binary /usr/bin/exprt, aborting.
    what must I do?
    What is the “exprt”?

Leave a Reply

Your email address will not be published. Required fields are marked *