Go to ...

Techpository

A Better Technical Repository

RSS Feed

Linux: Determine which kernel processes are consuming your CPU


  1. Install perf:
    sudo apt-get install linux-tools-common linux-tools-generic linux-tools-3.13.0-35-generic

    (The second package must match your kernel version. (Find with: uname -a) You can also just first install linux-tools-common and linux-tools-generic

    then type “perf" to let it tell you which package it needs.)

  2. Record some 10 seconds of backtraces on all your CPUs:
    sudo perf record -g -a sleep 10
    
  3. Analyse your recording:
    perf report
    
    

By: Tanius and Nighthawk