awk — Process Analysis

Formatted ps output — user, PID, CPU, command
ps aux | awk 'NR>1 {printf "%-10s %6s %5.1f%% %s\n", $1, $2, $3, $11}' | head -20
Processes using more than 1% CPU
ps aux | awk '$3 > 1.0 {printf "%-10s PID:%-6s CPU:%5.1f%% %s\n", $1, $2, $3, $11}'
Zombie process detection
ps aux | awk '$8 ~ /Z/ {print $2, $11}'
Thread count per process
ps -eLf | awk 'NR>1 {threads[$2]++; cmd[$2]=$NF} END{for(p in threads) if(threads[p]>5) printf "PID:%-6s threads:%-4d %s\n", p, threads[p], cmd[p]}' | sort -t: -k3 -rn | head -10
Process memory breakdown from /proc — VSZ vs RSS
ps aux --sort=-%mem | awk 'NR>1 && NR<=11 {printf "%-10s PID:%-6s VSZ:%8dKB RSS:%8dKB %s\n", $1, $2, $5, $6, $11}'