SOCKS5-STAT(1)

NAME
socks5-stat - summarize socks5 log files

SYNOPSIS
socks5-stat [ -ffile1[,file2[,...]] ] [ -c[conffile] ] [ -msendmail_path ] [ -syymmdd ] [ -eyymmdd ] [ -dnumdays ] [ -v ]

DESCRIPTION
socks5-stat generates a summary from the log messages created by socks5 through the syslog facility. The summary will give the number of input lines processed, the number of successful connections, the number of bytes transferred, the total connection time, and the number of failed connections along with the message logged, host, and user information for each of the failed connections. Additionally, socks5-stat uses a configuration file, /etc/socks5-stat.conf, to provide additional detailed connection information summarization.

By default, socks5-stat will use the file /var/adm/messages and its predecessors ( messages.0, messages.1, ... ) as input. Alternate files can be specified by using the -f option. The entire file or set of files is summarized from beginning to end unless a specific start date is specified with the -s option or a specific end date is specified with the -e option. Alternatively, the -d option can be used to specify the number of days prior to the current date and time up to the current date and time to be summarized.

The summary is sent to standard output unless the mailout keyword is defined in the configuration file.

OPTIONS

-ffile1[,file2[,...]]
    Specifies which file(s) to generate the summary from instead of the default set of files. This is a comma separated list of files and the files will be analyzed in the order they are presented (order is important for accurate summary).

-c[conffile]
    Specifies an alternate configuration file. By default, the configuration file /etc/socks5-stat.conf is used. If a file name conffile appears after the -c option (no white space between option and file name), that file is used for the configuration file. If the -c option appears alone, no configuration file will be used and only a minimal default summary will be output.

-msendmail_path
    Specifies the full path and name of the sendmail program if different than the default. The default path is /usr/lib/sendmail.

-syymmdd
    Specifies a starting date in the form yymmdd of the log information to be included in the summary. If this option is not present, summary will begin with the earliest date encountered or within a range if the -d option is specified. The -s option will override the -d option if both are specified.

-eyymmdd
    Specifies an ending date in the form yymmdd of the log information to be included in the summary. If this option is not present, summary will end with the current date and time or within a range if the -d option is specified. The -e option will override the -d option if both are specified.

-ddays
    Specifies the number of days prior to the current date and time to start summarizing from the input files. Summary will end with the current date and time. Either the -s option or the -e option will override this option.

-v  Prints out the version number and exits.

EXAMPLES
    socks5-stat

Would create a summary for all socks5 data found in /var/adm/messages, /var/adm/messages.0, /var/adm/messages.1, ... file /etc/socks5-stat.conf would be used to determine what detailed summarization is to be done.

    socks5-stat -flog.2,log.1,log.0,log -s941101

Would input the files and log (in that exact order) and would begin summarizing information starting with November 1st, 1994.

    socks5-stat -d1 -c/tmp/newconf

Would read in data from the default log files and would begin summarizing from 1 day (24 hours) prior to the current date and time up to the current date and time. The configuration file /tmp/newconf would be consulted to determine what detailed summarization is to be done.

The following line in the crontab file:

    0 1 * * * socks5-stat -d1

would be invoked every morning at 1am and would create a summary of the previous 24 hours.

FILES

/var/adm/messages*
    Default set of input log files.

/etc/socks5-stat.conf
    Default configuration file.

SEE ALSO
socks5-stat.conf(5), socks5(8), syslog(5)

BUGS

Connections that have starting information in one log file and terminating information in another log file might not show up in the summary.

UDP summaries could be better.