High-resolution user/system times?
Nadav Har'El
nyh at math.technion.ac.il
Wed Jul 25 10:09:19 IDT 2012
Hi, as you know the time(1) command, and the times(2) system call is
able to separate a process's running time into "user" and "system" time,
measuring the CPU time in user space and kernel space respectively.
However, these only have a jiffy (often 1/250 seconds) resultion.
I'm now trying to measure a process running around 3 milliseconds, less
than one jiffy, and I still want to understand how much of it is spent in
user space, and how much of it is spent in kernel space (e.g., handling on
minor page faults caused by this process). Does anybody have any idea what I
can use to do that, preferably without modifying the Linux kernel?
Before anyone asks, no - I cannot cause this 3 milliseconds to take 3
seconds by looping 1000 times, because this will completely change the
behavior (e.g., page faults) caused by the process. Also, I have full
control of the machine, so any mechanism which measures CPU usage in the
whole machine instead of just one specific process would also be fine.
Any ideas would be valued.
Nadav.
--
Nadav Har'El | Wednesday, Jul 25 2012, 6 Av 5772
nyh at math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |I am not a complete idiot - some parts
http://nadav.harel.org.il |are missing.
More information about the Linux-il
mailing list