sustat V2.00
NAME
sustat - display statistics for the Serv-U Ftp Server
DESCRIPTION
This manual page documents the sustat command which analyse the logfile
of the Serv-U Ftp Server and output an ASCII report.
Statistics can be on users,files,directories or hosts.
SYNOPSIS
sustat logfile
[-s <start> or today[+|-<n>]]
[-e <end> or today[+|-<n>]]
[-d|-D <number_of_dirs>]
[-f <nb_of_files>]
[-h|-H]
[-l <user>]
[-r <user>]
[-o <user>]
[-x <exclude file>]
[-u]
[-a]
[-t]
[-m <memory size>]
[-debug]
[-warn]
[-v]
DESCRIPTION
This manual page documents the sustat command which analyse the logfile
of the Serv-U Ftp Server and output an ASCII report.
OPTIONS
logfile: path name of the Serv-U logfile to analyse.
-s <start>: Start Date of Analyse, in format YYYYMMDD
if none is given, then Analyse starts in the 1st line
of the logfile.
You can also provide a date relative to today
for example you can provide today or today-1 (ie yesterday)
-e <end>: End Date of Analyse, in format YYYMMDD
if none is given, then analyse ends in the last line
of the logfile.
You can also provide a date relative to today
for example you can provide today or today-1 (ie yesterday)
-f <n>: if specified, the report will not be on users but on files.
This will output the list of the n most downloaded files.
if you specify 0 as n then all files will be displayed.
-d <n>: if specified, the report will not be on users but on directories.
This will output the list of the n most downloaded directories
using number of files downloaded by directory
if you specify 0 as n then all directories will be displayed.
-D <n>: if specified, the report will not be on users but on directories.
This will output the list of the n most downloaded directories
using number of bytes downloaded by directory
if you specify 0 as n then all directories will be displayed.
-h: if specified, the report will not be on users but hosts.
This will output the list of all connected hosts
sorting them using download volume.
(if you want to sort using upload volume add -u option)
-H: if specified, the report will not be on users but hosts.
This will output the list of all connected hosts
sorting them using number of logins.
-u: if specified, the sort order for statistics will be
uploaded volumes instead of downloaded volumes.
-a: By default, Sustat ignores aborted transfers (upload and downloads)
If specified, Sustat will count bytes of aborted transfers.
-t: By default, Sustat does not show connections times.
If specified, Sustat show them in format HH:MM:SS
-l <user>: if specified, the report will not be on users but on the connections
list of the specified user. If specify all as user then
the connection list of all the users will be displayed.
-r <user>: if specified, the report will not be on users but on the
rejected connexions list of the specified user. If specify all as
user then the connexion list of all the users will be displayed.
-o <user>: if specified, Sustat will output all log lines related to the specified user.
This is useful to generate a logfile for a specific user.
-x <file>: If specified, then all usernames listed in the file
<file> will be ignored for statistics.
The format of excludefile is simply one username by line.
-m <n>: By default, Sustat allocate in memory 10,000 reports entries.
Thus reports are limited to 10,000 entries.
If you process a huge logfile which generate a report larger
than 10,000 entries, specify a larger value with this option.
Keep in mind that each entry takes 680 bytes in memory.
Thus, invoking sustat with -m 20000 will allocate 13 MB in memory.
-debug: Enable debugger
-warn: Enable warnings for invalid entries in logfile
-v: Display version and copyright information and exits
-u,-f,-d,-D cannot be given together.
Nota: if you provide @ as logfile name then
"c:\Program files\Serv-U\servu.log" will be used as logfile.
Nota2: many of you asked me an option to write the output on a file
this is useless since you can redirect the output using > with DOS.
Just add: > filename on the end of the command line.
EXAMPLES:
To sort users regarding download volumes:
sustat "c:\Program files\Serv-U\servu.log"
To sort users regarding upload volumes:
sustat "c:\Program files\Serv-U\servu.log" -u
To sort users by download volumes for year 1998:
sustat "c:\Program files\Serv-U\servu.log" -s 19980101 -e 19983112
To sort users by download volumes ignoring root and anonymous:
sustat "c:\Program files\Serv-U\servu.log" -x c:\temp\exclude.lst
where file exclude.lst contains 2 lines:
root
anonymous
To sort users by upload volumes until end of year 1998:
sustat "c:\Program files\Serv-U\servu.log" -e 19983112 -u
To sort users regarding download volumes until yesterday:
sustat "c:\Program files\Serv-U\servu.log" -e today-1
To sort users by upload volume starting 30 days ago until 10 days ago:
sustat "c:\Program files\Serv-U\servu.log" -s today-30 -e today-10 -u
To sort users regarding download volumes for today only
sustat "c:\Program files\Serv-U\servu.log" -s today -e today
To output the list of the 20 most downloaded files:
sustat "c:\Program files\Serv-U\servu.log" -f 20
To output the list of the 20 most downloaded files starting at month Aug 1998:
sustat "c:\Program files\Serv-U\servu.log" -f 20 -s 19980801
To output the list of the 25 most downloaded directories (using files count)
sustat "c:\Program files\Serv-U\servu.log" -d 25
To output the list of the 15 most downloaded directories (using bytes count)
sustat "c:\Program files\Serv-U\servu.log" -D 15
To output the list of all hosts ever connected to us (using download volumes)
sustat "c:\Program files\Serv-U\servu.log" -h
To output the list of all hosts connected to us in 1999 (using upload volumes)
sustat "c:\Program files\Serv-U\servu.log" -s 19990101 -h -u
To output the list of all hosts connected to us in 1999 (using nb of logins)
sustat "c:\Program files\Serv-U\servu.log" -s 19990101 -H
To Output the list of all the connexions of the user JOHNDOE during the month of October 1999:
sustat "c:\Program files\Serv-U\servu.log" -s 19991001 -e 19991031 -l JOHNDOE
To Output the list of all the rejected the connexions since October 1st:
sustat "c:\Program files\Serv-U\servu.log" -s 19991001 -r all
To Output the log lines for user JOHN since October 1st:
sustat "c:\Program files\Serv-U\servu.log" -s 19991001 -o JOHN
To sort users by download volumes including aborted transfers:
sustat "c:\Program files\Serv-U\servu.log" -a
To sort users by download volumes including aborted transfers and showing conections times
sustat "c:\Program files\Serv-U\servu.log" -a -t
To sort users by upload volumes from Sept 1st 2000 until yesterday including
aborted transfers and showing connection times but excluding user admin
using standard Serv-U logfile:
sustat @ -s 20000901 -e today-1 -u -a -t -x file
where file is an ascii file with 1 line containing: admin
LIMITATIONS/BUGS:
With -m option, Reports size are no more limited in any way.
Memory size needed by this program is around 6,5 MB.
No bugs known.
LEGAL STUFF:
sustat is a freeware program. The package may not be altered
in any way and cannot be used for commercial purposes without the
prior written permission of the author. The copyright message should
be preserved.
No responsibility or liability will be accepted for any damage that
may appear to have resulted from use of this program. All use is at
your own risk. The software is provided "as is" without any warranty
implied or otherwise to the fitness or accuracy of the software and
documentation. The documentation is believed to be correct but the
author reserves the right to update the software and/or documentation
without notice.
AUTHOR:
Salim GASMI
Mail: salim@gasmi.net
WWW : http://www.gasmi.net
Irc : Dr_Unix