Measuring per thread CPU consumption & others statistics for NPTL

Peter Zaitsev
2003-11-16T16:10:39Z

Dear Kernel developers,

I would wish to add to MySQL profiling of CPU and system usage, which
would allow for example to see amount of system/user CPU needed to
process particular query as well as amount of IO needed.

With LinuxThreads I probably can use times() or getrusage() for this
purpose, as Threads share a lot of infrastructure with processes.

This however would not work with NPTL threads.

Are there any ways to get similar information for thread rather than
process ?

Second question is about accuracy - Is any way to get system/user CPU
consumption information with more than 1/100 sec accuracy ?

Thank you for your advices.

--
Peter Zaitsev, Full-Time Developer
MySQL AB, www.mysql.com

Are you MySQL certified? www.mysql.com/certification