Subject: Variable user limits based on load

From: Phil Schwan <[email-masked]>
Date: Sat, 27 Sep 1997 19:55:10 -0400 (EDT)

The way it works is really simple: lines of the format "load-limit <class>
<minimum load> <limit> <message>" are inserted.  When the load reaches
that minimum, the limit for that class is set.  In the case of multiple 
limit statements, the limit is set by the highest load.  Example:

limit      remote 15     any /etc/msgs/msg.toomany
load-limit remote 5       10 /etc/msgs/msg.toomany
load-limit remote 10.4321 5  /etc/msgs/msg.toomany
load-limit remote 15      1  /etc/msgs/msg.toomany
load-limit remote 30      0  /etc/msgs/msg.toomany

If the load is below 5, the limit is 15 users.
If the load is between 5 and 10.4321, the limit is 10 users.
If the load is between 10.4321 and 15, the limit is 5 users.
If the load is between 15 and 30, the limit is 1 user.
If the load is 30 or over, the limit is 0 users.

Under any situation, the lowest limit always takes the top priority.
Example:

limit      remote 15     any /etc/msgs/msg.toomany
load-limit remote 5       20 /etc/msgs/msg.toomany

No matter what the load is, the limit will be 15 users.

Any questions?  That seems to be a pretty thorough explanation, probably
too detailed (most of you are rolling your eyes at the multiple lines of
examples :) 

I've written the patch for Linux, but I don't know how to calculate the
system load on other OSes and I lack machines to test the code on anyways. 
Anyone willing to send me some code that snags the load average on some
other wu-ftpd-supported architecture and I'll add it into my patch? 

Phil

--------------------------------------------------------------------------
'The ultimate seal on any software product is not any sort of kite mark or
standards conformance certificate, it's that label that says, "Destruction
tested by Alan Cox.... Survived."' -- Clive Dolphin (3Com PDD)