mod_rusage module "monitors" system resource usage by
a session process by periodically calling the
system call, and comparing the obtained values against configured thresholds.
Installation instructions are discussed here.
The most current version of
mod_rusage can be found at:
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.
RUsageEngine directive enables or disables the
RUsageInterval directives configures the interval at
mod_rusage will check the process resource usage and
handle the configured
The seconds parameter must be a positive number.
RUsageLog directive configures a file used for logging
mod_rusage. The configured file must be an absolute
RUsageThreshold directive configures the thresholds of the
different types of system resources to check, and the action to take when
those thresholds are reached. Note that at least one
RUsageThreshold needs to be configured for
to perform any resource usage checks. Multiple
directives can be configured, so that different resources have different
The action parameter specifies the type of action to take when the threshold is reached. The supported actions are:
Logs that the threshold has been reached via syslog logging. The default log level is WARN; the optional level value can be used to change this log level.
The log message will include the following information about the session process which reached the threshold:
Terminates the session process, after logging at the WARN level via syslog logging.
The currently supported threshold-types are:
Total amount of time spent in "user mode". The threshold value is the number of seconds.
Total amount of time spent in the kernel on behalf of the process. The threshold value is the number of seconds.
<IfModule mod_rusage.c> RUsageEngine on RUsageLog /path/to/rusage.log RUsageInterval 10 # If the session uses more than 15 seconds of "user time", log it # at the CRIT syslog level RUsageThreshold log:crit UserTime 15 </IfModule>
mod_rusage, go to the third-party module area in the proftpd source code and unpack the
cd proftpd-dir/contrib/ tar zxvf /path/to/mod_rusage-version.tar.gzafter unpacking the latest proftpd-1.3.x source code. For including
mod_rusageas a staticly linked module:
./configure --with-modules=mod_rusage ...Alternatively,
mod_rusagecan be built as a DSO module:
./configure --enable-dso --with-shared=mod_rusage ...Then follow the usual steps:
make make install