free-sa - statistic analyzer
free-sa [-s|-r|-F|-h|-v|-V] [-d
STARTDATE-ENDDATE | PERIODWORD] [-e
ADDRESS] [-f FILE] [-l FILE] [-o
DIRECTORY] [-n NAME]
Free-SA is tool that is used for statistic analysis of daemons log files.
- Control of users traffic usage;
- Help for security engineers to control internet access security policies
and investigate security incidents;
- Evaluate server efficiency to detect troubles with configuration;
- Be crossplatform and generate W3C compliant reports.
- Squid 2.x native log format;
- CERN/NCSA Common Log Format (CLF);
- CERN/NCSA Combined Log Format (in similar to CLF way);
- Postfix 2.x over syslog log format (EXPERIMENTAL);
- Qmail over syslog log format (EXPERIMENTAL);
- NetCache via Squid 2.x native log format (EXPERIMENTAL);
- Blue Coat via Squid 2.x native log format (EXPERIMENTAL);
- Communigate pro 5.x native log format (VERY EXPERIMENTAL).
free-sa accepts the following options (you should not use more than one
action option at the same time, silent default action is to generate reports):
- -d STARTDATE-ENDDATE | PERIODWORD
- Set period by dates range in free-sa runtime locale for reports generation
or remove records from log file (check '-r' option). You may omit
STARTDATE or ENDDATE, but not both of them. Sign '-' is always required.
You may also use next words as PERIODWORD: hour, day, week, month,
quarter, year, today, yesterday, thisweek, lastweek, thismonth, lastmonth,
thisyear, lastyear.
- -e ADDRESS
- Send top users report in text format to e-mail ADDRESS, if ADDRESS is '-'
then report is writed to stdout.
- -f FILE
- Set file to read configuration from.
- -F
- Fix root index.html file according to reports directories presense. This
option also implies rotate action. Useful after removing reports
directories with 3rd party tools like rm(1) (this changes
action).
- -h
- Show help message.
- -l FILE
- Overwrite 'log' option from free-sa configuration file, check
free-sa.conf(5).
- -n NAME
- Overwrite 'name' option from free-sa configuration file, check
free-sa.conf(5).
- -o DIRECTORY
- Overwrite 'targetdir' option from free-sa configuration file, check
free-sa.conf(5).
- -s
- Show log file information: name, size, start and end dates (this changes
action).
- -r
- Remove records from log file. You must also set period to remove with '-d'
option (this changes action).
- -v
- Show version.
- -V
- Show advanced information about current free-sa build.
1. Generate report for full log file period using non-default configuration file
/usr/local/etc/free-sa/free-sa2.conf:
$ free-sa -f /usr/local/etc/free-sa/free-sa2.conf
2. Generate report for full log file period of 30 days (month)
ending at current date:
$ free-sa -d month
3. Generate report for full log file period ending at 12/21/06 (C
or POSIX runtime locale):
$ free-sa -d -12/21/06
4. Generate report for full log file period starting at 21.12.2006
(ru_RU or de_DE runtime locale):
$ free-sa -d 21.12.2006-
5. Show useful log file information (ru_RU runtime locale):
$ free-sa -s
Log file information:
File name: /var/log/squid/access.log
File size: 55.053.777
Start date and time: 20.02.2007 22:00:09
End date and time: 21.02.2007 02:32:01
- /usr/local/etc/free-sa/free-sa.conf
- Default free-sa configuration file.
I hope that everything conform to popular standards, so you not need special
browser to see reports or specific non-standard system calls (like GNU or BSD)
to compile free-sa on your platform.
ISO 9899 (C99), ANSI C, POSIX*, SVID*, SVr*, SUS*
W3C HTML 4.01 Transitional, CSS 2.1, SVG 1.1
free-sa.conf(5), squid(8),
Copyright (C) 1997, 2006-2013 Oleg Sapon <xsov@mail.ru>