From mboxrd@z Thu Jan 1 00:00:00 1970 From: mueddib@goosey.org (Ozgur Karatas) Date: Fri, 21 Apr 2017 20:09:26 +0300 Subject: Kernel CPU Utilization In-Reply-To: <4605311492794245@web6o.yandex.ru> References: <20170421161757.GA14406@pride.cult> <4605311492794245@web6o.yandex.ru> Message-ID: <4535711492794566@web2g.yandex.ru> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org > 21.04.2017, 19:19, "Stephen Brennan" : > ?Hello all, > Hello, > ?I was wondering if anyone had some information on how CPU time used by the > ?kernel is accounted for, e.g. in top or htop. I would imagine that kernel code > ?running in process code would be "billed" toward that process. What about kernel > ?worker threads (for example, work_structs queued for later)? > > ?My overall goal is that I'm doing some large-scale network emulation, and I want > ?to ensure that the kernel is not using too much CPU time, otherwise the CPU > ?overhead may be messing with the results. I written to the code for myself, you can use and develop this code (open source). https://github.com/mueddib/cpustat > ?Thanks, > ?Stephen Regards, Ozgur