<br><br>On Saturday, April 22, 2017, Ozgur Karatas &lt;<a href="mailto:mueddib@goosey.org">mueddib@goosey.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
&gt; 21.04.2017, 19:19, &quot;Stephen Brennan&quot; &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;stephen@brennan.io&#39;)">stephen@brennan.io</a>&gt;:<br>
&gt;  Hello all,<br>
&gt;<br>
<br>
Hello,<br>
<br>
&gt;  I was wondering if anyone had some information on how CPU time used by the<br>
&gt;  kernel is accounted for, e.g. in top or htop. I would imagine that kernel code<br>
&gt;  running in process code would be &quot;billed&quot; toward that process. What about kernel<br>
&gt;  worker threads (for example, work_structs queued for later)?<br>
&gt;<br>
&gt;  My overall goal is that I&#39;m doing some large-scale network emulation, and I want<br>
&gt;  to ensure that the kernel is not using too much CPU time, otherwise the CPU<br>
&gt;  overhead may be messing with the results.<br>
<br>
I written to the code for myself, you can use and develop this code (open source).<br>
<br>
<a href="https://github.com/mueddib/cpustat" target="_blank">https://github.com/mueddib/<wbr>cpustat</a><br>
<br>
&gt;  Thanks,<br>
&gt;  Stephen<br>
<br>
Regards,<br>
<br>
Ozgur<br>
<br></blockquote><div><br></div><div>Hi</div><div><br></div><div>Very likely it is accounted for soft interrupt, hard interrupt and system time</div><div><br></div><div>If vm involved, steal time shall be accounted to</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<wbr>_________________<br>
Kernelnewbies mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Kernelnewbies@kernelnewbies.org&#39;)">Kernelnewbies@kernelnewbies.org</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">https://lists.kernelnewbies.<wbr>org/mailman/listinfo/<wbr>kernelnewbies</a><br>
</blockquote><br><br>-- <br>regards,<br><br>Mulyadi Santosa<br>Freelance Linux trainer and consultant<br><br>blog: <a href="http://the-hydra.blogspot.com">the-hydra.blogspot.com</a><br>training: <a href="http://mulyaditraining.blogspot.com">mulyaditraining.blogspot.com</a><br>