Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - to get cpu percentage for each threads, not process: (4 Items)
   
to get cpu percentage for each threads, not process  
Hi there,

  I would like to make a app to to get cpu percentage for each threads, not process.

  I searched in internet and get the answer that it could be done by playing /proc/pid/xxx with ioctl. but I could not 
find details.   also someone say I could refer to source code of pidin.  where could we get source code of pidin?

  thank you very much.

Br,
Gavin
Re: to get cpu percentage for each threads, not process  
Re: to get cpu percentage for each threads, not process  
thank you very much. I got some idea what I should do. thanks.
Re: to get cpu percentage for each threads, not process  
Hi,there
I'm encountering an issue: at time t1, let t1_cpu = debug_thread_t.sutime, and at time t2, t2_cpu = debug_thread_t.
sutime, with t2 - t1 = 1 being a constant value. Simultaneously, Δt_cpu is also a stable value. However, when I invoke 
settimeofday() to modify the system time, Δt_cpu immediately becomes a relatively small value. Could you please help me
 with the following questions: 1) What is the relationship between debug_thread_t.sutime and the system time, and why is
 it influenced by changes in the system time? 2) Are there any methods to obtain thread execution time that remains 
unaffected by changes in the system time?