]>
Commit | Line | Data |
---|---|---|
25697a35 GS |
1 | .\" Hey, EMACS: -*- nroff -*- |
2 | .\" First parameter, NAME, should be all caps | |
3 | .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection | |
4 | .\" other parameters are allowed: see man(7), man(1) | |
1f482a8d | 5 | .TH SARG 1 "May 9, 2010" |
25697a35 GS |
6 | .\" Please adjust this date whenever revising the manpage. |
7 | .\" | |
8 | .\" Some roff macros, for reference: | |
9 | .\" .nh disable hyphenation | |
10 | .\" .hy enable hyphenation | |
11 | .\" .ad l left justify | |
12 | .\" .ad b justify to both left and right margins | |
13 | .\" .nf disable filling | |
14 | .\" .fi enable filling | |
15 | .\" .br insert line break | |
16 | .\" .sp <n> insert n+1 empty lines | |
17 | .\" for manpage-specific macros, see man(7) | |
18 | .SH NAME | |
19 | sarg \- Squid Analysis Report Generator | |
20 | .SH SYNOPSIS | |
21 | .B sarg | |
22 | .RI [ options ] | |
23 | .SH DESCRIPTION | |
d183fb7f | 24 | \fBsarg\fP is a logfile parser and analyzer for the \fBSquid Web Proxy Cache\fP, |
25697a35 GS |
25 | which can be found at \fBhttp://www.squid-cache.org/\fP. |
26 | This manual page documents briefly the | |
27 | .B sarg | |
28 | command. More information is available at \fBhttp://sarg.sourceforge.net/\fP. | |
29 | This manual page was originally written for the Debian distribution | |
30 | because the author didn't include one in favor of documentation | |
31 | in the GNU Info format; see below. | |
32 | .PP | |
33 | .\" TeX users may be more comfortable with the \fB<whatever>\fP and | |
eee60323 | 34 | .\" \fI<whatever>\fP escape sequences to invode bold face and italics, |
25697a35 GS |
35 | .\" respectively. |
36 | \fBsarg\fP is a tool that allows you to view "where" your users are going to on | |
37 | the Internet. \fBsarg\fP generates reports in HTML, with fields such as: users, | |
38 | IP Addresses, bytes, sites, and times. These HTML files can appear in your | |
39 | web server's directory for browsing by users or administrators. You may also | |
40 | have \fBsarg\fP email the reports to the Squid Cache administrator. | |
41 | .PP | |
42 | \fBsarg\fP can take the \fBsquid\fP access log as its input, or optionally the | |
43 | \fBsquidGuard http://www.squidguard.org/\fP Squid filter/redirector logfile format. | |
44 | .SH OPTIONS | |
45 | A summary of options is included below. | |
46 | .TP | |
47 | .B \-h | |
48 | Show summary of options. | |
49 | .TP | |
50 | .B \-a [hostname|ip address] | |
51 | Limits report to records containing the specified hostname/ip address | |
52 | .TP | |
53 | .B \-b filename | |
54 | Enables UserAgent log and writes it to | |
55 | .IR "filename". | |
56 | .TP | |
57 | .B \-c filename | |
58 | Uses | |
59 | .IR "filename" | |
60 | as the exclude files to select records that are not counted. | |
61 | .TP | |
d183fb7f FM |
62 | .B \-\-convert |
63 | Convert a squid log file date/time field to a human-readable format. All the log files are read and output as one text on the standard output. | |
64 | .TP | |
65 | .B \-\-css | |
66 | Output, on the standard output, the internal css inlined in the reports by sarg. You can redirect the output to a file of your | |
67 | choice and edit it. Then you can override the internal css with | |
68 | .B external_css_file | |
69 | in sarg.conf. | |
70 | .TP | |
25697a35 GS |
71 | .B \-d date |
72 | Uses | |
19c5ad73 FM |
73 | .I date |
74 | as the time limit during log file processing. Format for | |
75 | .I date | |
25697a35 GS |
76 | is |
77 | .B dd/mm/yyyy-dd/mm/yyyy | |
19c5ad73 FM |
78 | or a single date |
79 | .BR "dd/mm/yyyy" ". Date ranges can also be specified as " "day-\fIn\fP" ", " "week-\fIn\fP" ", or " "month-\fIn\fP" | |
80 | where | |
81 | .I n | |
82 | is the number of days, weeks or months to jump backward. Note that there is no spaces around the hyphen. | |
25697a35 GS |
83 | .TP |
84 | .B \-e email | |
85 | Sends report to | |
86 | .IR "email" | |
87 | (stdout for console). | |
88 | .TP | |
89 | .B \-f filename | |
90 | Reads configuration from | |
91 | .IR "filename". | |
92 | .TP | |
93 | .B \-g e|u | |
94 | Sets date format in generated reports. | |
95 | .br | |
96 | \fBe\fP = Europe -> dd/mm/yy | |
97 | .br | |
98 | \fBu\fP = USA -> mm/dd/yy | |
99 | .TP | |
100 | .B \-i | |
101 | Generates reports by user and ip address. | |
102 | .br | |
103 | \fBNOTE:\fP This requires the 'report_type' | |
104 | option in config file to contain "users_sites". | |
105 | .TP | |
106 | .B \-l filename | |
107 | Uses | |
108 | .IR "filename" | |
403628c3 FM |
109 | as the input log. This option can be repeated up to 255 times to read multiple files. The files must be listed in chronological order from newest to eldest. If the files end with the extension |
110 | .IR ".gz" ", " ".bz2" " or " ".Z" | |
58d7d8fe FM |
111 | they are decompressed. |
112 | If the file name is just | |
113 | .I - | |
114 | , the log file is read from standard input. In that case, it cannot be compressed. | |
25697a35 | 115 | .TP |
1f482a8d FM |
116 | .B \-L filename |
117 | Reads a proxy redirector log file such as one created by squidGuard or Rejik. If you use this option, you may want to configure | |
118 | .B redirector_log_format | |
119 | in sarg.conf to match the output format of your web content filtering program. This option can be repeated up to 64 times to read multiple files. | |
120 | .TP | |
25697a35 GS |
121 | .B \-n |
122 | Enables ip address resolution. | |
123 | .TP | |
124 | .B \-o dir | |
125 | Writes report in | |
126 | .IR "dir". | |
127 | .TP | |
128 | .B \-p | |
129 | Generates reports using ip address instead of userid. | |
130 | .TP | |
131 | .B \-s string | |
132 | Limits report to the site specified by | |
133 | .IR "string | |
134 | [eg. www.debian.org] | |
135 | .TP | |
d183fb7f FM |
136 | .B \-\-split |
137 | Split the squid log file and output it as text on the standard output omitting the dates outside of the range specified by the \fB-d\fP parameter. | |
138 | If it is combined with | |
139 | .B \-\-convert | |
140 | the dates are also converted to a human-readable format. | |
141 | .TP | |
25697a35 GS |
142 | .B \-t string |
143 | Limits records counted in statistics based on time-of-day. Format for | |
144 | \fIstring\fP is \fBHH\fP or \fBHH:MM\fP or \fBHH:MM:SS\fP. | |
145 | .TP | |
146 | .B \-u user | |
147 | Limits reports to \fIuser\fP activities. | |
148 | .TP | |
149 | .B \-w dir | |
150 | Uses \fIdir\fP for temporary files. | |
151 | .TP | |
152 | .B \-x | |
eee60323 | 153 | Writes debug messages to \fBSTDOUT\fP |
25697a35 | 154 | .TP |
4073ad4c | 155 | .B \-z |
eee60323 | 156 | Writes messages on processes to \fBSTDOUT\fP |
25697a35 GS |
157 | .SH FILES |
158 | .BR /usr/local/sarg/sarg.conf | |
159 | .br | |
a96e796d | 160 | .B /var/log/squid/access.log |
25697a35 GS |
161 | .br |
162 | .B /usr/local/squidGuard/logs/squidGuard.log | |
163 | .SH SEE ALSO | |
164 | squid(8) | |
165 | .SH AUTHOR | |
166 | This manual page was written by Luigi Gangitano <gangitano@lugroma3.org>, | |
167 | for the Debian GNU/Linux system (but may be used by others). Revised | |
168 | by Billy Newsom. |