Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running two "services" that are served in linux kernel-space:

  • Linux Netfilter Firewall ("iptables")
  • Linux Virtual Server Loadbalancer ("IPVS", "LVS")

Now I want to (performance-)monitor my "application" like any other software I am running. What would that basically be? CPU-Time and Memory.

How do I get these out of the kernel? Memory consumption of iptables might be estimated by the size of the connection tracking table, same for ipvs. It's okay for me, but any hints are welcome.

But - what about the CPU time spent for processing Routing, Firewalling and Loadbalancing?

Does "system" time include processing of packet-forwarding and -filtering? What about ipvs-handling?

share|improve this question
The tool you want is oprofile: oprofile.sourceforge.net. Systemtap could also be useful: sourceware.org/systemtap –  AndreasM Jun 11 '12 at 19:12
Whew. Sounds like opening Pandora's box. But I suspected kernel profiling ain't no piece of cake... Thanks alot! –  Michuelnik Jun 12 '12 at 9:37
perf might be useful: perf.wiki.kernel.org/index.php/Main_Page –  SaveTheRbtz Jun 12 '12 at 13:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.