very busy ftpd
Maxim Konovalov
maxim at macomnet.ru
Wed Aug 10 08:29:31 GMT 2005
On Wed, 10 Aug 2005, 00:40-0400, Mikhail Teterin wrote:
> > > I just noticed, that uploading a file over a LANG (at around
> > > 5.7Mb/s) resulted in around 25% CPU consumption by the ftpd.
> > >
> > > I think, that's unusual for a Pentium4 -- what is the process doing?
> >
> > Check the client does not use ascii mode when uploading (getc() vs
> > read()).
>
> That's quite possible, indeed. I wouldn't put it past some users --
> some still use the ancient ftp-clients, which default to text-mode
> transfers.
>
> Is there any way to disable this mode on the server, perhaps? Even
> if it violates the protocol :-/
A dirty hack:
Index: ftpcmd.y
===================================================================
RCS file: /home/ncvs/src/libexec/ftpd/ftpcmd.y,v
retrieving revision 1.64
diff -u -r1.64 ftpcmd.y
--- ftpcmd.y 18 Nov 2004 13:46:29 -0000 1.64
+++ ftpcmd.y 10 Aug 2005 08:23:09 -0000
@@ -379,6 +379,9 @@
switch (cmd_type) {
case TYPE_A:
+ reply(504, "Type A not implemented.");
+ break;
+#if 0
if (cmd_form == FORM_N) {
reply(200, "Type set to A.");
type = cmd_type;
@@ -386,7 +389,7 @@
} else
reply(504, "Form must be N.");
break;
-
+#endif
case TYPE_E:
reply(504, "Type E not implemented.");
break;
%%%
--
Maxim Konovalov
More information about the freebsd-net
mailing list