3 collectd - System statistics collection daemon
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:
19 Battery status (I<battery>)
23 CPU utilization (I<cpu>)
27 Mountpoint usage (I<df>)
31 Disk and partition usage/throughput (I<disk>)
35 Harddisk temperatures (I<hddtemp>)
39 System load averages (I<load>)
43 Memory usage (I<memory>)
47 MySQL statistics (I<mysql>)
51 NFS utilization (I<nfs>, Linux only)
55 Network latency (I<ping>)
59 Number of processes (I<processes>, Linux only)
63 lm_sensors information (I<sensors>, Linux only)
67 Serial port traffic (I<serial>, Linux only)
75 Tape drive usage (I<tape>, Solaris only)
79 Network traffic (I<traffic>)
83 Number of users logged into the system (I<users>)
91 =item B<-C> I<E<lt>config-fileE<gt>>
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
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>.
105 Output usage information and exit.
111 collectd can operate in three different operating modes. The modes are
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>.
118 The other two modes, B<client mode> and B<server mode>, are used to send data
119 over a network and receive it again.
121 In B<client mode> the daemon collectd the data locally and send it's result to
122 one or more network addresses. No RRD files are written in this case. This is
123 the only mode available if collectd is not linked against C<librrd>.
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.
128 Please refer to L<collectd.conf(5)> for the configuration options and default
131 =head1 SPECIAL PLUGINS
135 This module reads F</sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq> (for
136 the first CPU installed) to get the current CPU frequency. If this file does
137 not exist make sure B<cpufreqd> (L<http://cpufreqd.sourceforge.net/>) or a
138 similar tool is installed.
142 Requires B<mysqlclient> to be installed. It connects to the database when
143 started and keeps the connection up as long as possible. When the connection is
144 interrupted for whatever reason it will try to re-connect. The syslog will
145 contain loud complaints in case anything goes wrong.
147 This plugin issues C<SHOW STATUS> and evaluates C<Bytes_{received,sent}>,
148 C<Com_*> and C<Handler_*> which correspond to F<traffic-mysql.rrd>,
149 F<mysql_commands-*.rrd> and F<mysql_handler-*.rrd>. Also, the values of
150 C<Qcache_*> are put in F<mysql_qcache.rrd> and values of C<Threads_*> are put
151 in F<mysql_threads.rrd>. Please refer to the B<MySQL reference manual>,
152 I<5.2.4. Server Status Variables> for an explanation of these values.
156 The B<sensors> module uses lm_sensors to retrieve sensor-values. This means
157 that all the needed modules have to be loaded and lm_sensors has to be
158 configured (most likely by editing F</etc/sensors.conf>. Read
159 L<sensors.conf(5)> for details.
161 The B<lm_sensors> homepage can be found at
162 L<http://secure.netroedge.com/~lm78/>.
166 To get values from B<hddtemp> collectd connects to B<localhost> (127.0.0.1),
167 port B<7634/tcp>. The B<Host> and B<Port> options can be used to change these
168 default values. See L<collectd.conf(5)> for details. C<hddtemp> has to be
169 running to work correctly. If C<hddtemp> is not running timeouts may appear
170 which may interfere with other statistics..
172 The B<hddtemp> homepage can be found at
173 L<http://www.guzu.net/linux/hddtemp.php>.
177 The RRD files are created automatically with the following RRAs:
179 RRA:AVERAGE:0.2:6:1500
180 RRA:AVERAGE:0.1:180:1680
181 RRA:AVERAGE:0.1:2160:1520
184 RRA:MIN:0.1:2160:1520
187 RRA:MAX:0.1:2160:1520
189 Since collectd uses a 10 second I<step> the RRAs contain the following
192 Resolution | Data points | Timespan
193 -----------+-------------+----------
194 60 seconds | 1500 | 25 hours
195 30 minutes | 1680 | 35 days
196 6 hours | 1520 | 380 days
198 The DS'es depend on the module creating the RRD files:
202 =item Battery charge (F<battery-I<E<lt>nameE<gt>>/charge.rrd>)
204 DS:charge:GAUGE:25:0:U
206 =item Battery current (F<battery-I<E<lt>nameE<gt>>/current.rrd>)
208 DS:current:GAUGE:25:U:U
210 =item Battery voltage (F<battery-I<E<lt>nameE<gt>>/voltage.rrd>)
212 DS:voltage:GAUGE:25:U:U
214 =item CPU (F<cpu-I<E<lt>numE<gt>>.rrd>)
216 DS:user:COUNTER:25:0:100
217 DS:nice:COUNTER:25:0:100
218 DS:syst:COUNTER:25:0:100
219 DS:idle:COUNTER:25:0:100
220 DS:wait:COUNTER:25:0:100
222 =item Mountpoints (F<df-I<E<lt>pathE<gt>>.rrd>)
227 =item Diskstats (F<disk-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
229 DS:rcount:COUNTER:25:0:U
230 DS:rmerged:COUNTER:25:0:U
231 DS:rbytes:COUNTER:25:0:U
232 DS:rtime:COUNTER:25:0:U
233 DS:wcount:COUNTER:25:0:U
234 DS:wmerged:COUNTER:25:0:U
235 DS:wbytes:COUNTER:25:0:U
236 DS:wtime:COUNTER:25:0:U
238 =item Diskstats (F<partition-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
240 DS:rcount:COUNTER:25:0:U
241 DS:rbytes:COUNTER:25:0:U
242 DS:wcount:COUNTER:25:0:U
243 DS:wbytes:COUNTER:25:0:U
245 =item HDD Temperature (F<hddtemp-I<E<lt>majorE<gt>>-I<E<lt>minorE<gt>>.rrd>)
247 DS:value:GAUGE:25:U:U
249 =item System load (F<load.rrd>)
251 DS:shortterm:GAUGE:25:0:100
252 DS:midterm:GAUGE:25:0:100
253 DS:longterm:GAUGE:25:0:100
255 =item Memory usage (F<memory.rrd>)
257 DS:used:GAUGE:25:0:9223372036854775807
258 DS:free:GAUGE:25:0:9223372036854775807
259 DS:buffers:GAUGE:25:0:9223372036854775807
260 DS:cached:GAUGE:25:0:9223372036854775807
262 =item MySQL commands and handlers (F<mysql_commands-I<E<lt>commandE<gt>>.rrd> and F<mysql_handler-I<E<lt>handlerE<gt>>.rrd>)
264 DS:value:COUNTER:25:0:U
266 =item MySQL query cache (F<mysql_qcache.rrd>)
268 DS:hits:COUNTER:25:0:U
269 DS:inserts:COUNTER:25:0:U
270 DS:not_cached:COUNTER:25:0:U
271 DS:lowmem_prunes:COUNTER:25:0:U
272 DS:queries_in_cache:GAUGE:25:0:U
274 =item MySQL threads (F<mysql_threads.rrd>)
276 DS:running:GAUGE:25:0:U
277 DS:connected:GAUGE:25:0:U
278 DS:cached:GAUGE:25:0:U
279 DS:created:COUNTER:25:0:U
281 =item NFSv2 Procedures (F<nfs2_procedures-I<(client|server)>.rrd>)
283 DS:null:COUNTER:25:0:U
284 DS:getattr:COUNTER:25:0:U
285 DS:setattr:COUNTER:25:0:U
286 DS:root:COUNTER:25:0:U
287 DS:lookup:COUNTER:25:0:U
288 DS:readlink:COUNTER:25:0:U
289 DS:read:COUNTER:25:0:U
290 DS:wrcache:COUNTER:25:0:U
291 DS:write:COUNTER:25:0:U
292 DS:create:COUNTER:25:0:U
293 DS:remove:COUNTER:25:0:U
294 DS:rename:COUNTER:25:0:U
295 DS:link:COUNTER:25:0:U
296 DS:symlink:COUNTER:25:0:U
297 DS:mkdir:COUNTER:25:0:U
298 DS:rmdir:COUNTER:25:0:U
299 DS:readdir:COUNTER:25:0:U
300 DS:fsstat:COUNTER:25:0:U
302 =item NFSv3 Procedures (F<nfs3_procedures-I<(client|server)>.rrd>)
304 DS:null:COUNTER:25:0:U
305 DS:getattr:COUNTER:25:0:U
306 DS:setattr:COUNTER:25:0:U
307 DS:lookup:COUNTER:25:0:U
308 DS:access:COUNTER:25:0:U
309 DS:readlink:COUNTER:25:0:U
310 DS:read:COUNTER:25:0:U
311 DS:write:COUNTER:25:0:U
312 DS:create:COUNTER:25:0:U
313 DS:mkdir:COUNTER:25:0:U
314 DS:symlink:COUNTER:25:0:U
315 DS:mknod:COUNTER:25:0:U
316 DS:remove:COUNTER:25:0:U
317 DS:rmdir:COUNTER:25:0:U
318 DS:rename:COUNTER:25:0:U
319 DS:link:COUNTER:25:0:U
320 DS:readdir:COUNTER:25:0:U
321 DS:readdirplus:COUNTER:25:0:U
322 DS:fsstat:COUNTER:25:0:U
323 DS:fsinfo:COUNTER:25:0:U
324 DS:pathconf:COUNTER:25:0:U
325 DS:commit:COUNTER:25:0:U
327 =item Network latency / Ping (F<ping-I<E<lt>hostnameE<gt>>.rrd>)
329 DS:ping:GAUGE:25:0:65535
331 =item Processes (F<processes.rrd>)
333 DS:running:GAUGE:25:0:65535
334 DS:sleeping:GAUGE:25:0:65535
335 DS:zombies:GAUGE:25:0:65535
336 DS:stopped:GAUGE:25:0:65535
337 DS:paging:GAUGE:25:0:65535
338 DS:blocked:GAUGE:25:0:65535
340 =item lm_sensors (F<sensors-I<E<lt>chipE<gt>>-I<E<lt>featureE<gt>>.rrd>)
342 DS:value:GAUGE:25:U:U
344 =item Serial port traffic (F<serial-I<E<lt>numE<gt>>.rrd>)
346 DS:incoming:COUNTER:25:0:U
347 DS:outgoing:COUNTER:25:0:U
349 =item Swap usage (F<swap.rrd>)
351 DS:used:GAUGE:25:0:1099511627776
352 DS:free:GAUGE:25:0:1099511627776
353 DS:cached:GAUGE:25:0:1099511627776
354 DS:resv:GAUGE:25:0:1099511627776
356 =item Tape drive usage (F<tape-I<E<lt>nameE<gt>>.rrd>)
358 DS:rcount:COUNTER:25:0:
359 DS:rmerged:COUNTER:25:0:U
360 DS:rbytes:COUNTER:25:0:U
361 DS:rtime:COUNTER:25:0:U
362 DS:wcount:COUNTER:25:0:U
363 DS:wmerged:COUNTER:25:0:U
364 DS:wbytes:COUNTER:25:0:U
365 DS:wtime:COUNTER:25:0:U
367 =item Network traffic (F<traffic-I<E<lt>nameE<gt>>.rrd>)
369 DS:incoming:COUNTER:25:0:U
370 DS:outgoing:COUNTER:25:0:U
372 =item Users (F<users.rrd>)
374 DS:users:GAUGE:25:0:65535
380 L<collectd.conf(5)>, L<rrdtool(1)>, L<sensors(1)>, L<hddtemp(8)>,
385 Florian Forster E<lt>octo@verplant.orgE<gt>