Search:

Type: Posts; User: Fric

Search: Search took 0.00 seconds.

  1. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    I founded a soulution: #include ...

    I founded a soulution:


    #include <stdio.h>
    #include <sys/time.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/wait.h>
    #include <signal.h>
  2. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    ]Isn't it Milliseconds and not Microsseconds...

    ]Isn't it Milliseconds and not Microsseconds usleep is sleeping for?
    Anway I'm not sure this aproach will ever work. Its a multitaking OS so when you sleep other processes are using the processor.
    ...
  3. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    #include #include ...

    #include <stdio.h>
    #include <sys/time.h>
    #include <unistd.h>

    /* Valor de 0 a 100 corresponde ao load de 0 a 100 */
    #define LOAD 7000

    void fullload(int Delay){

    long timeStampSeg;
  4. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    #include #include ...

    #include <stdio.h>
    #include <sys/time.h>

    #define LOAD 6

    void fullload(int Delay){

    int timeStamp;
    struct timeval tv;
    struct timezone tz;
  5. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    usleep() works fine but i have another problem: ...

    usleep() works fine but i have another problem:



    int x=6; /* It will load the cpu with an average of 60% */

    while(1){

    usleep(x);
    fullload(10-x); /* This doen't exist, i have to create...
  6. Thread: Cpu Load

    by Fric
    Replies
    9
    Views
    3,249

    Cpu Load

    want to control the cpu load to test the power consume at a specified load.

    Exemple:
    -Fix the load at 65% and check the power consume of the computer using a Voltage and Current meter


    I was...
Results 1 to 6 of 6