in reply to Re^2: portable way to get system load average
in thread portable way to get system load average

considering that there is a simple libc call getloadavg()
... then it should be easy to write a few lines of XS and get said information. If you then release said module on CPAN, others can benefit from it as well.

But is getloadavg() available everywhere? Your request is for a portable way. This suggests it doesn't.

  • Comment on Re^3: portable way to get system load average

Replies are listed 'Best First'.
Re^4: portable way to get system load average
by BrowserUk (Patriarch) on Jul 07, 2010 at 14:02 UTC

    It is hard to believe that anyone (never mind many anyones), missed the obvious GetSystemTimes() function. Hard to believe that they actually looked--which is the "usual problem".

    It would take minimal work to translate the return values of that function into the appropriate values for getloadavg(). Of course, the results would be equally meaningless--what it the point in knowing what happened 60 seconds ago when 128 billion (* 2 or 4 or 6 or 8 or 12 or 16 or 48) things will have happened in the interim?

    In human terms, that's like receiving an urgent news flash(*) that the Egyptians had just finished building the Great Pyramid.

    Assumes that your news flashes are delivered within one second of the actual event occurring.

    Ie. If 1 clock cycle represents 1 second in "human time", then on a 2 GHz single core cpu, a 1 minute load average equates to information pertinent ~4000 years ago!


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.