Code

autoconf info page mentions that including config.h has to be done this way.
[collectd.git] / src / collectd.pod
1 =head1 NAME
3 collectd - System statistics collection daemon
5 =head1 SYNOPSIS
7 collectd I<[options]>
9 =head1 DESCRIPTION
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:
15 =over 4
17 =item
19 CPU utilization (I<cpu>)
21 =item
23 Disk and partition usage/throughput (I<disk>)
25 =item
27 Harddisk temperatures (I<hddtemp>)
29 =item
31 System load averages (I<load>)
33 =item
35 Memory usage (I<memory>)
37 =item
39 NFS utilization (I<nfs>, Linux only)
41 =item
43 Network latency (I<ping>)
45 =item
47 Number of processes (I<processes>, Linux only)
49 =item
51 lm_sensors information (I<sensors>, Linux only)
53 =item
55 Serial port traffic (I<serial>, Linux only)
57 =item
59 Swap usage (I<swap>)
61 =item
63 Tape drive usage (I<tape>, Solaris only)
65 =item
67 Network traffic (I<traffic>)
69 =item
71 Number of users logged into the system (I<users>)
73 =back
75 =head1 OPTIONS
77 =over 4
79 =item B<-c>
81 Start in client (transmitter) mode. Data will be sent to the multicast group.
82 See L<"MODES">.
84 =item B<-d> I<E<lt>directoryE<gt>>
86 Sets the directory collectd should work in. All F<.rrd>-files are created in
87 this directory. Per default this is F</var/lib/collectd/>.
89 =item B<-P> I<E<lt>directoryE<gt>>
91 Sets the directory collectd should look for plugins in. Per default this is
92 F</usr/lib/collectd>.
94 =item B<-f>
96 Don't fork to the background. I<collectd> will also B<not> close standard file
97 descriptors, detach from the session nor write a pid file. This is mainly
98 thought for 'supervisioning' init replacements such as I<runit>.
100 =item B<-h>
102 Output usage information and exit.
104 =item B<-l>
106 Start in local mode. This is the default. No data will be sent or read to/from
107 the network. Information will be read and written by the same process. See
108 L<"MODES">.
110 =item B<-p> I<E<lt>hostE<gt>>
112 Sets the host to ping periodically. This option may be given more than once to
113 ping multiple hosts. If this option is not given at least once no host will be
114 pinged.
116 =item B<-s>
118 Start in server (receiver) mode. Data sent to the multicast group will be read
119 and stored in RRD files. See L<"MODES">.
121 =back
123 =head1 RRD FILES
125 The RRD files are created automatically with the following RRAs:
127   RRA:AVERAGE:0.2:6:1500
128   RRA:AVERAGE:0.1:180:1680
129   RRA:AVERAGE:0.1:2160:1520
130   RRA:MIN:0.2:6:1500
131   RRA:MIN:0.1:180:1680
132   RRA:MIN:0.1:2160:1520
133   RRA:MAX:0.2:6:1500
134   RRA:MAX:0.1:180:1680
135   RRA:MAX:0.1:2160:1520
137 Since collectd uses a 10 second I<step> the RRAs contain the following
138 timespans:
140   Resolution | Data points |  Timespan
141   -----------+-------------+----------
142   60 seconds |        1500 |  25 hours
143   30 minutes |        1680 |  35 days
144    6 hours   |        1520 | 380 days
146 The DS'es depend on the module creating the RRD files:
148 =over 4
150 =item CPU (F<cpu-I<E<lt>numE<gt>>.rrd>)
152   DS:user:COUNTER:25:0:100
153   DS:nice:COUNTER:25:0:100
154   DS:syst:COUNTER:25:0:100
155   DS:idle:COUNTER:25:0:100
156   DS:wait:COUNTER:25:0:100
158 =item Diskstats (F<disk-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
160   DS:rcount:COUNTER:25:0:U
161   DS:rmerged:COUNTER:25:0:U
162   DS:rbytes:COUNTER:25:0:U
163   DS:rtime:COUNTER:25:0:U
164   DS:wcount:COUNTER:25:0:U
165   DS:wmerged:COUNTER:25:0:U
166   DS:wbytes:COUNTER:25:0:U
167   DS:wtime:COUNTER:25:0:U
169 =item Diskstats (F<partition-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
171   DS:rcount:COUNTER:25:0:U
172   DS:rbytes:COUNTER:25:0:U
173   DS:wcount:COUNTER:25:0:U
174   DS:wbytes:COUNTER:25:0:U
176 =item HDD Temperature (F<hddtemp-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
178   DS:value:GAUGE:25:U:U
180 =item System load (F<load.rrd>)
182   DS:shortterm:GAUGE:25:0:100
183   DS:midterm:GAUGE:25:0:100
184   DS:longterm:GAUGE:25:0:100
186 =item Memory usage (F<memory.rrd>)
188   DS:used:GAUGE:25:0:9223372036854775807
189   DS:free:GAUGE:25:0:9223372036854775807
190   DS:buffers:GAUGE:25:0:9223372036854775807
191   DS:cached:GAUGE:25:0:9223372036854775807
193 =item NFSv2 Procedures (F<nfs2_procedures-I<(client|server)>.rrd>)
195   DS:null:COUNTER:25:0:U
196   DS:getattr:COUNTER:25:0:U
197   DS:setattr:COUNTER:25:0:U
198   DS:root:COUNTER:25:0:U
199   DS:lookup:COUNTER:25:0:U
200   DS:readlink:COUNTER:25:0:U
201   DS:read:COUNTER:25:0:U
202   DS:wrcache:COUNTER:25:0:U
203   DS:write:COUNTER:25:0:U
204   DS:create:COUNTER:25:0:U
205   DS:remove:COUNTER:25:0:U
206   DS:rename:COUNTER:25:0:U
207   DS:link:COUNTER:25:0:U
208   DS:symlink:COUNTER:25:0:U
209   DS:mkdir:COUNTER:25:0:U
210   DS:rmdir:COUNTER:25:0:U
211   DS:readdir:COUNTER:25:0:U
212   DS:fsstat:COUNTER:25:0:U
214 =item NFSv3 Procedures (F<nfs3_procedures-I<(client|server)>.rrd>)
216   DS:null:COUNTER:25:0:U
217   DS:getattr:COUNTER:25:0:U
218   DS:setattr:COUNTER:25:0:U
219   DS:lookup:COUNTER:25:0:U
220   DS:access:COUNTER:25:0:U
221   DS:readlink:COUNTER:25:0:U
222   DS:read:COUNTER:25:0:U
223   DS:write:COUNTER:25:0:U
224   DS:create:COUNTER:25:0:U
225   DS:mkdir:COUNTER:25:0:U
226   DS:symlink:COUNTER:25:0:U
227   DS:mknod:COUNTER:25:0:U
228   DS:remove:COUNTER:25:0:U
229   DS:rmdir:COUNTER:25:0:U
230   DS:rename:COUNTER:25:0:U
231   DS:link:COUNTER:25:0:U
232   DS:readdir:COUNTER:25:0:U
233   DS:readdirplus:COUNTER:25:0:U
234   DS:fsstat:COUNTER:25:0:U
235   DS:fsinfo:COUNTER:25:0:U
236   DS:pathconf:COUNTER:25:0:U
237   DS:commit:COUNTER:25:0:U
239 =item Network latency / Ping (F<ping-I<E<lt>hostnameE<gt>>.rrd>)
241   DS:ping:GAUGE:25:0:65535
243 =item Processes (F<processes.rrd>)
245   DS:running:GAUGE:25:0:65535
246   DS:sleeping:GAUGE:25:0:65535
247   DS:zombies:GAUGE:25:0:65535
248   DS:stopped:GAUGE:25:0:65535
249   DS:paging:GAUGE:25:0:65535
250   DS:blocked:GAUGE:25:0:65535
252 =item lm_sensors (F<sensors-I<E<lt>chipE<gt>>-I<E<lt>featureE<gt>>.rrd>)
254   DS:value:GAUGE:25:U:U
256 =item Serial port traffic (F<serial-I<E<lt>numE<gt>>.rrd>)
258   DS:incoming:COUNTER:25:0:U
259   DS:outgoing:COUNTER:25:0:U
261 =item Swap usage (F<swap.rrd>)
263   DS:used:GAUGE:25:0:1099511627776
264   DS:free:GAUGE:25:0:1099511627776
265   DS:cached:GAUGE:25:0:1099511627776
266   DS:resv:GAUGE:25:0:1099511627776
268 =item Tape drive usage (F<tape-I<E<lt>nameE<gt>>.rrd>)
270   DS:rcount:COUNTER:25:0:
271   DS:rmerged:COUNTER:25:0:U
272   DS:rbytes:COUNTER:25:0:U
273   DS:rtime:COUNTER:25:0:U
274   DS:wcount:COUNTER:25:0:U
275   DS:wmerged:COUNTER:25:0:U
276   DS:wbytes:COUNTER:25:0:U
277   DS:wtime:COUNTER:25:0:U
279 =item Network traffic (F<traffic-I<E<lt>nameE<gt>>.rrd>)
281   DS:incoming:COUNTER:25:0:U
282   DS:outgoing:COUNTER:25:0:U
284 =item Users (F<users.rrd>)
286   DS:users:GAUGE:25:0:65535
288 =back
290 =head1 MODES
292 By default collectd starts in the so called I<local mode> which is not very
293 interesting. It collects data and writes it into RRD files in
294 F</var/lib/collectd>. There's nothing special so I won't discuss that in more
295 detail..
297 Please be aware that B<client-, local- and server-mode are mutual exclusive>. A
298 later declaration overrides earlier ones. I<collectd -l -c -s> will start in
299 server-mode. If you want statistics of the server too you will have to start a
300 client process as well.
302 Starting with version 3 collectd may send data over a network. As common with
303 network stuff there are two modes: A I<sender> and a I<listener>. Since one
304 usually has many senders and only a few listeners the sender is also called
305 I<client> (using the option B<-c>) and the listener is called I<server> (using
306 the option B<-s>).
308 Communication happends using the (IPv4) multicast group B<239.192.74.66> and
309 packets sent to the port B<25826/udp>. Every ten seconds the I<client> queries
310 all the modules and sends the collected data to the multicast group. The
311 I<server> subscribes to the multicast group upon startup and then waits for
312 incoming packets. As it receives the packets it checks wether it has the
313 neccessary module and, if found, writes the data to an RRD file, creating
314 directories and files as needed.
316 The multicast group used is within the I<Organization Local Scope> as defined
317 by L<RFC2365>. Addresses within that space are meant to be routed within an AS
318 but not to the outside. However collectd cannot control this and won't try. So
319 it's totally up to you to secure your net.
321 The UDP port used has been checked to not be assigned by the IANA.
323 On multi-homed machines you may need to add a route to the multicast net
324 (B<224.0.0.0/4>) if multicast packages take the wrong interface. The listener
325 on the other hand listens on B<all> interfaces.
327 =head1 SPECIAL MODULES
329 =head2 cpufreq
331 This module reads F</sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq> (for
332 the first CPU installed) to get the current CPU frequency. If this file does
333 not exist make sure B<cpufreqd> (L<http://cpufreqd.sourceforge.net/>) or a
334 similar tool is installed.
336 =head2 sensors
338 The B<sensors> module uses lm_sensors to retrieve sensor-values. This means
339 that all the needed modules have to be loaded and lm_sensors has to be
340 configured (most likely by editing F</etc/sensors.conf>. Read
341 L<sensors.conf(5)> for details.
343 The B<lm_sensors> homepage can be found at
344 L<http://secure.netroedge.com/~lm78/>.
346 =head2 hddtemp
348 To get values from B<hddtemp> collectd connects to B<localhost> (127.0.0.1),
349 port B<7634/tcp>. hddtemp has to be running to work correctly. If hddtemp is
350 not running timeouts may appear which may interfere with other statistics..
352 The B<hddtemp> homepage can be found at
353 L<http://www.guzu.net/linux/hddtemp.php>.
355 =head1 SEE ALSO
357 L<rrdtool(1)>, L<sensors(1)>, L<hddtemp(8)>, L<kstat(3KSTAT)>
359 =head1 AUTHOR
361 Florian Forster E<lt>octo@verplant.orgE<gt>
363 =cut