Find the answer to your Linux question:
Results 1 to 2 of 2
Hi Is there a way to get the CPU load average statistics from a user-space program directly, (i.e., a function call instead of reading /proc/loadavg or parsing 'uptime' output)? I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    27

    CPU Load Average Stats from Kernel?


    Hi

    Is there a way to get the CPU load average statistics from a user-space program directly, (i.e., a function call instead of reading /proc/loadavg or parsing 'uptime' output)?

    I noticed that the kernel provides task level statistics using getrusage() and I wondered if there is some support for CPU load averages as well.

    Thanks,

    --b

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    You probably want "sar" which is part of the sysstat package.
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •