perfwatcher / collectd-pw

Collectd patched for PerfWatcher
GNU General Public License v2.0
4 stars 6 forks source link

collectd - System information collection daemon

http://collectd.org/

About

collectd is a small daemon which collects system information periodically and provides mechanisms to store and monitor the values in a variety of ways.

Features

Operation

collectd and chkrootkit

If you are using the `dns' plugin chkrootkit(1) will report collectd as a packet sniffer (": PACKET SNIFFER(/usr/sbin/collectd[])"). The plugin captures all UDP packets on port 53 to analyze the DNS traffic. In this case, collectd is a legitimate sniffer and the report should be considered to be a false positive. However, you might want to check that this really is collectd and not some other, illegitimate sniffer.

Prerequisites

To compile collectd from source you will need:

Configuring / Compiling / Installing

To configure, build and install collectd with the default settings, run ./configure && make && make install'. For detailed, generic instructions see INSTALL. For a complete list of configure options and their description, run./configure --help'.

By default, the configure script will check for all build dependencies and disable all plugins whose requirements cannot be fulfilled (any other plugin will be enabled). To enable a plugin, install missing dependencies (see section Prerequisites' above) and rerunconfigure'. If you specify the --enable-<plugin>' configure option, the script will fail if the depen- dencies for the specified plugin are not met. In that case you can force the plugin to be built using the--enable-=force' configure option. This will most likely fail though unless you're working in a very unusual setup and you really know what you're doing. If you specify the --disable-<plugin>' configure option, the plugin will not be built. If you specify the--enable-all-plugins' or `--disable-all-plugins' configure options, all plugins will be enabled or disabled respectively by default. Explicitly enabling or disabling a plugin overwrites the default for the specified plugin. These options are meant for package maintainers and should not be used in everyday situations.

By default, collectd will be installed into /opt/collectd'. You can adjust this setting by specifying the--prefix' configure option - see INSTALL for details. If you pass DESTDIR= to `make install', will be prefixed to all installation directories. This might be useful when creating packages for collectd.

Configuring with libjvm

To determine the location of the required files of a Java installation is not an easy task, because the locations vary with your kernel (Linux, SunOS, …) and with your architecture (x86, SPARC, …) and there is no ‘java-config’ script we could use. Configuration of the JVM library is therefore a bit tricky.

The easiest way to use the --with-java=$JAVA_HOME' option, where $JAVA_HOME' is usually something like: /usr/lib/jvm/java-1.5.0-sun-1.5.0.14

The configure script will then use find(1) to look for the following files:

- jni.h
- jni_md.h
- libjvm.so

If found, appropriate CPP-flags and LD-flags are set and the following library checks succeed.

If this doesn't work for you, you have the possibility to specify CPP-flags, C-flags and LD-flags for the ‘Java’ plugin by hand, using the following three (environment) variables:

- JAVA_CPPFLAGS
- JAVA_CFLAGS
- JAVA_LDFLAGS

For example (shortened for demonstration purposes):

./configure JAVA_CPPFLAGS="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"

Adding "-ljvm" to the JAVA_LDFLAGS is done automatically, you don't have to do that.

Crosscompiling

To compile correctly collectd needs to be able to initialize static variables to NAN (Not A Number). Some C libraries, especially the GNU libc, have a problem with that.

Luckily, with GCC it's possible to work around that problem: One can define NAN as being (0.0 / 0.0) and isnan' asf != f'. However, to test this ``implementation'' the configure script needs to compile and run a short test program. Obviously running a test program when doing a cross- compilation is, well, challenging.

If you run into this problem, you can use the `--with-nan-emulation' configure option to force the use of this implementation. We can't promise that the compiled binary actually behaves as it should, but since NANs are likely never passed to the libm you have a good chance to be lucky.

Likewise, collectd needs to know the layout of doubles in memory, in order to craft uniform network packets over different architectures. For this, it needs to know how to convert doubles into the memory layout used by x86. The configure script tries to figure this out by compiling and running a few small test programs. This is of course not possible when cross-compiling. You can use the `--with-fp-layout' option to tell the configure script which conversion method to assume. Valid arguments are:

* `nothing'    (12345678 -> 12345678)
* `endianflip' (12345678 -> 87654321)
* `intswap'    (12345678 -> 56781234)

Contact

For questions, bug reports, development information and basically all other concerns please send an email to collectd's mailing list at

. For live discussion and more personal contact visit us in IRC, we're in channel #collectd on freenode. Author ------ Florian octo Forster , Sebastian tokkee Harl , and many contributors (see `AUTHORS'). Please send bug reports and patches to the mailing list, see `Contact' above.