"Peter O'Gorman" <[EMAIL PROTECTED]> wrote:
> While getloadavg works ok on aix4, it returns incorrect results on
> aix5.
>
> Why do we not use libperfstat on aix?
> http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf1/perfstat_cputot.htm
> It has the advantage of not requiring root privs to get the loadavg.

Thanks for the pointer.

This is the first I've heard about it.
That sounds like it'd lead to code that's more
maintainable than the aix-5.1-specific change below.

Would you be willing to write and/or test the patch?

> Anyway, this resulted in more accurate results for us.
>
> Peter
>
> --- lib/getloadavg.c~  2008-01-07 16:03:48.239700086 +0000
> +++ lib/getloadavg.c   2008-01-07 16:26:43.014094746 +0000
> @@ -255,7 +255,11 @@
>  #  endif
>
>  #  ifdef _AIX
> -#   define LOAD_AVE_TYPE long
> +#   ifdef _AIX51
> +#    define LOAD_AVE_TYPE long long
> +#   else
> +#    define LOAD_AVE_TYPE long
> +#   endif
>  #  endif
>
>  #  ifdef convex


Reply via email to