perf2rrd


COPYRIGHT (C) 2004 Marc DeTrano and Gridshield S.A.

Installation Guide




From .tar.gz archive



- Unpack perf2rrd and run the install script:
    tar -xzvf perf2rrd-{version}.tar.gz
    perf2rrd/install.sh
The following flags may be set for the install script:
   -d PATH perf2rrd_root directory (default /var/services/perf2rrd )
   -c recompile the libjrrd.so JNI (default is to skip this and use precompiled binary in package)
   -t Do NOT install a Daemontools link, even if Daemontools /service directory is present.

PATH considerations



- Recommended symlink:
   ln -s {path_to_java_bin} /usr/bin/java

- Otherwise, edit {perf2rrd_root}/set_paths and make sure the path with your java executable is include in the PATH="..." line.

Recompiling libjrrd.so




There are two precompiled libjrrd.so library files included in the package:

{perf2rrd_root}/lib/libjrrd.so was compiled on a 32-bit Mandriva 2008 system, with the rrdtool 1.2 patch applied.
{perf2rrd_root}/lib64/libjrrd.so was compiled on a 64-bit Mandriva 2007 system, with the rrdtool 1.2 patch applied.

The set_paths script will attempt to choose the right library based on the system architecture.

These binaries may or may not work on your system. If you get "Unsatisfied Link" exceptions or other errors referring to the jrrd library, you will need to recompile it.

This library can be recompiled at install time by setting the "-c" flag on the install script, or you can just run the script included in the source package:
    tar -xzvf perf2rrd-{version}.tar.gz
    perf2rrd/compile_rrdjtool.sh
Inspect the script and the suggestions in the output for further assistance.

libjrrd.so is used to implement a JNI to rrdtool. While this makes perf2rrd a little harder to setup on some systems, it does enhance performance. See the documentation for rrdjtool for more info.

Daemonizing (optional, but recommended):




The package was setup to be "daemontools-ready" -- this is a nice way to run well-managed daemons on a 'nix system and releases the developer from having to worry about it.

-Compile and Install D.J. Bernstein's daemontools *
http://cr.yp.to/daemontools.html

- when running the install script, a link will be created in /service to perf2rrd_root (unless the -t flag overrides this) Or, you can setup the link manually:
    cd /service
    ln -s {perf2rrd_root} .

-stop the service with
   svc -d /service/perf2rrd

-start service with
   svc -u /service/perf2rrd    

-restart running service with
   svc -t /service/perf2rrd
Logging is already setup under the log/ subdirectory in the root of the installation, using multilog from the daemon tools package.
    View Log Example:
    tail /service/perf2rrd/log/main/current -f | tai64nlocal

*NOTE: On some Linux distros (Mandriva for one), a small fix is needed to get daemontools to compile.
replace "extern int errno;" with "#include <errno.h>" in the file error.h