Subject: zero-pad the day of the month?

From: Timothy J Luoma <[email-masked]>
Date: Thu, 5 Feb 98 15:18:16 -0500

The log entries for days of the month less than 10 are blank-padded, ie "Feb  
 5" instead of "Feb 05"

As below:

Thu Feb  5 14:26:31 1998 1 luomat 12 /welcome.msg b _ o a luomat@ ftp 0 *

How hard would it be to make it zero-padded??

Thanks

TjL

---

From: "Spencer P." <[email-masked]>
Date: Thu, 5 Feb 1998 15:29:00 -0500 (EST)

I've read the faq.. and I followed it.. but then I forgot to copy the
ftpguests file across to the /etc dir.. after I did.. I viewed it and
haven't a clue what it does.  I am testing the ability to have different
root's for different users, and didnt' get it working.  I didn't hcange
the shell to ftponly but left it as /bin/sh for the time being.  I did
include the group users (what I'll eventually use) in the ftpaccess, made
sure I did all the files and their permissions in the users's dir (for
bsdi) and start the server with -a.  No clue as to why it doesn't work.

-spence

p.s.  for the pwd file.. I just coppied the one used in /etc (for the time
being until I get this working and smae for the group file)

---

From: Koos van den Hout _U nix and we all_ <[email-masked]>
Date: Thu, 5 Feb 1998 22:02:22 +0100 (MET)

> How hard would it be to make it zero-padded??

Source code snippet :

#ifdef STUPID_SPRINTF
/* Some sprintfs can't deal with a lot of arguments, so we split this */
#if (defined(BSD) && (BSD >= 199103)) && !defined(LONGOFF_T)
        sprintf(msg, "%.24s %d %s %qd ",
#else
        sprintf(msg, "%.24s %d %s %d ",
#endif
                ctime(&curtime),
                xfertime,
                remotehost,
                byte_count
            );
        msg2 = msg + strlen(msg);       /* sigh */

wu-ftpd uses the ctime libary call to convert date and time to a printable
format. To 'fix' this you would have to override the call to ctime and
provide your own ctime replacement.

                                               Koos

-- 
  Koos van den Hout,     Internetter, Unix freak, ISFJ and BBS SysOp at large
  [email-masked] (Work)                                Fax: +31-30-2586290
  [email-masked] (Home)                      Workphone: +31-30-2586287
  http://www.cetis.hvu.nl/~koos/   Looking for a license plate with "RFC 822"

---

From: Bob Luckin <[email-masked]>
Date: Thu, 5 Feb 98 15:16:39 CST

> How hard would it be to make it zero-padded??

Probably not hard, but I'm not sure I support the idea of making this a
generic modification to a future release, especially since it doesn't
make a significant improvement.

Think of all the programs written to analyse the existing log files which
might break (depending on how they were written) if you changed the log
format in a future release.

Of course, if you just want to make this modification in a private copy,
that's another matter...

Another option is to write a small program, say a perl script, to go through
the log file (or a copy of it) and make this change for you.

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "Dick's attempt FTP met task CID"
                                 [http://www.dhc.net/~luckin/palindromes.html]

---

From: Timothy J Luoma <[email-masked]>
Date: Thu, 5 Feb 98 16:29:05 -0500

Author:        Bob Luckin <[email-masked]>
	Original-Date: Thu, 5 Feb 98 15:16:39 CST
	Message-ID:    <[email-masked]>

> format in a future release.

Hrm.

let me ask a different question then... where can I find some of those  
programs to analyze the log files?

TjL

ps -- I was asking this as I went to write my own, but it would be easier to  
do with a zero-padded date

---

From: Bob Luckin <[email-masked]>
Date: Thu, 5 Feb 98 16:30:05 CST

Timothy,

> programs to analyze the log files?

First place to check is the tools area in the WU-FTPD resource center at
   http://www.landfield.com/wu-ftpd/tools.html

There are a number of tools which read the xferlog listed.
If you don't find anything of use there, here's some bumph I picked out
of my mailing list archive :-

======
From: [email-masked] (Alvin Oga)
Date: Wed, 22 Jan 1997 12:56:11 -0800 (PST)
...
here's all the ftp log analysis programs I know about...have no clue
of which works or not with wu-ftpd...

        ftp://tnt.microimages.com/tools
                dumpxfer
                processlog

        ftp://ftp.cetis.hvu.nl/pub/koos/ftplogcheck

        ftp.support.lotus.com/pub/utils/InternetServices/iisstat/iisstat.html (
strange path ?? )

        ftp.cle.ab.com/pub/ftpcheck.v2.3
======
From: Phil Schwan <[email-masked]>
Date: Mon, 8 Dec 1997 10:46:27 -0500 (EST)
...
I'm not familiar with that particular program, but I've written one of my
own based on the old xferstats script.  It keeps the name xferstats, but
has been rewritten in C and generates HTML, a few graphs, etc.  It's
currently undergoing a massive semi-rewrite to increase the speed and
functionality, and as a result 1.20 won't be available for probably a
couple weeks.  In the meantime, 1.16 is available at:
ftp://sod.off.net/pub/xferstats/xferstats-1.16.tar.gz

If xferstats doesn't do quite what you want, please drop me a note, I'm
looking for ways to increase what it does :)
======

Finally, I wrote my own perl script to search for a string (usually the name
of the specific file you are interested in the log and return data about
the matches it finds (like who pulled it, or from what node, etc), which
I could make available if anybody is interested in that sort of analysis
(not sure how much cleaning up it would need first)...  I also have a CGI
script so that it can be run from a page on our internal web server.  This
was designed to allow people who have made releases via our FTP server to
see who has obtained their programs, etc...

Cheers, Bob
-- 
Bob Luckin      [email-masked]      "I say ETA FTP ?  Me tempt fate, ya, si !"
                                 [http://www.dhc.net/~luckin/palindromes.html]