File: calamaris.1

package info (click to toggle)
calamaris 2.8-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 152 kB
  • ctags: 16
  • sloc: perl: 1,555; sh: 47; makefile: 39
file content (190 lines) | stat: -rw-r--r-- 4,469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
.TH CALAMARIS 1 "14 November 1998"
..
.de Sp
.if t .sp .5v
.if n .sp
..
.de Vb
.ft CW
.nf
.ne \\$1
..
.de Ve
.ft R
..
.SH NAME
calamaris \- produce statistics from squid log files
.SH SYNOPSIS
cat log | 
.B calarmaris 
[ calamaris_options ]
.SH DESCRIPTION
.B Calamaris
is used to produce nice statistical output from
.B Squid's
log files. The resulting output can be in in
.I ascii
or
.IR html .
It is possible to cache calculated numbers in a file in order to use
them in later statistics.

This manual page essentialy describes the options of
.B Calamaris
and gives a few examples.
.SH OPTIONS
.SS Reports
.TP
.I "-a"
all: extracts all reports available, 
.I "-a" 
equals 
.IR "-d 20 -p -P 60 -r -1 -s -t 20" .
.TP
.I "-d" n
domain report: switches the top level and the second level report
on. The data is derived from the URL. The output is limited by n. (-1
is unlimited).
.TP
.I "-p"
peak report: Measures the peaks of the Squid usage in requests per
second, per minute and per hour. It reports peaks for TCP, UDP and ALL
requests.
.TP
.I "-P" n
performance report: Shows the throughput of TCP requests for every n
minutes.
.TP
.I "-r" n
requester report: Switches the UDP and TCP requester reports on. The
output is limited by n. (-1 is unlimited)
.TP
.I "-s"
status report: alters the default behaviour of 
.B Calamaris 
and makes the status reports more verbose.
.TP
.I "-t" n
type report: switches the content type and the file extension report
on. the output is limited by n. (-1 is unlimited)
.SS Output Format
Standard output format is plain
.I ascii
with
.I 80 chars
width.
.TP
.I "-m"
mail: adds a subject header to the beginning of the report.
.TP
.I "-w"
web: all output is given in
.I html
with tables and such. Can be combined with 
.I "-m"
in order to send html mails.
.SS Caching
.TP
.I "-i" file
input file: You can reuse a cache file generated with
.I "-o"
to add old data to a new report. Several files can be seperated with a
\`:\'.
.B Note: 
if you use more than one cache file, make sure they are chronologicaly
ordered (oldest first).
.TP
.I "-o" file
output file: 
.B Calamaris 
stores a summary of the computed information in
.I file
and you can reuse it at a later time with
.IR "-i" .
.PP
The output file can be the same as the input file: it is simply
overwritten after reading the data. It is not recommended to change
the options between different runs if you include older data as this
can result in strange measurements.
.SS Misc
.TP
.I "-b n"
benchmark: A switch for the impatient as it prints a \`#\' for every n
parsed lines.
.TP
.I "-H name"
host name: The name for the title or subject of the output. If set to
.I lookup
.B Calamaris 
looks up the host name of the system its being run on.
.TP
.I "-n"
no lookup: Switches the IP lookup for the requesters off.
.TP
.I "-u"
user: Switches the usage of eventually available ident information for
requester reports on.
.B Warning:
This breaks the privacy of your users!
.TP
.I "-z"
zero: Switches reading from standard input off. You can use this to
merge many cache files to one (see
.I "-i"
and
.IR "-o" )
or to generate a report out of cache files.
.TP
.I "-c"
copyright: Prints the copyright information of 
.BR Calamaris .
.TP
.I "-h"
help: Prints a brief description of the command line options.
.SH EXAMPLES
.TP
This example mails the daily statistics to root:
.Sp
.Vb 2
cat /var/log/squid/access.log | \\
nice -39 calamaris -amH 'daily worf' | mail root
.Ve
.TP
This one only caches a summary for later use:
.Sp
.Vb 3
DAYOFWEEK=`date +"%w"` 
cat /var/log/squid/access.log | \\
calamaris -a -o daily.$DAYOFWEEK > /dev/null
.Ve
.TP
You can then use the caches to have weekly statistics:
.Sp
.Vb 5
if [ $DAYOFWEEK = "0" ]; then
    calamaris -a -i \\
        daily.1:daily.2:daily.3:daily.4:daily.5:daily.6:daily.0 \\
    -zmH "weekly worf" | mail root
fi
.Ve
.SH FILES
.TP
.I /etc/cron.daily/calamaris
daily cron script for the daily and weekly statistics.
.TP
.I /etc/calamaris.conf
configuration file for the above cron script.
.TP
.I /var/log/calamaris/
storage area for the cached statistics. Does not need any rotating.
.SH WARRANTY
.B Calamaris 
comes with 
.IR "absolutely no warranty". 
It is free software, and you are welcome to redistribute it under
certain conditions.  See source for details.
.SH AUTHOR
Cord Beermann <Cord@Wunder-Nett.org>, man page from Philipp
Frauenfelder <pfrauenf@debian.org>, maintainer of the Debian package.
.SH "SEE ALSO"
.B squid(8)