4

Lets say I have a linux machine that has an infinite amount of packets coming in in one interface. I've opened a raw socket and set a bpf filter that none of the packets go through.

Now for every packet the kernel receives it runs the bpf bytecode and filters out the data.

How do I see the CPU usage that's taken by the kernel? Is it counted as time my process spends? Or somewhere else? Would I see this using top?

Thanks

Birdy John
  • 41
  • 2
  • 1
    I don't think `top` shows kernel CPU usage. Did you try `perf top`? https://linux.die.net/man/1/perf-top, https://perf.wiki.kernel.org/index.php/Tutorial#Live_analysis_with_perf_top – Qeole Mar 01 '17 at 11:44

0 Answers0