mod_loadmod_load.h and
mod_load.c files for ProFTPD 1.2, found
here, and is not compiled by
default. Installation instructions are discussed
here.
The code for determining load average on a given system is hairy, to say the
least. Unfortunately, it is necessary to do it this way, as there is no
standard method for extracting such information from the kernel. This module
uses code from GNU's make application, which should function
properly. If not, please contact the author as soon as possible.
The most current version of mod_load can be found at:
http://www.castaglia.org/proftpd/
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.
<VirtualHost>, <Global>
The MaxLoad directive configures the server to refuse to accept
connections if the system load is at or above the configured number. An
optional message can be specified, which will be displayed to clients who have
been rejected. The rejection is also logged.
The number can also be "none", which is used to override any
inherited load limits, as from a <Global> context.
The system load is the average number of processes ready to run during the last minute; this number varies from system to system.
Example:
# Reject connections to our busy server MaxLoad 10.0 "Server busy, seek elsewhere"
mod_load, follow these instructions. After unpacking
the tarball, run the configure script:
cd mod_load ./configureThis checks your system for necessary information and writes a proper
mod_load.h. Now, copy the mod_load.c and
mod_load.h files into:
proftpd-dir/contrib/after unpacking the latest proftpd-1.2 source code. Follow the usual steps for using third-party modules in proftpd:
./configure --with-modules=mod_load make make installSolaris users will also need to use the
LDFLAGS environment
variable, like so:
LDFLAGS=-lkstat ./configure --with-modules=mod_loadThis is necessary for
mod_load to link against
libkstat on Solaris systems.