Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cUsage

This program is reading data from "/proc/stat" file and then printing it in %s to the console output.

Running and testing:

Run:

Use CC env variable to set a compiler (flags will be added automaticaly):

export CC=clang
#or
export CC=gcc

Then compile and execute the program:

make
./bin/cUsage

Test:

To test the progarm run:

make test

Program output and manual testing:

Here is example of loading 4 of 8 cores:

  Core Index |   %-Load
core #     0 |        7%
core #     1 |      100%
core #     2 |      100%
core #     3 |        0%
core #     4 |      100%
core #     5 |        0%
core #     6 |      100%
core #     7 |        0%
Avg %-Load =  50%

You can load cores of your processor with "stress" in linux:

sudo apt-get install stress
sudo stress --cpu <CORE_NUM> --timeout <SEC_TIMEOUT>

Spinning frog:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages