Quote Originally Posted by mynickmynick View Post
That's too cumulative
I could use also calls to ps
(ps -auroot -T -o sched,policy,rtprio,pid,cmd,spid,pcpu,ppid,size,pr iority,state,%cpu,%mem,bsdtime,cputime,etime,lstar t,psr,sgi_p,cutime,cstime,utime,start_time --sort sched)

I need more detailed info!!
I need to know microsec elapsed between two points in the program execution by one single thread, without counting time for other tasks
I don't believe there is a method to do that - at least using the API, and non-API methods would only give you real (wall-clock) time, not CPU usage time. [I'm thinking perhaps using RDTSC to get a precise time - but it doesn't tell you if the process was "not running" during that time]

Of course, I could be wrong. I know the Linux kernel FAIRLY well, but I don't know all of it in great detail.

--
Mats