I'd like to get the specific CPU Usage of a process under Linux in C++. However, apart from reading
/proc/stat
I don't know how to do that.
If I read this file, then I don't know how I can't get the CPU usage of my current process when I launch the program ...
I want to get the CPU usage of the program I'm running, do you have any clue on how to do it ? I've seen complex solution on the site and I haven't understood them all ... I just need a direction.
It seems my /proc/pid/stat file isn't changing after sleep(2), is that normal ?