Sjaak Koot wrote:
>
> I am using linux kernel 2.2.13 on a Pentium PC.
>
> I would like to keep track of the CPU time in user space of a process or
> task. The user/system time currently implemented is not accurate enough,
> its resolution is 10 ms.
>
> The idea was to keep track when a process enters/leaves the kernel space
> and use the time stamp counter to measure the amount of time spend in
> the kernel and substract this from the wall clock time. Note that I would like
> to know the CPU time in user space for each process separately.
>
> Anyone already implemented this ?
Jan Astalos <astalos@tuke.sk> has some patches which make use of the TSC
for precise time accounting.
On 586/686 you could use the MSRs to get exact user/kernel cycle numbers
too, but i'm afraid that would be way to slow to be acceptable as a
generic solution (a lot extra cycles per every ctx switch).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 15 2000 - 21:00:22 EST