[comp.protocols.tcp-ip] Source for ftp for Ultrix

messingr@KODAK.COM (Rich Messinger x24361 B83, Rm 528, RL, 02221) (10/11/89)

I am thinking of doing some tracking of ftp usage on our system and I
figure that the best way to get the information is to make a local
modification to the ftp/ftpd source.  We are running on a uVAX with
Ultrix.  Does anyone out there know where I can get my hands on the code?
Or has someone done this already so I do not reinvent the wheel?

Thanks in advance.

Richard Messinger
Eastman Kodak

chris@wugate.wustl.edu (Chris Myers) (10/11/89)

In article <8910110254.AA01526@Kodak.COM> messingr@KODAK.COM (Rich Messinger x24361 B83, Rm 528, RL, 02221) writes:
>I am thinking of doing some tracking of ftp usage on our system and I
>figure that the best way to get the information is to make a local
>modification to the ftp/ftpd source.  We are running on a uVAX with
>Ultrix.  Does anyone out there know where I can get my hands on the code?
>Or has someone done this already so I do not reinvent the wheel?

I have already done this using the 4.3BSD Tahoe ftp source (available at
many archives).  The ftpd program logs, to /usr/adm/xferlog, all successful
transfers and some information about each one: date, time, remote host,
seconds to transfer, file size, file path.

Here is an example from the log for wuarchive.wustl.edu (Washington University's
public archive system, a DECstation 3100 running Ultrix 3.1):

Sun Oct  1 00:44:25 7 en.ecn.purdue.edu 31841 /mirrors/msdos/mswindows/xword.arc.1
Sun Oct  1 00:44:42 8 en.ecn.purdue.edu 34688 /mirrors/msdos/mswindows/spy104.arc.1
Sun Oct  1 00:45:11 9 en.ecn.purdue.edu 50736 /mirrors/msdos/mswindows/gcp42s.arc.1
Sun Oct  1 00:45:42 17 en.ecn.purdue.edu 103802 /mirrors/msdos/mswindows/xvtdraw1.arc.1
Sun Oct  1 00:58:30 1 nsco.network.com 1776 /README

I have also written a perl script that will analyze the log file and give you
a report on archive usage (usage by day, by domain, by archive section and
by host; also transfer rates and percent-of-total usage figures):

   TOTALS FOR SUMMARY PERIOD Sun Oct  1 TO Wed Oct 11
   
   Files Transmitted To Date         4520
   Bytes Transmitted To Date    251802377
   Systems Using Archives             254
   
   
   Daily Transmission Rates
   
               Number Of   Number of   Average    Percent Of  Percent Of
      Date     Files Sent  Bytes Sent  Xmit Rate  Files Sent  Bytes Sent
   ----------  ----------  ----------  ---------  ----------  ----------
   Sun Oct  1         358    23781997   2450 cps      7.92        9.44
   Mon Oct  2         623    19882380   1202 cps     13.78        7.90
   Tue Oct  3         319    17160460   3004 cps      7.06        6.82
   Wed Oct  4         221    13721780   4507 cps      4.89        5.45
   Thu Oct  5         503    36682417   2878 cps     11.13       14.57
   [ several more days trimmed out ]
   
   Total Transfers from each Archive Section
   
          Archive Section          Files Sent  Bytes Sent
   ------------------------------  ----------  ----------
   Index and Informational Files          179    30498244
   fixes/bsd-vax                            1        4292
   fixes/sunos-sun3                         4       48189
   fixes/ultrix-vax                         1         376
   gnu                                     15    14047859
   graphics/gif                           721    41148099
   graphics/lpr_art                       813     3994099
   info                                    13      355107
   info/linkletter                          1        3685
   info/rfc                                 2       65062
   mirrors/info-mac                       303    15690822
   mirrors/msdos                         1540    97314333
   network_info                            11     2144738
   packages/X.V11R3                        26     6233589
   packages/tex                            26    12857821
   packages/uupc                           11      694655
   pub                                      3      656326
   pub/gnu                                  1       70209
   pub/ingres                               5     5533558
   pub/ntp                                  1          20
   pub/private                              1        9323
   pub/rfc                                  3      101696
   pub/sr                                   1        1931
   pub/tex                                  5       16143
   systems/ibmpc                            1      226401
   systems/sun                             21      262073
   unix/4.3BSD-tahoe                        9       28393
   usenet/comp.binaries.amiga              73     2593054
   usenet/comp.binaries.apple2            195     3494910
   usenet/comp.binaries.atari.st          182     5181405
   usenet/comp.binaries.ibm.pc             91     2705673
   usenet/comp.sources.atari.st            12       92666
   usenet/comp.sources.games               68     2304398
   usenet/comp.sources.misc                 9       80133
   usenet/comp.sources.sun                 12      201785
   usenet/comp.sources.unix               153     2959627
   usenet/comp.sources.x                    5       58111
   usenet/comp.virus                        2      123572
   
   
   Total Transfer Amount By Domain
   
                Number Of   Number of   Average    Percent Of  Percent Of
   Domain Name  Files Sent  Bytes Sent  Xmit Rate  Files Sent  Bytes Sent
   -----------  ----------  ----------  ---------  ----------  ----------
   ca                   80     5028804   1760 cps      1.77        2.00
   dk                   58     2791217   1579 cps      1.28        1.11
   ed                    1      103348   2198 cps      0.02        0.04
   fi                    1        1776   1776 cps      0.02        0.00
   fr                   17     5986162   2431 cps      0.38        2.38
   no                    4       48189    803 cps      0.09        0.02
   se                   12      699905   1846 cps      0.27        0.28
   uk                   10      812722    456 cps      0.22        0.32
   us                   28     1639883   2538 cps      0.62        0.65
   com                 307    22213496   1401 cps      6.79        8.82
   edu                3002   142759922   2936 cps     66.42       56.70
   gov                  18     1016118   1745 cps      0.40        0.40
   mil                  10     1868862   3009 cps      0.22        0.74
   org                  60     7271711   4191 cps      1.33        2.89
   scp                  91     2080077     54 cps      2.01        0.83
   arpa                 20     1435159    195 cps      0.44        0.57
   wustl.edu           176    32048501  54227 cps      3.89       12.73
   unresolved          625    23996525   2878 cps     13.83        9.53
   
   Total Transfer Amount By System
   
                                     Number Of   Number of   Average
        System Name or Address       Files Sent  Bytes Sent  Xmit Rate
   --------------------------------  ----------  ----------  ---------
   [some address or hostname]                 4       17601   2514 cps
   [some address or hostname]                 1       11695   2923 cps
   [some address or hostname]                54     1351255   4222 cps
   [some address or hostname]                 1      239819   5102 cps
   [some address or hostname]                 1        5230    747 cps
   [some address or hostname]                 3       78640   4915 cps
   [some address or hostname]                67     4131605    395 cps
   [some address or hostname]                 1      287125   4950 cps
   [some address or hostname]                 3       29243   2249 cps
   [some address or hostname]                 4      141036   2136 cps
   [some address or hostname]                 1        1776    888 cps

   [more stuff cut out]

Anyway, since you [the reader] are interested in this enough to read the
entire article, I'll mail you a copy of both the modified ftp and the
reporting script on request.

Chris Myers                                   Internet: chris@wugate.wustl.edu
Software Engineer                               BITNET: chris@wunet.bitnet
Office of the Network Coordinator                 UUCP: uunet!wugate!chris
Washington University in Saint Louis             Phone: +1 314 362 6186

bin@primate.wisc.edu (Brain in Neutral) (10/12/89)

If you're running pre-3.0 Ultrix, you'll have to play some netdb.h
and arpa/inet.h tricks to get the sources to even compile, much less
run...but it's certainly doable.

Paul DuBois
dubois@primate.wisc.edu

rogers@OSI540SN.GSFC.NASA.GOV (Scott W. Rogers) (10/12/89)

FTP source code is available from berkeley and on-line on
uunet.uu.net.  This includes both ftpd and ftp.  This code
will compile as is under Ultrix 3.0 and with some tinkering on Ultrix
2.3.
				Rogers@osi540sn.gsfc.nasa.gov
				Scott W. Rogers
				Computer Scieces Corp/NASA Code 540

dcrocker@DECWRL.DEC.COM (Dave Crocker) (10/25/89)

I am new to Digital and to Ultrix.  Why do the include files that you
mentioned need to be modified?

Thanks.

Dave