<p dir="ltr">The following bash 1-liner may be useful...</p>
<p dir="ltr">while true; do top -Hbc -p `pgrep asterisk` -n 1 && asterisk -rx "core show threads"; sleep 1; done</p>
<p dir="ltr">Regards,</p>
<p dir="ltr">Ian</p>
<p dir="ltr">On 24/07/2016 13:39, Tzafrir Cohen wrote:<br>
</p>
<blockquote><p dir="ltr">><br>
</p>
</blockquote>
<p dir="ltr">> On Fri, Jul 22, 2016 at 12:02:43AM +0100, Chirag Desai wrote: </p>
<blockquote><p dir="ltr"><br>
</p>
</blockquote>
<p dir="ltr">>><br>
>> I am not sure where to start looking in order to debug the CPU usage by asterisk and would very much appreciate some guidance. <br>
><br>
> If you run 'top', the basic information would be to show per-CPU information (press '1'). Another thing to look at: press 'H' to get per-thread entries. Do you have many many threads each taking a small part of a core, or a few threads taking lots of CPU time? I believe that the PID (process/thread ID) you see in top is also the second item in each line in the output of 'core show threads'. So this could give you some clues regarding the CPU hogs you see in top. <br></p>