ProFTPD module mod_load



This module is contained in the mod_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/

Author

Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.

Directives


MaxLoad

Syntax: MaxLoad number|"none" [message]
Default: None
Context: server config, <VirtualHost>, <Global>
Module: mod_load
Compatibility: 1.2.2 and later

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"



Installation

To install mod_load, follow these instructions. After unpacking the tarball, run the configure script:
  cd mod_load
  ./configure
This 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 install
Solaris users will also need to use the LDFLAGS environment variable, like so:
  LDFLAGS=-lkstat ./configure --with-modules=mod_load
This is necessary for mod_load to link against libkstat on Solaris systems.



Author: $Author: tj $
Last Updated: $Date: 2002/01/11 07:11:22 $


© Copyright 2000-2002 TJ Saunders
All Rights Reserved