[collectd] porting the postgres plugin to 4.4.2...
Admin
collectd-info at internode.com.au
Mon Aug 25 05:15:46 CEST 2008
Hi
I've been playing with collectd from git://git.verplant.org/collectd.git to
try out the postgres plugin. Unfortunately the current git version leaks
memory like crazy on solaris (its in development so fair enough). I was just
wondering if the postgres plugin was likely to be ported to 4.4.3 or if the
current intention is for it to become mainstream in 4.5?
For those struggling with getting collectd working on solaris, here are a
couple of things I ended up doing
1) add "-D_FILE_OFFSET_BITS=64" to CFLAGS
2) if the endian check is failing add the following to CFLAGS:
x86 "-DBIG_ENDIAN=4321 -DLITTLE_ENDIAN=1234 -DBYTE_ORDER=LITTLE_ENDIAN"
sparc "-DBIG_ENDIAN=4321 -DLITTLE_ENDIAN=1234 -DBYTE_ORDER=BIG_ENDIAN"
I think this check is working now in 4.4.2 anyway.
3) solaris 10 only collects system, idle and user cpu stats (no more i/o) so
just use libstatgrab for cpu stats (as long as you want stats for all cpus
combined in the one rrd - preferable on a T2000 with 32 cores...)
Simple way to do this was to make the HAVE_LIBKSTAT check in src/cpu.c fail so
it falls through to libstatgrab
I use the same trick to use libstatgrab for swap on solaris (since I prefer
collectd to be 32bit for the sake of other plugins with external library
dependencies)
4) linking against libstatgrab. I use libstatgrab compiled via pkgsrc
installed to /local/pkg so I add the following to the ./configure invocation
CPPFLAGS="-I/local/pkg/include" \
LDFLAGS="-L/local/pkg/lib -R/local/pkg/lib -lstatgrab -lkstat -ldevinfo -lnsl -lsocket"
\
--with-libstatgrab=/local/pkg
Also attached are some patches for the apache plugin. Recent apaches (2.2
onwards or possibly 2.0) have changed the mod_status?auto value from
BusyServers to BusyWorkers. This patch fixes that and also adds the
IdleWorkers so open and free slots can be compared. The caveat is obviously
that it breaks the connection count for older apache instances. The patch
also adds the apache cpu usage value.
Thanks,
Admin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: collectd_apache.patch
Type: text/x-diff
Size: 643 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080825/5dcfa38c/attachment.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: types.db.patch
Type: text/x-diff
Size: 405 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080825/5dcfa38c/attachment-0001.patch
More information about the collectd
mailing list