[Top][All Lists]

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

Re: getloadavg on aix5

From: Peter O'Gorman
Subject: Re: getloadavg on aix5
Date: Tue, 05 Feb 2008 10:19:23 -0600
User-agent: Thunderbird (X11/20071115)

Jim Meyering wrote:
> "Peter O'Gorman" <address@hidden> wrote:
>> I seem to have lost Jim's reply, but here is a patch. Works on
>> aix-4.3.3 and aix-5.3.
>> The SBITS thing is the way the libperstat.h header recommends
>> calculating the loadavg:
>> /* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is 
>> defined in <sys/proc.h>. */
>> Of course, it is not defined on aix4.3.3 ...
> Hi Peter,
> Here's an incremental diff.
> Most changes are syntactic, but I did eliminate an #if block
> by moving the static declaration of cpu_stats into the
> block that uses that variable.  I also removed some casts.
> FYI, I realize you were just retaining the existing style,
> but I'd rather begin the process of moving toward less
> syntax (removing parentheses around cpp symbols), at least
> on most of the lines touched by this change.
> If you can confirm that this works, I'll write
> the ChangeLog and check in the combined change set.

This works (tested on aix4.3.3, aix5.1, 5.2 and 5.3).

I suppose a possible ChangeLog would be:

2008-02-05  Peter O'Gorman <address@hidden>,
            Jim Meyering <address@hidden>
        * lib/getloadavg.c, m4/getloadavg.m4 [aix]: Use libperfstat.

Thank you,

reply via email to

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