1
votes

I'm running a multi threaded java application. I would like to know how well my application is taking advantage of multi-core cpu. Is there a tool or api in Linux, that provides the following information?

process id, thread name, state, core, time.

Does linux kernel publish process state change events?

1
Yes, there's literally a TON of information published via the /proc file system. Exactly where the state information want is, I don't know, but probably in the per-process /proc subfolders - Marc B
@MarcB /proc/ does have tons of information. But we don't want to poll these files to see the process state changes. We can miss information if the thread goes from R->S->R-S->R between a polling period. The above change will be treated as simply "R" with polling. But, if we listen on events it gives the true picture of what happens to the threads. - Nambi

1 Answers

0
votes

Take a look at ftrace or SystemTap. Or if you want fancy graphs, KernelShark.