[collectd] AIX port :D

Andrés J. Díaz ajdiaz at connectical.com
Fri Nov 20 17:37:06 CET 2009


Hi everybuddy :)

We are pleased to announce the collectd port for AIX (was tested on
AIX 5.3 and AIX 6). The patchset
was  forked from collectd branch 4.8.1, so we do not known if it's
work fine for older versions.

Compiling
========
To configure and compile (if anybody known a better idea to compile
please tell us):

  OBJECT_MODE=64 ./configure LDFLAGS="-Wl,-brtl" CFLAGS="-maix64"
  OBJECT_MODE=64 make

To add collectd to the subsytem object class (the AIX services supervisor):
To use the subsystem object class:

	1. Add collectd definition:
		mkssys -p /opt/collectd/sbin/collectd -s collectd -u 0 -a " -f" -e
/dev/null -i /dev/null -o /dev/null -R -S -f 9 -n 15 -G collectd

	2. Start collectd:	
		startsrc -s collectd

	3.If you want to stop collectd:
		stopsrc -s collectd

	4. To start collectd at boot time just add follwoing line in /etc/inittab:
		collectd:2:once:startsrc -s collectd >/dev/null 2>&1

Patchset explanation
=================

aix-configure.patch:
      Add -lm in NaN 0.0/0.0 test in configure, because isnan is a
library function in AIX. It could be another test...

aix-version-gen.patch:
      Fix echo (echo binary do not support -n switch)
	
aix-src-Makefile.patch:
      Flags for linking:  -Wl,-bexpall,-brtllib
      Link with -lm because isnan is in libm

Ported plugins:
	aix-src-cpu.patch
	aix-src-disk.patch
	aix-src-interface.patch
	aix-src-load.patch
	aix-src-memory.patch
	aix-src-processes.patch (*)
	aix-src-swap.patch

(*) In AIX, AFAIK, you do not known if an process are running or
slepping, this stat are saved in thread
counter, so total measurement group data by threads.

Hacks (a feedback about how to improve these hacks will be welcome :D):
	axi-src-common.patch:
		AIX has ntohll and htonll defined, It could be a config check...
	
	aix-scanner-parser.patch:
 		AIX has TRUE and FALSE defined in sys/types.h (sic)

	aix-strange-stat.patch:
		The stat function when the file do not exists return EINVAL, instead
of  ENOENT, but
                 it's only fails on collectd code, a single test code
return the good value... We do not
                 known how... :?

	aix-notested-multimeter.patch:
                Fixed multimeter plugin adding a dirty and ugly cast,
we cannot check this patch properly...
		-ioctl(fd, TIOCMBIC, &rts);
		+ioctl(fd, (int)TIOCMBIC, &rts); /* XXX */

	aix-notested-memcached.patch:
		AIX don't have MSG_DONTWAIT. The memched module could be works, but we cannot
                tested yet.

Testing case
==========

Collectd on AIX was tested successfully on AIX 5.3 (64b) and AIX 6.1
(64b) as clients for a number of weeks without
troubles.

Bug reports are welcome :)

TODO
=====

* CPU donations (money are welcome too ;D)
* WPARS
* tcpconns port (I someone known anything about how AIX save the
network data, please feedback)




The hard work for these patches was done by my colleage Manuel
Sanmartin, so credits for him please :)



Best regards,
  Andres
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-collectd-4.8.1-aix.tar
Type: application/x-tar
Size: 40960 bytes
Desc: not available
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20091120/8da41b47/attachment-0001.tar 


More information about the collectd mailing list