WEB开发网
开发学院服务器FTP服务器 ProFTPD和WU-FTP的BANDWIDTH控制 阅读

ProFTPD和WU-FTP的BANDWIDTH控制

 2007-06-12 00:00:00 来源:WEB开发网   
核心提示: 详细的说明请看 patch 过的 mod_xfer.c --- start proftpd-1.2.0pre2-bandwidth.patch --- --- proftpd-1.2.0pre2.orig/modules/mod_xfer.c Fri Feb 19 15:11:11 19 99

详细的说明请看 patch 过的 mod_xfer.c

--- start proftpd-1.2.0pre2-bandwidth.patch ---

--- proftpd-1.2.0pre2.orig/modules/mod_xfer.c Fri Feb 19 15:11:11 19 99 +++ proftpd-1.2.0pre2/modules/mod_xfer.c Mon Feb 22 14:38:19 19 99 @@ -31,10 +31,140 @@ * */

+/******************************************************************** ******** + * Title : Bandwidth management + * File : mod_xfer.c (need orig source from proftpd-1.2.0pre2. tar.gz) + * Author : Albert Chiu (albert@swallow.twbbs.org.tw) + * Date : 22 Feb 1999 + * Version : 0.9p2 + * + * Description : + * Provide bandwidth usage limitation on per connection. + * + * Revision : + * Ver 0.9p2 + * - Add Bandwidth and MinBandWidth. + * Ver 0.9p1 + * - Fix unpredictable disconnect bugs. + * - Port patch to proftpd-1.2.0pre2 + * Ver 0.9 + * - First patch version base on proftpd-1.2.0pre1. + * - Only include MaxBandWidth. + * + ******************************************************************** ******* + * Copyright (c)1999 Albert Chiu ( Chiu Yang-Li ). All rights reserve d. + * Modify for the ProFTPD Group by : + * + * Albert Chiu + * albert@swallow.twbbs.org.tw + * http://swallow.twbbs.org.tw/~albert + * + * I get some idea and good function from Apache Module Collection. I 'd looked + * at mod_bandwidth, this one is almost what i want, so i use the ide a and + * rewrite it for ProFTPD 1.2.0pre1. + * But i find the select() function which mod_bandwidth use is usuall y bad + * performance, so i use setitimer() to replace it. + * + * you can get the collection from Apache Homepage (http://www.apache .org/). + * mod_bandwidth 1.0 is written by Yann Stettler (stettler@cohprog.co m). + * + ******************************************************************** *******/ + +/* + * Instruction : + * ------------- + * + * Note : this modify was writen for ProFTPD 1.2.0pre2 and tested on it + * + * Installation : + * + * Just make all source again is enough. :> + * + * + * Server configuration directive : + * ----------------------------------- + * - BandWidth + * Syntax : BandWidth + * Default : none + * Context : server config,, + * + * Limit the total bandwidth for file-transfer (retr only) + * Final each rate is depend of the number of connections. + * + * The is in Bytes/second. + * A of "0" means no bandwidth limit. + * + * Example : + * BandWidth 4096 + * + * If there are 4 users online , this will limit the bandwith + * for file-transfer to 4096/4 □24Bytes/sec. + * + * Note : If transfer file size is lower than the "BandWidth"/"Users" rate, + * it will ignore the limit. + * + * - MaxBandWidth + * Syntax : MaxBandWidth + * Default : none + * Context : server config,, + * + * Limit the bandwidth for file-transfer (retr only) + * This over-ride BandWidth rules as well as the calculated rate + * based on the number of connections. + * + * The is in Bytes/second. + * A of "0" means no bandwidth limit. + * + * Example : + * If BandWidth is set to "4096" (4KBytes/sec) and MaxBandWidth + * is set to "3072" (2KBytes/sec) that means : + * - if there is one connection, the file will be transfered + * at 3072 Bytes/sec. (Maximal of 3072 Bytes/sec). + * - if there is two connections, each files will be transfered

上一页  1 2 3 4 5 6  下一页

Tags:ProFTPD WU FTP

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接