Subject: old-re: wu.ftpd falling down

From: [email-masked] (Chris Brown)
Date: Tue, 20 May 1997 18:12:48 -0700 (PDT)

Some of you may remember what this was about, but to recap:

wu.ftpd has a tendancy to lock up badly when setting up when it attempts to
access it's pid files.  It results in a syslog message to the effect of
fcntl failed, delaying.  I was half working on something else which I worked
a fix into this for.

Basically, what I've done is written a separate server which wu.ftpd talks
to to request entry into a given class.  This daemon keeps track of the
number of users and the amount of bandwidth they've used (it's a less hacked
extension to my original toying with cistron's throttle hacks for wu.ftpd).

I've found that it uses up an innordinant amount of cpu, however (roughly
.03 percent per ftpd on an SGI Indy (150Mhz R4400)).  I'm thinking about
some fixes for this but it'll have to wait until next week.  It's also not
100% clean on the ftpd side either (some residual file locking stills needs
to be removed.) If there's still interest in this server, I'll try to do a
release later this week.

Given all this, the server is at least stable, and requires no disk access
(except after a startup or a restart, of course).

Chris...

P.S.  For those interested in an external view of how it works, here is a
log entry (generated by a SIGUSR1):

May 20 17:32:26 7D:siggy bwsd: Bandwidth usage: 13516800 bytes in 520
seconds for 25993 bytes per second.
May 20 17:32:26 7D:siggy bwsd: Class info: 0 out of 0 users logged in.  0
available bandwidth, 0 maxchunk.
May 20 17:32:26 7D:siggy bwsd: Class info: 15 out of 20 users logged in. 
40960 available bandwidth, 8192 maxchunk.
May 20 17:32:26 7D:siggy bwsd: Class info: 0 out of -1 users logged in. 
500000 available bandwidth, 100000 maxchunk.
May 20 17:32:26 7D:siggy bwsd: Class info: 0 out of -1 users logged in. 
500000 available bandwidth, 100000 maxchunk.

and the associated bwsd.conf file:

#
#	BandWidth Service Daemon Configuration
#

#
#	Userid for server to run as (optional)
#
#userid <#>

#
#	Port for server to run on (wuftpd assumes 9003 currently) (required)
#
#port <#>

port 9003

#
#	Class, Path and File Restrictions
#
#class <name> <timestring> <maxusers> <bandwidth> <maxchunk> [<failfile>]
#path <name> <timestring> <bandwidth> <maxchunk>
#file <name> <timestring> <bandwidth> <maxchunk>

class real	Any	-1	500000	100000
class local	Any	-1	500000	100000
class remote	Any	20	40960	8192
class noacc	Any	0	0	0

---

From: iqbal gandham <[email-masked]>
Date: Wed, 21 May 1997 09:38:36 +0100

Chris

The bandwidth thingy sounds quite cool. I have a number of clients on
our wu-ftpd, it will hit well over 1000 soon.

I need to restirct there downloads, or at least to have some sort of
accounting info, so that we know how much each user is using. Does the
accounting etc slow things down, and secondly have you gott a binary for
IRIX 6.x for it.

Iqbal