bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getloadavg on aix5


From: Jim Meyering
Subject: Re: getloadavg on aix5
Date: Mon, 07 Jan 2008 18:23:09 +0100

"Peter O'Gorman" <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]