<!-- $Id: mod_load.html,v 1.3 2005/01/01 20:15:55 castaglia Exp $ --> <!-- $Source: /cvsroot/proftp/proftpd/doc/contrib/mod_load.html,v $ --> <html> <head> <title>ProFTPD module mod_load</title> </head> <body bgcolor=white> <hr> <center> <h2><b>ProFTPD module <code>mod_load</code></b></h2> </center> <hr><br> This module is contained in the <code>mod_load.h</code> and <code>mod_load.c</code> files for ProFTPD 1.2.<i>x</i>, and is not compiled by default. Installation instructions are discussed <a href="#Installation">here</a>. There are also some interesting notes on the <a href="#Usage">usage</a> of this module. <p> 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 <code>make</code> application, which should function properly. If not, please contact the author as soon as possible. <p> The most current version of <code>mod_load</code> is distributed with the ProFTPD source code. <h2>Author</h2> <p> Please contact TJ Saunders <tj <i>at</i> castaglia.org> with any questions, concerns, or suggestions regarding this module. <h2>Directives</h2> <ul> <li><a href="#MaxLoad">MaxLoad</a> </ul> <hr> <h2><a name="MaxLoad">MaxLoad</a></h2> <strong>Syntax:</strong> MaxLoad <em>number|"none" [message]</em><br> <strong>Default:</strong> None<br> <strong>Context:</strong> server config, <code><VirtualHost></code>, <code><Global></code><br> <strong>Module:</strong> mod_load<br> <strong>Compatibility:</strong> 1.2.2 and later <p> The <code>MaxLoad</code> 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. <p> The number can also be "none", which is used to override any inherited load limits, as from a <code><Global></code> context. <p> The system load is the average number of processes ready to run during the last minute; this number varies from system to system. <p> Example: <pre> # Reject connections to our busy server MaxLoad 10.0 "Server busy, seek elsewhere" </pre> <p> <hr> <h2><a name="Usage">Usage</a></h2> <p> The <code>mod_load</code> module is very straightforward, providing only the single configuration directive. <p> <b><code>Display</code> Variables</b><br> The following variables are provided by <code>mod_load</code>, and can be used in any <code>Display</code> file <i>e.g.</i> <code>DisplayConnect</code> and <code>DisplayLogin</code>. <pre> %{mod_load.curr_load} %{mod_load.max_load} </pre> <p> <hr> <h2><a name="Installation">Installation</a></h2> To install <code>mod_load</code>, follow the usual steps for using third-party modules in proftpd: <pre> ./configure --with-modules=mod_load make make install </pre> <p> <hr><br> Author: <i>$Author: castaglia $</i><br> Last Updated: <i>$Date: 2005/01/01 20:15:55 $</i><br> <br><hr> <font size=2><b><i> © Copyright 2000-2005 TJ Saunders<br> All Rights Reserved<br> </i></b></font> <hr><br> </body> </html>