CPU LOAD

hello
Can any one tell
How to measure CPU load and performance in C/C++. Are there any systems calls/libraries to do that on Linux?
I'm trying to write a daemon that will automatically checks between two interval of
frequencies of time whenever percent CPU usage goes above some threshhold. I must
return 1 or else 0. Is there a C library function,
present on all POSIX compatible OS's, ...UNIX/LINUX
I need to write a tool to judge each node's load in a network.

If yes, please enlighten me. If no, is there a way around with the same effect? Help. NOW!!

Comments

  • Hi,

    : Can any one tell
    : How to measure CPU load and performance in C/C++. Are there any systems calls/libraries to do that on Linux?
    : I'm trying to write a daemon that will automatically checks between two interval of
    : frequencies of time whenever percent CPU usage goes above some threshhold. I must
    : return 1 or else 0. Is there a C library function,
    : present on all POSIX compatible OS's, ...UNIX/LINUX
    : I need to write a tool to judge each node's load in a network.
    :
    : If yes, please enlighten me. If no, is there a way around with the
    : same effect? Help. NOW!!
    There will possibly be some useful into in the /proc filesystem. I think there is a file containing load average data in there. Don't know that this is the best way to do it.

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion