My embedded linux app needs to report total cpu load to another system.
How can I measure total cpu load programmatically in Linux?
BR
David
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
My embedded linux app needs to report total cpu load to another system.
How can I measure total cpu load programmatically in Linux?
BR
David
David,
As one example you can check the st_cpu_load.c file at http://arago-project.org/git/projects/?p=test-automation/ltp-ddt.git;a=tree;f=testcases/ddt/utils/user;h=81ababda745ac2257f551af38e31ae8203d05b31;hb=3fc540789783a9e2dc0de514cf62f78aae1a2f14
This file is part of the ltp-ddt project hosted at http://arago-project.org/git/projects/?p=test-automation/ltp-ddt.git;a=summary
LTP-DDT contains a collection of test cases that we use to validate some of our Linux PSPs.
Regards,
Carlos
Hi Carlos
Thanks, that code is useful in that it shows how to read from /proc/stat.
I need to understand what the data from that file really means. The code you pointed to takes differences between successive reads. Not sure what is really going on there.
David