CPU

Some useful links to explain the concepts of CPU processing

Concepts

_images/cpu-process-contents.png

Types of Processes

Output of ps command - Explained

_images/cpu-ps-aux-meaning.png _images/cpu-process-state-codes.png

Commands

NoHUP &

_images/cpu-nohup-disown.png

top

SAR

Nice / Renice / IOnice

KILL

_images/cpu-difference-between-pkill-killall.png

HTop

Visual representation of all HTop parameters

_images/cpu-visual-htop.png

HTop command - Explained

SysDig

Configuration

Troubleshooting & Log Parsing

  • Find the most number of processes running on the system

1sudo ps -AL --no-headers | awk -F: '{print $3}' | cut -d' ' -f2 | sort | uniq -c | sort -n | tail -10
  • Check for zombie processes with PPID

1sudo ps axo stat,ppid,pid,comm | grep -w defunct
  • View Column Headers in ps output

1sudo ps aux | head -1 && sudo ps aux | grep <process-name> | grep -v grep