1 collectd - System information collection daemon
2 =================================================
8 collectd is a small daemon which collects system information periodically
9 and provides mechanisms to store and monitor the values in a variety of
16 * collectd is able to collect the following data:
19 Apache server utilization: Number of bytes transferred, number of
20 requests handled and detailed scoreboard statistics
23 APC UPS Daemon: UPS charge, load, input/output/battery voltage, etc.
26 Sensors in Macs running Mac OS X / Darwin: Temperature, fan speed and
30 Various sensors in the Aquaero 5 water cooling board made by Aquacomputer.
33 Statistics about Ascent, a free server for the game `World of Warcraft'.
36 Reads absolute barometric pressure, air pressure reduced to sea level and
37 temperature. Supported sensors are MPL115A2 and MPL3115 from Freescale
38 and BMP085 from Bosch.
41 Batterycharge, -current and voltage of ACPI and PMU based laptop
45 Name server and resolver statistics from the `statistics-channel'
46 interface of BIND 9.5, 9,6 and later.
49 Statistics from the Ceph distributed storage system.
52 CPU accounting information for process groups under Linux.
55 Chrony daemon statistics: Local clock drift, offset to peers, etc.
58 Number of nf_conntrack entries.
61 Number of context switches done by the operating system.
64 CPU utilization: Time spent in the system, user, nice, idle, and related
68 CPU frequency (For laptops with speed step or a similar technology)
71 CPU sleep: Time spent in suspend (For mobile devices which enter suspend automatically)
74 Parse statistics from websites using regular expressions.
77 Retrieves JSON data via cURL and parses it according to user
81 Retrieves XML data via cURL and parses it according to user
85 Executes SQL statements on various databases and interprets the returned
89 Mountpoint usage (Basically the values `df(1)' delivers)
92 Disk utilization: Sectors read/written, number of read/write actions,
93 average time an IO-operation took to complete.
96 DNS traffic: Query types, response codes, opcodes and traffic/octets
100 Collect DPDK interface statistics.
101 See docs/BUILD.dpdkstat.md for detailed build instructions.
104 Collect individual drbd resource statistics.
107 Email statistics: Count, traffic, spam scores and checks.
108 See collectd-email(5).
111 Amount of entropy available to the system.
114 Network interface card statistics.
117 Values gathered by a custom program or script.
118 See collectd-exec(5).
121 File handles statistics.
124 Count the number of files in directories.
127 Linux file-system based caching framework statistics.
130 Receive multicast traffic from Ganglia instances.
133 Monitor gps related data through gpsd.
136 Send and receive values over the network using the gRPC framework.
139 Hard disk temperatures using hddtempd.
142 Report the number of used and free hugepages. More info on
143 hugepages can be found here:
144 https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt.
147 Interface traffic: Number of octets, packets and errors for each
151 IPC counters: semaphores used, number of allocated segments in shared
155 IPMI (Intelligent Platform Management Interface) sensors information.
158 Iptables' counters: Number of bytes that were matched by a certain
162 IPVS connection statistics (number of connections, octets and packets
163 for each service and destination).
164 See http://www.linuxvirtualserver.org/software/index.html.
167 IRQ counters: Frequency in which certain interrupts occur.
170 Integrates a `Java Virtual Machine' (JVM) to execute plugins in Java
171 bytecode. See “Configuring with libjvm” below.
174 System load average over the last 1, 5 and 15 minutes.
177 Detailed CPU statistics of the “Logical Partitions” virtualization
178 technique built into IBM's POWER processors.
181 The Lua plugin implements a Lua interpreter into collectd. This
182 makes it possible to write plugins in Lua which are executed by
183 collectd without the need to start a heavy interpreter every interval.
184 See collectd-lua(5) for details.
187 Size of “Logical Volumes” (LV) and “Volume Groups” (VG) of Linux'
188 “Logical Volume Manager” (LVM).
191 Queries very detailed usage statistics from wireless LAN adapters and
192 interfaces that use the Atheros chipset and the MadWifi driver.
195 Motherboard sensors: temperature, fan speed and voltage information,
199 Linux software-RAID device information (number of active, failed, spare
203 Query and parse data from a memcache daemon (memcached).
206 Statistics of the memcached distributed caching system.
207 <http://www.danga.com/memcached/>
210 Memory utilization: Memory occupied by running processes, page cache,
211 buffer cache and free.
214 Collects CPU usage, memory usage, temperatures and power consumption from
215 Intel Many Integrated Core (MIC) CPUs.
218 Reads values from Modbus/TCP enabled devices. Supports reading values
219 from multiple "slaves" so gateway devices can be used.
222 Publishes and subscribes to MQTT topics.
225 Information provided by serial multimeters, such as the `Metex
229 MySQL server statistics: Commands issued, handlers triggered, thread
230 usage, query cache utilization and traffic/octets sent and received.
233 Plugin to query performance values from a NetApp storage system using the
234 “Manage ONTAP” SDK provided by NetApp.
237 Very detailed Linux network interface and routing statistics. You can get
238 (detailed) information on interfaces, qdiscs, classes, and, if you can
239 make use of it, filters.
242 Receive values that were collected by other hosts. Large setups will
243 want to collect the data on one dedicated machine, and this is the
244 plugin of choice for that.
247 NFS Procedures: Which NFS command were called how often. Only NFSv2 and
251 Collects statistics from `nginx' (speak: engine X), a HTTP and mail
255 NTP daemon statistics: Local clock drift, offset to peers, etc.
258 Information about Non-Uniform Memory Access (NUMA).
261 Network UPS tools: UPS current, voltage, power, charge, utilisation,
262 temperature, etc. See upsd(8).
265 Queries routing information from the “Optimized Link State Routing”
268 - onewire (EXPERIMENTAL!)
269 Read onewire sensors using the owcapu library of the owfs project.
270 Please read in collectd.conf(5) why this plugin is experimental.
273 Read monitoring information from OpenLDAP's cn=Monitor subtree.
276 RX and TX of each client in openvpn-status.log (status-version 2).
277 <http://openvpn.net/index.php/documentation/howto.html>
280 Query data from an Oracle database.
283 The perl plugin implements a Perl-interpreter into collectd. You can
284 write your own plugins in Perl and return arbitrary values using this
285 API. See collectd-perl(5).
288 Query statistics from BSD's packet filter "pf".
291 Receive and dispatch timing values from Pinba, a profiling extension for
295 Network latency: Time to reach the default gateway or another given
299 PostgreSQL database statistics: active server connections, transaction
300 numbers, block IO, table row manipulations.
303 PowerDNS name server statistics.
306 Process counts: Number of running, sleeping, zombie, ... processes.
309 Counts various aspects of network protocols such as IP, TCP, UDP, etc.
312 The python plugin implements a Python interpreter into collectd. This
313 makes it possible to write plugins in Python which are executed by
314 collectd without the need to start a heavy interpreter every interval.
315 See collectd-python(5) for details.
318 The redis plugin gathers information from a Redis server, including:
319 uptime, used memory, total connections etc.
322 Query interface and wireless registration statistics from RouterOS.
325 RRDtool caching daemon (RRDcacheD) statistics.
328 System sensors, accessed using lm_sensors: Voltages, temperatures and
332 RX and TX of serial interfaces. Linux only; needs root privileges.
335 Uses libsigrok as a backend, allowing any sigrok-supported device
336 to have its measurements fed to collectd. This includes multimeters,
337 sound level meters, thermometers, and much more.
340 Collect SMART statistics, notably load cycle count, temperature
344 Read values from SNMP (Simple Network Management Protocol) enabled
345 network devices such as switches, routers, thermometers, rack monitoring
346 servers, etc. See collectd-snmp(5).
349 Acts as a StatsD server, reading values sent over the network from StatsD
350 clients and calculating rates and other aggregates out of these values.
353 Pages swapped out onto hard disk or whatever is called `swap' by the OS..
356 Parse table-like structured files.
359 Follows (tails) log files, parses them by lines and submits matched
363 Follows (tails) files in CSV format, parses each line and submits
367 Bytes and operations read and written on tape devices. Solaris only.
370 Number of TCP connections to specific local and remote ports.
373 TeamSpeak2 server statistics.
376 Plugin to read values from `The Energy Detective' (TED).
379 Linux ACPI thermal zone information.
382 Reads the number of records and file size from a running Tokyo Tyrant
386 Reads CPU frequency and C-state residency on modern Intel
387 turbo-capable processors.
390 System uptime statistics.
393 Users currently logged in.
396 Various statistics from Varnish, an HTTP accelerator.
399 CPU, memory, disk and network I/O statistics from virtual machines.
402 Virtual memory statistics, e. g. the number of page-ins/-outs or the
403 number of pagefaults.
406 System resources used by Linux VServers.
407 See <http://linux-vserver.org/>.
410 Link quality of wireless cards. Linux only.
413 XEN Hypervisor CPU stats.
416 Bitrate and frequency of music played with XMMS.
419 Statistics for ZFS' “Adaptive Replacement Cache” (ARC).
422 Measures the percentage of cpu load per container (zone) under Solaris 10
426 Read data from Zookeeper's MNTR command.
428 * Output can be written or sent to various destinations by the following
432 Sends JSON-encoded data to an Advanced Message Queuing Protocol (AMQP)
433 server, such as RabbitMQ.
436 Write to comma separated values (CSV) files. This needs lots of
437 diskspace but is extremely portable and can be analysed with almost
438 every program that can analyse anything. Even Microsoft's Excel..
441 It's possible to implement write plugins in Lua using the Lua
442 plugin. See collectd-lua(5) for details.
445 Send the data to a remote host to save the data somehow. This is useful
446 for large setups where the data should be saved by a dedicated machine.
449 Of course the values are propagated to plugins written in Perl, too, so
450 you can easily do weird stuff with the plugins we didn't dare think of
451 ;) See collectd-perl(5).
454 It's possible to implement write plugins in Python using the python
455 plugin. See collectd-python(5) for details.
458 Output to round-robin-database (RRD) files using the RRDtool caching
459 daemon (RRDcacheD) - see rrdcached(1). That daemon provides a general
460 implementation of the caching done by the `rrdtool' plugin.
463 Output to round-robin-database (RRD) files using librrd. See rrdtool(1).
464 This is likely the most popular destination for such values. Since
465 updates to RRD-files are somewhat expensive this plugin can cache
466 updates to the files and write a bunch of updates at once, which lessens
470 One can query the values from the unixsock plugin whenever they're
471 needed. Please read collectd-unixsock(5) for a description on how that's
475 Sends data to Carbon, the storage layer of Graphite using TCP or UDP. It
476 can be configured to avoid logging send errors (especially useful when
480 Sends the values collected by collectd to a web-server using HTTP POST
481 requests. The transmitted data is either in a form understood by the
482 Exec plugin or formatted in JSON.
485 Sends data to Apache Kafka, a distributed queue.
488 Writes data to the log
491 Sends data to MongoDB, a NoSQL database.
494 Sends the values to a Redis key-value database server.
497 Sends data to Riemann, a stream processing and monitoring system.
500 Sends data to Sensu, a stream processing and monitoring system, via the
501 Sensu client local TCP socket.
504 Sends data OpenTSDB, a scalable no master, no shared state time series
507 * Logging is, as everything in collectd, provided by plugins. The following
508 plugins keep us informed about what's going on:
511 Writes log messages to a file or STDOUT/STDERR.
514 Log messages are propagated to plugins written in Perl as well.
515 See collectd-perl(5).
518 It's possible to implement log plugins in Python using the python plugin.
519 See collectd-python(5) for details.
522 Logs to the standard UNIX logging mechanism, syslog.
525 Writes log messages formatted as logstash JSON events.
527 * Notifications can be handled by the following plugins:
530 Send a desktop notification to a notification daemon, as defined in
531 the Desktop Notification Specification. To actually display the
532 notifications, notification-daemon is required.
533 See http://www.galago-project.org/specs/notification/.
536 Send an E-mail with the notification message to the configured
540 Submit notifications as passive check results to a local nagios instance.
543 Execute a program or script to handle the notification.
544 See collectd-exec(5).
547 Writes the notification message to a file or STDOUT/STDERR.
550 Send the notification to a remote host to handle it somehow.
553 Notifications are propagated to plugins written in Perl as well.
554 See collectd-perl(5).
557 It's possible to implement notification plugins in Python using the
558 python plugin. See collectd-python(5) for details.
560 * Value processing can be controlled using the "filter chain" infrastructure
561 and "matches" and "targets". The following plugins are available:
563 - match_empty_counter
564 Match counter values which are currently zero.
567 Match values using a hash function of the hostname.
570 Match values by their identifier based on regular expressions.
573 Match values with an invalid timestamp.
576 Select values by their data sources' values.
578 - target_notification
579 Create and dispatch a notification.
582 Replace parts of an identifier using regular expressions.
585 Scale (multiply) values by an arbitrary value.
588 Set (overwrite) entire parts of an identifier.
590 * Miscellaneous plugins:
593 Selects multiple value lists based on patterns or regular expressions
594 and creates new aggregated values lists from those.
597 Checks values against configured thresholds and creates notifications if
598 values are out of bounds. See collectd-threshold(5) for details.
601 Sets the hostname to a unique identifier. This is meant for setups
602 where each client may migrate to another physical host, possibly going
603 through one or more name changes in the process.
605 * Performance: Since collectd is running as a daemon it doesn't spend much
606 time starting up again and again. With the exception of the exec plugin no
607 processes are forked. Caching in output plugins, such as the rrdtool and
608 network plugins, makes sure your resources are used efficiently. Also,
609 since collectd is programmed multithreaded it benefits from hyper-threading
610 and multicore processors and makes sure that the daemon isn't idle if only
611 one plugin waits for an IO-operation to complete.
613 * Once set up, hardly any maintenance is necessary. Setup is kept as easy
614 as possible and the default values should be okay for most users.
620 * collectd's configuration file can be found at `sysconfdir'/collectd.conf.
621 Run `collectd -h' for a list of built-in defaults. See `collectd.conf(5)'
622 for a list of options and a syntax description.
624 * When the `csv' or `rrdtool' plugins are loaded they'll write the values to
625 files. The usual place for these files is beneath `/var/lib/collectd'.
627 * When using some of the plugins, collectd needs to run as user root, since
628 only root can do certain things, such as craft ICMP packages needed to ping
629 other hosts. collectd should NOT be installed setuid root since it can be
630 used to overwrite valuable files!
632 * Sample scripts to generate graphs reside in `contrib/' in the source
633 package or somewhere near `/usr/share/doc/collectd' in most distributions.
634 Please be aware that those script are meant as a starting point for your
635 own experiments.. Some of them require the `RRDs' Perl module.
636 (`librrds-perl' on Debian) If you have written a more sophisticated
637 solution please share it with us.
639 * The RRAs of the automatically created RRD files depend on the `step'
640 and `heartbeat' settings given. If change these settings you may need to
641 re-create the files, losing all data. Please be aware of that when changing
642 the values and read the rrdtool(1) manpage thoroughly.
645 collectd and chkrootkit
646 -----------------------
648 If you are using the `dns' plugin chkrootkit(1) will report collectd as a
649 packet sniffer ("<iface>: PACKET SNIFFER(/usr/sbin/collectd[<pid>])"). The
650 plugin captures all UDP packets on port 53 to analyze the DNS traffic. In
651 this case, collectd is a legitimate sniffer and the report should be
652 considered to be a false positive. However, you might want to check that
653 this really is collectd and not some other, illegitimate sniffer.
659 To compile collectd from source you will need:
661 * Usual suspects: C compiler, linker, preprocessor, make, ...
663 * A POSIX-threads (pthread) implementation.
664 Since gathering some statistics is slow (network connections, slow devices,
665 etc) collectd is parallelized. The POSIX threads interface is being
666 used and should be found in various implementations for hopefully all
669 * aerotools-ng (optional)
670 Used by the `aquaero' plugin. Currently, the `libaquaero5' library, which
671 is used by the `aerotools-ng' toolkit, is not compiled as a shared object
672 nor does it feature an installation routine. Therefore, you need to point
673 collectd's configure script at the source directory of the `aerotools-ng'
675 <https://github.com/lynix/aerotools-ng>
677 * CoreFoundation.framework and IOKit.framework (optional)
678 For compiling on Darwin in general and the `apple_sensors' plugin in
680 <http://developer.apple.com/corefoundation/>
682 * libatasmart (optional)
683 Used by the `smart' plugin.
684 <http://git.0pointer.de/?p=libatasmart.git>
687 The `turbostat' plugin can optionally build Linux Capabilities support,
688 which avoids full privileges requirement (aka. running as root) to read
690 <http://sites.google.com/site/fullycapable/>
692 * libclntsh (optional)
693 Used by the `oracle' plugin.
695 * libhiredis (optional)
696 Used by the redis plugin. Please note that you require a 0.10.0 version
697 or higher. <https://github.com/redis/hiredis>
700 If you want to use the `apache', `ascent', `bind', `curl', `curl_json',
701 `curl_xml', `nginx', or `write_http' plugin.
702 <http://curl.haxx.se/>
705 Used by the `dbi' plugin to connect to various databases.
706 <http://libdbi.sourceforge.net/>
708 * libesmtp (optional)
709 For the `notify_email' plugin.
710 <http://www.stafford.uklinux.net/libesmtp/>
712 * libganglia (optional)
713 Used by the `gmond' plugin to process data received from Ganglia.
714 <http://ganglia.info/>
717 Used by the `grpc' plugin. gRPC requires a C++ compiler supporting the
721 * libgcrypt (optional)
722 Used by the `network' plugin for encryption and authentication.
723 <http://www.gnupg.org/>
726 Used by the `gps' plugin.
727 <http://developer.berlios.de/projects/gpsd/>
730 If present, the `uuid' plugin will check for UUID from HAL.
731 <http://hal.freedesktop.org/>
733 * libi2c-dev (optional)
734 Used for the plugin `barometer', provides just the i2c-dev.h header file
735 for user space i2c development.
738 For querying iptables counters.
739 <http://netfilter.org/>
742 Library that encapsulates the `Java Virtual Machine' (JVM). This library is
743 used by the `java' plugin to execute Java bytecode. See “Configuring with
745 <http://openjdk.java.net/> (and others)
748 Used by the `openldap' plugin.
749 <http://www.openldap.org/>
752 Used by the `lua' plugin. Currently, Lua 5.1 and later are supported.
753 <https://www.lua.org/>
756 Used by the `lvm' plugin.
757 <ftp://sources.redhat.com/pub/lvm2/>
759 * libmemcached (optional)
760 Used by the `memcachec' plugin to connect to a memcache daemon.
761 <http://tangent.org/552/libmemcached.html>
764 Used by the `netlink' plugin.
765 <http://www.netfilter.org/projects/libmnl/>
767 * libmodbus (optional)
768 Used by the `modbus' plugin to communicate with Modbus/TCP devices. The
769 `modbus' plugin works with version 2.0.3 of the library – due to frequent
770 API changes other versions may or may not compile cleanly.
771 <http://www.libmodbus.org/>
773 * libmysqlclient (optional)
774 Unsurprisingly used by the `mysql' plugin.
775 <http://dev.mysql.com/>
777 * libnetapp (optional)
778 Required for the `netapp' plugin.
779 This library is part of the “Manage ONTAP SDK” published by NetApp.
781 * libnetsnmp (optional)
782 For the `snmp' plugin.
783 <http://www.net-snmp.org/>
785 * libnotify (optional)
786 For the `notify_desktop' plugin.
787 <http://www.galago-project.org/>
789 * libopenipmi (optional)
790 Used by the `ipmi' plugin to prove IPMI devices.
791 <http://openipmi.sourceforge.net/>
793 * liboping (optional)
794 Used by the `ping' plugin to send and receive ICMP packets.
795 <http://octo.it/liboping/>
797 * libowcapi (optional)
798 Used by the `onewire' plugin to read values from onewire sensors (or the
800 <http://www.owfs.org/>
803 Used to capture packets by the `dns' plugin.
804 <http://www.tcpdump.org/>
806 * libperfstat (optional)
807 Used by various plugins to gather statistics under AIX.
810 Obviously used by the `perl' plugin. The library has to be compiled with
811 ithread support (introduced in Perl 5.6.0).
812 <http://www.perl.org/>
815 The PostgreSQL C client library used by the `postgresql' plugin.
816 <http://www.postgresql.org/>
818 * libprotobuf, protoc 3.0+ (optional)
819 Used by the `grpc' plugin to generate service stubs and code to handle
820 network packets of collectd's protobuf-based network protocol.
821 <https://developers.google.com/protocol-buffers/>
823 * libprotobuf-c, protoc-c (optional)
824 Used by the `pinba' plugin to generate a parser for the network packets
825 sent by the Pinba PHP extension.
826 <http://code.google.com/p/protobuf-c/>
828 * libpython (optional)
829 Used by the `python' plugin. Currently, Python 2.6 and later and Python 3
831 <http://www.python.org/>
833 * librabbitmq (optional; also called “rabbitmq-c”)
834 Used by the `amqp' plugin for AMQP connections, for example to RabbitMQ.
835 <http://hg.rabbitmq.com/rabbitmq-c/>
837 * librdkafka (optional; also called “rdkafka”)
838 Used by the `write_kafka' plugin for producing messages and sending them
840 <https://github.com/edenhill/librdkafka>
842 * librouteros (optional)
843 Used by the `routeros' plugin to connect to a device running `RouterOS'.
844 <http://octo.it/librouteros/>
847 Used by the `rrdtool' and `rrdcached' plugins. The latter requires RRDtool
848 client support which was added after version 1.3 of RRDtool. Versions 1.0,
849 1.2 and 1.3 are known to work with the `rrdtool' plugin.
850 <http://oss.oetiker.ch/rrdtool/>
852 * librt, libsocket, libkstat, libdevinfo (optional)
853 Various standard Solaris libraries which provide system functions.
854 <http://developers.sun.com/solaris/>
856 * libsensors (optional)
857 To read from `lm_sensors', see the `sensors' plugin.
858 <http://www.lm-sensors.org/>
860 * libsigrok (optional)
861 Used by the `sigrok' plugin. In addition, libsigrok depends on glib,
862 libzip, and optionally (depending on which drivers are enabled) on
863 libusb, libftdi and libudev.
865 * libstatgrab (optional)
866 Used by various plugins to collect statistics on systems other than Linux
868 <http://www.i-scream.org/libstatgrab/>
870 * libtokyotyrant (optional)
871 Used by the `tokyotyrant' plugin.
872 <http://1978th.net/tokyotyrant/>
874 * libupsclient/nut (optional)
875 For the `nut' plugin which queries nut's `upsd'.
876 <http://networkupstools.org/>
879 Collect statistics from virtual machines.
880 <http://libvirt.org/>
883 Parse XML data. This is needed for the `ascent', `bind', `curl_xml' and
885 <http://xmlsoft.org/>
888 Used by the `xencpu' plugin.
889 <http://xenbits.xensource.com/>
892 <http://www.xmms.org/>
895 Parse JSON data. This is needed for the `ceph', `curl_json' and
896 `log_logstash' plugins.
897 <http://github.com/lloyd/yajl>
899 * libvarnish (optional)
900 Fetches statistics from a Varnish instance. This is needed for the
902 <http://varnish-cache.org>
904 * riemann-c-client (optional)
905 For the `write_riemann' plugin.
906 <https://github.com/algernon/riemann-c-client>
908 Configuring / Compiling / Installing
909 ------------------------------------
911 To configure, build and install collectd with the default settings, run
912 `./configure && make && make install'. For detailed, generic instructions
913 see INSTALL. For a complete list of configure options and their description,
914 run `./configure --help'.
916 By default, the configure script will check for all build dependencies and
917 disable all plugins whose requirements cannot be fulfilled (any other plugin
918 will be enabled). To enable a plugin, install missing dependencies (see
919 section `Prerequisites' above) and rerun `configure'. If you specify the
920 `--enable-<plugin>' configure option, the script will fail if the depen-
921 dencies for the specified plugin are not met. In that case you can force the
922 plugin to be built using the `--enable-<plugin>=force' configure option.
923 This will most likely fail though unless you're working in a very unusual
924 setup and you really know what you're doing. If you specify the
925 `--disable-<plugin>' configure option, the plugin will not be built. If you
926 specify the `--enable-all-plugins' or `--disable-all-plugins' configure
927 options, all plugins will be enabled or disabled respectively by default.
928 Explicitly enabling or disabling a plugin overwrites the default for the
929 specified plugin. These options are meant for package maintainers and should
930 not be used in everyday situations.
932 By default, collectd will be installed into `/opt/collectd'. You can adjust
933 this setting by specifying the `--prefix' configure option - see INSTALL for
934 details. If you pass DESTDIR=<path> to `make install', <path> will be
935 prefixed to all installation directories. This might be useful when creating
936 packages for collectd.
938 Configuring with libjvm
939 -----------------------
941 To determine the location of the required files of a Java installation is not
942 an easy task, because the locations vary with your kernel (Linux, SunOS, …)
943 and with your architecture (x86, SPARC, …) and there is no ‘java-config’
944 script we could use. Configuration of the JVM library is therefore a bit
947 The easiest way to use the `--with-java=$JAVA_HOME' option, where
948 `$JAVA_HOME' is usually something like:
949 /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
951 The configure script will then use find(1) to look for the following files:
957 If found, appropriate CPP-flags and LD-flags are set and the following
958 library checks succeed.
960 If this doesn't work for you, you have the possibility to specify CPP-flags,
961 C-flags, LD-flags and LIBS for the ‘Java’ plugin by hand, using the
962 following environment variables:
969 For example (shortened for demonstration purposes):
971 ./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
973 Adding "-ljvm" to JAVA_LIBS is done automatically, you don't have to
976 Generating the configure script
977 -------------------------------
979 Collectd ships with a `build.sh' script to generate the `configure'
980 script shipped with releases.
982 To generate the `configure` script, you'll need the following dependencies:
992 The `build.sh' script takes no arguments.
997 To compile correctly collectd needs to be able to initialize static
998 variables to NAN (Not A Number). Some C libraries, especially the GNU
999 libc, have a problem with that.
1001 Luckily, with GCC it's possible to work around that problem: One can define
1002 NAN as being (0.0 / 0.0) and `isnan' as `f != f'. However, to test this
1003 ``implementation'' the configure script needs to compile and run a short
1004 test program. Obviously running a test program when doing a cross-
1005 compilation is, well, challenging.
1007 If you run into this problem, you can use the `--with-nan-emulation'
1008 configure option to force the use of this implementation. We can't promise
1009 that the compiled binary actually behaves as it should, but since NANs
1010 are likely never passed to the libm you have a good chance to be lucky.
1012 Likewise, collectd needs to know the layout of doubles in memory, in order
1013 to craft uniform network packets over different architectures. For this, it
1014 needs to know how to convert doubles into the memory layout used by x86. The
1015 configure script tries to figure this out by compiling and running a few
1016 small test programs. This is of course not possible when cross-compiling.
1017 You can use the `--with-fp-layout' option to tell the configure script which
1018 conversion method to assume. Valid arguments are:
1020 * `nothing' (12345678 -> 12345678)
1021 * `endianflip' (12345678 -> 87654321)
1022 * `intswap' (12345678 -> 56781234)
1027 For questions, bug reports, development information and basically all other
1028 concerns please send an email to collectd's mailing list at
1029 <list at collectd.org>.
1031 For live discussion and more personal contact visit us in IRC, we're in
1032 channel #collectd on freenode.
1038 Florian octo Forster <octo at collectd.org>,
1039 Sebastian tokkee Harl <sh at tokkee.org>,
1040 and many contributors (see `AUTHORS').
1042 Please use GitHub reporting bugs and submitting pull requests.
1043 See CONTRIBUTING.md for details.