I am observing (based on logs) that my (java) process pauses for something during execution. My first guess is a context switch. In order to verify I am trying to find (a) the number of involuntary context-switches that my process incurs, and (b) the amount of time the process spends in the run queue (ready to run but waiting to be scheduled).
Are there any tools to gather this information. I am running kernel 2.6.18 (centos 5) and 2.6.32 (centos6).