Removed `#if HAVE_LIBRRD' around `plugin_write': The logmode works even without librrd.
[collectd.git] / src / collectd.pod
1 =head1 NAME
2
3 collectd - System statistics collection daemon
4
5 =head1 SYNOPSIS
6
7 collectd I<[options]>
8
9 =head1 DESCRIPTION
10
11 collectd is a daemon that collects various system statistics periodically and
12 stores them into RRD-files. Which data is collected depends on compile-time
13 settings. The following features may be available:
14
15 =over 4
16
17 =item
18
19 Battery status (I<battery>)
20
21 =item
22
23 CPU utilization (I<cpu>)
24
25 =item
26
27 Mountpoint usage (I<df>)
28
29 =item
30
31 Disk and partition usage/throughput (I<disk>)
32
33 =item
34
35 Harddisk temperatures (I<hddtemp>)
36
37 =item
38
39 System load averages (I<load>)
40
41 =item
42
43 Memory usage (I<memory>)
44
45 =item
46
47 MySQL statistics (I<mysql>)
48
49 =item
50
51 NFS utilization (I<nfs>, Linux only)
52
53 =item
54
55 Network latency (I<ping>)
56
57 =item
58
59 Number of processes (I<processes>, Linux only)
60
61 =item
62
63 lm_sensors information (I<sensors>, Linux only)
64
65 =item
66
67 Serial port traffic (I<serial>, Linux only)
68
69 =item
70
71 Swap usage (I<swap>)
72
73 =item
74
75 Tape drive usage (I<tape>, Solaris only)
76
77 =item
78
79 Network traffic (I<traffic>)
80
81 =item
82
83 Number of users logged into the system (I<users>)
84
85 =back
86
87 =head1 OPTIONS
88
89 =over 4
90
91 =item B<-C> I<E<lt>config-fileE<gt>>
92
93 Specify an alternative config file. This is the place to go when you wish to
94 change B<collectd>'s behavior. The path may be relative to the current working
95 directory.
96
97 =item B<-f>
98
99 Don't fork to the background. I<collectd> will also B<not> close standard file
100 descriptors, detach from the session nor write a pid file. This is mainly
101 thought for 'supervisioning' init replacements such as I<runit>.
102
103 =item B<-h>
104
105 Output usage information and exit.
106
107 =back
108
109 =head1 MODES
110
111 collectd can operate in three different operating modes. The modes are
112 described below.
113
114 The simplest mode is the so called B<local mode>. Data is collected locally and
115 written in RRD files that reside in I<DataDir>. This is the default mode when
116 collectd is linked against C<librrd>.
117
118 The other modes, B<client mode> and B<server mode>, are used to send data over
119 a network and receive it again.
120
121 In B<client mode> the daemon collects the data locally and sends its results
122 to one or more network addresses. No RRD files are written in this case. This
123 is the only mode available if collectd is not linked against C<librrd>.
124
125 If started in B<server mode> the daemon will listen on one or more interfaces
126 and write the data it receives to RRD files. No data is collected locally.
127
128 In the last mode, B<log mode>, data is collected locally and written in
129 text files that reside in I<DataDir>.
130
131 Please refer to L<collectd.conf(5)> for the configuration options and default
132 values.
133
134 =head1 SPECIAL PLUGINS
135
136 =head2 cpufreq
137
138 This module reads F</sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq> (for
139 the first CPU installed) to get the current CPU frequency. If this file does
140 not exist make sure B<cpufreqd> (L<http://cpufreqd.sourceforge.net/>) or a
141 similar tool is installed.
142
143 =head2 mysql
144
145 Requires B<mysqlclient> to be installed. It connects to the database when
146 started and keeps the connection up as long as possible. When the connection is
147 interrupted for whatever reason it will try to re-connect. The syslog will
148 contain loud complaints in case anything goes wrong.
149
150 This plugin issues C<SHOW STATUS> and evaluates C<Bytes_{received,sent}>,
151 C<Com_*> and C<Handler_*> which correspond to F<traffic-mysql.rrd>,
152 F<mysql_commands-*.rrd> and F<mysql_handler-*.rrd>. Also, the values of
153 C<Qcache_*> are put in F<mysql_qcache.rrd> and values of C<Threads_*> are put
154 in F<mysql_threads.rrd>. Please refer to the B<MySQL reference manual>,
155 I<5.2.4. Server Status Variables> for an explanation of these values.
156
157 =head2 sensors
158
159 The B<sensors> module uses lm_sensors to retrieve sensor-values. This means
160 that all the needed modules have to be loaded and lm_sensors has to be
161 configured (most likely by editing F</etc/sensors.conf>. Read
162 L<sensors.conf(5)> for details.
163
164 The B<lm_sensors> homepage can be found at
165 L<http://secure.netroedge.com/~lm78/>.
166
167 =head2 hddtemp
168
169 To get values from B<hddtemp> collectd connects to B<localhost> (127.0.0.1),
170 port B<7634/tcp>. The B<Host> and B<Port> options can be used to change these
171 default values. See L<collectd.conf(5)> for details. C<hddtemp> has to be
172 running to work correctly. If C<hddtemp> is not running timeouts may appear
173 which may interfere with other statistics..
174
175 The B<hddtemp> homepage can be found at
176 L<http://www.guzu.net/linux/hddtemp.php>.
177
178 =head1 RRD FILES
179
180 The RRD files are created automatically with the following RRAs:
181
182   RRA:AVERAGE:0.2:6:1500
183   RRA:AVERAGE:0.1:180:1680
184   RRA:AVERAGE:0.1:2160:1520
185   RRA:MIN:0.2:6:1500
186   RRA:MIN:0.1:180:1680
187   RRA:MIN:0.1:2160:1520
188   RRA:MAX:0.2:6:1500
189   RRA:MAX:0.1:180:1680
190   RRA:MAX:0.1:2160:1520
191
192 Since collectd uses a 10 second I<step> the RRAs contain the following
193 timespans:
194
195   Resolution | Data points |  Timespan
196   -----------+-------------+----------
197   60 seconds |        1500 |  25 hours
198   30 minutes |        1680 |  35 days
199    6 hours   |        1520 | 380 days
200
201 The DS'es depend on the module creating the RRD files:
202
203 =over 4
204
205 =item Battery charge (F<battery-I<E<lt>nameE<gt>>/charge.rrd>)
206
207   DS:charge:GAUGE:25:0:U
208
209 =item Battery current (F<battery-I<E<lt>nameE<gt>>/current.rrd>)
210
211   DS:current:GAUGE:25:U:U
212
213 =item Battery voltage (F<battery-I<E<lt>nameE<gt>>/voltage.rrd>)
214
215   DS:voltage:GAUGE:25:U:U
216
217 =item CPU (F<cpu-I<E<lt>numE<gt>>.rrd>)
218
219   DS:user:COUNTER:25:0:100
220   DS:nice:COUNTER:25:0:100
221   DS:syst:COUNTER:25:0:100
222   DS:idle:COUNTER:25:0:100
223   DS:wait:COUNTER:25:0:100
224
225 =item Mountpoints (F<df-I<E<lt>pathE<gt>>.rrd>)
226
227   DS:used:GAUGE:25:0:U
228   DS:free:GAUGE:25:0:U
229
230 =item Diskstats (F<disk-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
231
232   DS:rcount:COUNTER:25:0:U
233   DS:rmerged:COUNTER:25:0:U
234   DS:rbytes:COUNTER:25:0:U
235   DS:rtime:COUNTER:25:0:U
236   DS:wcount:COUNTER:25:0:U
237   DS:wmerged:COUNTER:25:0:U
238   DS:wbytes:COUNTER:25:0:U
239   DS:wtime:COUNTER:25:0:U
240
241 =item Diskstats (F<partition-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
242
243   DS:rcount:COUNTER:25:0:U
244   DS:rbytes:COUNTER:25:0:U
245   DS:wcount:COUNTER:25:0:U
246   DS:wbytes:COUNTER:25:0:U
247
248 =item HDD Temperature (F<hddtemp-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
249
250   DS:value:GAUGE:25:U:U
251
252 =item System load (F<load.rrd>)
253
254   DS:shortterm:GAUGE:25:0:100
255   DS:midterm:GAUGE:25:0:100
256   DS:longterm:GAUGE:25:0:100
257
258 =item Memory usage (F<memory.rrd>)
259
260   DS:used:GAUGE:25:0:9223372036854775807
261   DS:free:GAUGE:25:0:9223372036854775807
262   DS:buffers:GAUGE:25:0:9223372036854775807
263   DS:cached:GAUGE:25:0:9223372036854775807
264
265 =item MySQL commands and handlers (F<mysql_commands-I<E<lt>commandE<gt>>.rrd> and F<mysql_handler-I<E<lt>handlerE<gt>>.rrd>)
266
267   DS:value:COUNTER:25:0:U
268
269 =item MySQL query cache (F<mysql_qcache.rrd>)
270
271   DS:hits:COUNTER:25:0:U
272   DS:inserts:COUNTER:25:0:U
273   DS:not_cached:COUNTER:25:0:U
274   DS:lowmem_prunes:COUNTER:25:0:U
275   DS:queries_in_cache:GAUGE:25:0:U
276
277 =item MySQL threads (F<mysql_threads.rrd>)
278
279   DS:running:GAUGE:25:0:U
280   DS:connected:GAUGE:25:0:U
281   DS:cached:GAUGE:25:0:U
282   DS:created:COUNTER:25:0:U
283
284 =item NFSv2 Procedures (F<nfs2_procedures-I<(client|server)>.rrd>)
285
286   DS:null:COUNTER:25:0:U
287   DS:getattr:COUNTER:25:0:U
288   DS:setattr:COUNTER:25:0:U
289   DS:root:COUNTER:25:0:U
290   DS:lookup:COUNTER:25:0:U
291   DS:readlink:COUNTER:25:0:U
292   DS:read:COUNTER:25:0:U
293   DS:wrcache:COUNTER:25:0:U
294   DS:write:COUNTER:25:0:U
295   DS:create:COUNTER:25:0:U
296   DS:remove:COUNTER:25:0:U
297   DS:rename:COUNTER:25:0:U
298   DS:link:COUNTER:25:0:U
299   DS:symlink:COUNTER:25:0:U
300   DS:mkdir:COUNTER:25:0:U
301   DS:rmdir:COUNTER:25:0:U
302   DS:readdir:COUNTER:25:0:U
303   DS:fsstat:COUNTER:25:0:U
304
305 =item NFSv3 Procedures (F<nfs3_procedures-I<(client|server)>.rrd>)
306
307   DS:null:COUNTER:25:0:U
308   DS:getattr:COUNTER:25:0:U
309   DS:setattr:COUNTER:25:0:U
310   DS:lookup:COUNTER:25:0:U
311   DS:access:COUNTER:25:0:U
312   DS:readlink:COUNTER:25:0:U
313   DS:read:COUNTER:25:0:U
314   DS:write:COUNTER:25:0:U
315   DS:create:COUNTER:25:0:U
316   DS:mkdir:COUNTER:25:0:U
317   DS:symlink:COUNTER:25:0:U
318   DS:mknod:COUNTER:25:0:U
319   DS:remove:COUNTER:25:0:U
320   DS:rmdir:COUNTER:25:0:U
321   DS:rename:COUNTER:25:0:U
322   DS:link:COUNTER:25:0:U
323   DS:readdir:COUNTER:25:0:U
324   DS:readdirplus:COUNTER:25:0:U
325   DS:fsstat:COUNTER:25:0:U
326   DS:fsinfo:COUNTER:25:0:U
327   DS:pathconf:COUNTER:25:0:U
328   DS:commit:COUNTER:25:0:U
329
330 =item Network latency / Ping (F<ping-I<E<lt>hostnameE<gt>>.rrd>)
331
332   DS:ping:GAUGE:25:0:65535
333
334 =item Processes (F<processes.rrd>)
335
336   DS:running:GAUGE:25:0:65535
337   DS:sleeping:GAUGE:25:0:65535
338   DS:zombies:GAUGE:25:0:65535
339   DS:stopped:GAUGE:25:0:65535
340   DS:paging:GAUGE:25:0:65535
341   DS:blocked:GAUGE:25:0:65535
342
343 =item lm_sensors (F<sensors-I<E<lt>chipE<gt>>-I<E<lt>featureE<gt>>.rrd>)
344
345   DS:value:GAUGE:25:U:U
346
347 =item Serial port traffic (F<serial-I<E<lt>numE<gt>>.rrd>)
348
349   DS:incoming:COUNTER:25:0:U
350   DS:outgoing:COUNTER:25:0:U
351
352 =item Swap usage (F<swap.rrd>)
353
354   DS:used:GAUGE:25:0:1099511627776
355   DS:free:GAUGE:25:0:1099511627776
356   DS:cached:GAUGE:25:0:1099511627776
357   DS:resv:GAUGE:25:0:1099511627776
358
359 =item Tape drive usage (F<tape-I<E<lt>nameE<gt>>.rrd>)
360
361   DS:rcount:COUNTER:25:0:
362   DS:rmerged:COUNTER:25:0:U
363   DS:rbytes:COUNTER:25:0:U
364   DS:rtime:COUNTER:25:0:U
365   DS:wcount:COUNTER:25:0:U
366   DS:wmerged:COUNTER:25:0:U
367   DS:wbytes:COUNTER:25:0:U
368   DS:wtime:COUNTER:25:0:U
369
370 =item Network traffic (F<traffic-I<E<lt>nameE<gt>>.rrd>)
371
372   DS:incoming:COUNTER:25:0:U
373   DS:outgoing:COUNTER:25:0:U
374
375 =item Users (F<users.rrd>)
376
377   DS:users:GAUGE:25:0:65535
378
379 =back
380
381 =head1 SEE ALSO
382
383 L<collectd.conf(5)>, L<rrdtool(1)>, L<sensors(1)>, L<hddtemp(8)>,
384 L<kstat(3KSTAT)>
385
386 =head1 AUTHOR
387
388 Florian Forster E<lt>octo@verplant.orgE<gt>
389
390 =cut