FTPREPORT(1) USER COMMANDS FTPREPORT(1) NAME ftpreport - convert FTP reports to CSV database or WWW access log SYNOPSIS ftpreport [ -f|-m ] [ -c|-w ] [ infile [ outfile ] ] DESCRIPTION It's often nice to set up a public FTP area so it serves as both an an anonymous FTP archive and a World-Wide Web server area, accessible via HTTP. To monitor accesses to the archive, one can turn on access logging in the HTTP daemon, and install an FTP daemon such as the Washington University wu-ftpd which provides an access log capability. Unfortunately, the two daemons currently write their access logs in incompatible formats, so it's not possible to use a single analysis program such as Kevin Hughes' very nice getstats to produce a unified access report. ftpreport reads FTP access logs in two formats: that written by wu-ftpd to /var/adm/xferlog, and for users who publish files on Netcom (ftp.netcom.com), the access reports delivered by electronic mail to customers of that system. These reports are generated by a service provided by Web Communications. For information about these reports send mail with a Subject: of FTP MENU to report@webcom.com. Output can be written either in the common log file format used by the current CERN and NCSA HTTP daemons, or as a Comma Separated Value database file which can be loaded into Microsoft Excel or other database and spreadsheet programs which support this format, allowing custom analysis of access data. If called with the -m option ftpreport reads a Unix mail folder file infile (or standard input if infile is not specified) and writes an output file outfile (or standard output is no outfile is specified) which contains each FTP transaction, in Comma Separated Value (CSV) format if the -c option is supplied, or HTTP log format if the -w option is given. Note that the mail folder input to ftpreport may contain arbitrary messages in addition to the FTP activity reports; the activity reports are identified by their format and other material is disregarded. This eliminates the need to archive the FTP reports separately; ftpreport will happily extract the FTP transactions from an mbox file containing all your archived mail. If the -f option is specified, input is expected to be in wu-ftpd 2.0 transfer log format. Again, output is written in CSV format if the -c option is supplied, or HTTP log format if the -w option is given. OPTIONS -c Output is a CSV (comma separated value) format file suitable for import to Microsoft Excel or other packages which accept this format. Each record contains three fields: the date and time of the transfer, the identification supplied by the user (password entered for anonymous transfers), and the name of the file transferred. This is the default output format. -f Input is an FTP transfer log in the form written by the Washington University modified FTP daemon, version 2.0 (wu-ftpd-2.0). -m Input is a mail folder containing FTP access reports from Netcom. The mail folder may contain other unrelated mail; the FTP access reports are identified by their format. This is the default input format. -w Output is a World-Wide Web HTTP daemon access log in the "Common" format support by the current CERN and NCSA implementations. BUGS ftpreport makes certain assumptions about the format of the FTP activity report E-mail messages, both to distinguish them from other mail and to parse the contents of the reports. The code attempts to compensate for changes in the report format and works for all reports from inception through the date of this document. Future format changes may require modification of the program. The next release of wu-ftpd is supposed to contain a totally new and incompatible transfer log format. ftpreport will have to be modified to support that format when it appears. The date and time in CSV format output records in a format acceptable to Microsoft Excel. It may have to be modified for use with other databases and spreadsheets. The program is poorly structured, with no commonality in handling the various input and output formats. It should use a universal internal representation, with plug-in drivers for the various input and output formats. I'll try to get around to this the next time I add a new format. SEE ALSO ftp(1C), ftpd(8), mail(1), xferlog(5), http://www.eit.com/software/getstats/getstats.html AUTHOR John Walker WWW home page: http://www.fourmilab.ch/ Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restric- tions. This software is provided ``as is'' without express or implied warranty.