Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!inquo!bofh.dot!nntp.uio.no!nntp-oslo.UNINETT.no!nntp-trd.UNINETT.no!not-for-mail
From: sthaug@nethelp.no (Steinar Haug)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: BandWidth Limitation on Apache???
Date: 04 Jun 1996 09:31:32 GMT
Organization: Nethelp Consulting, Trondheim, Norway
Lines: 61
Message-ID: <4p0vpk$7c@verdi.nethelp.no>
References: <4otkm1$i2u@mirage.nlink.com.br> <4ov5i9$30d@verdi.nethelp.no>
<4ovv0u$jk1@voyager.iii.org.tw>
NNTP-Posting-Host: trane.uninett.no
In-reply-to: elmo@iiidns.iii.org.tw's message of 4 Jun 1996 00:12:14 GMT
[811052)]
| : Check out thttpd. Available from
| : http://www.acme.com/software/thttpd/
| Did any one successfully run thttpd under FreeBSD? I've tried it under
| FreeBSD 2.1R and 2.2 SNAP 960501, with no success. Under 2.1R it
| complained about not enough memory, and under 2.2 SNAP the select system
| call failed with return value EINVAL. The hardware is a 386DX-40 with
| 8 MB RAM.
Yes, I've run it on 2.1R, and I'm currently running it on the 960501 SNAP:
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
120 157 1 0 2 0 564 320 select I ??- 0:00.01 /local/etc/thttpd -d /local/www -r -u www
I had to make a couple of small patches:
*** libhttpd.c.orig Fri Nov 3 20:08:46 1995
--- libhttpd.c Thu Feb 29 23:23:11 1996
***************
*** 499,505 ****
syslog( LOG_ERR, "getrlimit - %m" );
exit( 1 );
}
! rl.rlim_cur = rl.rlim_max;
if ( setrlimit( RLIMIT_NOFILE, &rl ) < 0 )
{
syslog( LOG_ERR, "setrlimit - %m" );
--- 499,506 ----
syslog( LOG_ERR, "getrlimit - %m" );
exit( 1 );
}
! /* rl.rlim_cur = rl.rlim_max; */ /* FreeBSD-2.1R returns -1 for max */
! rl.rlim_cur = 256;
if ( setrlimit( RLIMIT_NOFILE, &rl ) < 0 )
{
syslog( LOG_ERR, "setrlimit - %m" );
*** syslog.c.orig Tue Sep 26 22:03:02 1995
--- syslog.c Thu Feb 29 22:10:09 1996
***************
*** 105,111 ****
#endif
extern int errno, sys_nerr;
! extern char *sys_errlist[];
void syslog(int pri, const char *fmt, ...);
void openlog(const char *ident, int logstat, int logfac);
--- 105,111 ----
#endif
extern int errno, sys_nerr;
! extern const char *const sys_errlist[];
void syslog(int pri, const char *fmt, ...);
void openlog(const char *ident, int logstat, int logfac);
I don't know whether the setrlimit patch is still necessary with the
960501 SNAP. Aside from these changes, no problems whatsoever.
Steinar Haug, Nethelp consulting, sthaug@nethelp.no