[collectd] AIX port :D
Florian Forster
octo at verplant.org
Mon Nov 23 22:48:15 CET 2009
Hi Andrés,
On Fri, Nov 20, 2009 at 05:37:06PM +0100, Andrés J. Díaz wrote:
> We are pleased to announce the collectd port for AIX (was tested on
> AIX 5.3 and AIX 6).
wow, great :) I have pulled in the patches and put them in an extra
branch called “ms/aix”.
> The patchset was forked from collectd branch 4.8.1, so we do not
> known if it's work fine for older versions.
I've rebased the patches to the master branch (i.e. the development
branch) without any conflicts.
> 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...
I'll take a look at this. Generally I try to avoid checks of the form
“if operating system is AIX, then …”.
> aix-version-gen.patch:
> Fix echo (echo binary do not support -n switch)
Ouch, I though that was supported everywhere..
> aix-src-Makefile.patch:
> Flags for linking: -Wl,-bexpall,-brtllib
> Link with -lm because isnan is in libm
Adding “-lm” would ideally be handled by the NAN-check in the configure
script, too. What do those other linker arguments do? It sounds like
something that should go into the README file.
> 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...
Yeah, a configure check is probably the best way here. I'll look into
that one, too.
> aix-scanner-parser.patch:
> AIX has TRUE and FALSE defined in sys/types.h (sic)
I don't see a problem with that solution, so in my opinion it can stay
like this (i.e. using “BTRUE” and “BFALSE” to avoid the other
definitions).
> 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... :?
Hm, weird. Did you try setting “errno” to zero before calling stat(2)?
> 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 */
Sounds like that “TIOCMBIC” is somehow weird. What is the error message
you see without the cast?
> aix-notested-memcached.patch:
> AIX don't have MSG_DONTWAIT. The memched module could be
> works, but we cannot tested yet.
That looks okay for me, though I'll probably change that to
“#ifndef MSG_DONTWAIT” instead. As I said, I try to avoid OS-based
decisions.
> The hard work for these patches was done by my colleage Manuel
> Sanmartin, so credits for him please :)
I have that name as author for all the patches. If I messed up, please
let me know so I can fix the commits. And please tell Manuel a big thank
you from me, I really appreciate his work even though I haven't used AIX
myself yet. (People who have tend to say that I'm lucky ;)
Regards,
—octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20091123/5e09f0ac/attachment.pgp
More information about the collectd
mailing list