Hosting Operations
Read-only, can be slowFind the Processes Burning CPU
You need to identify which processes are using the most CPU without changing system state.
Command
ps -eo pid,ppid,stat,pcpu,pmem,comm,args --sort=-pcpu | head -n 10
Before you run this
System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.
When not to use it: Do not use it as the only signal for long-term performance diagnosis; pair it with uptime and memory checks.
Expected output
A sorted process list with the highest CPU consumers near the top.
System impact
Read-only, can be slow. Nothing changes. The command reads the process table and sorts by CPU use.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use when load is high or the machine feels slow and you need to find CPU-heavy processes.
When not to use it
Do not use it as the only signal for long-term performance diagnosis; pair it with uptime and memory checks.
next steps
Related commands
Find the Processes Eating Memory
Memory pressure can look like a slow app, a stuck deploy, or random crashes.
ps -eo pid,ppid,stat,pcpu,pmem,rss,comm,args --sort=-pmem | head -n 10
Show Top Memory Processes
Find current memory owners before restarting workloads.
ps -eo pid,comm,%mem,%cpu --sort=-%mem | head
Find the Processes Using Memory
The server felt slow. Memory pressure was the first thing to rule out.
ps -eo pid,comm,%mem,%cpu --sort=-%mem | head
Find Directories Burning Inodes
Inode cleanup starts by finding the directory with too many files.
find /var/cache -xdev -type f -printf '%h\n' 2>/dev/null | sort | uniq -c | sort -nr | head
Review Log Files Before Cleanup
Before truncating logs, prove which log files are large and how old they are.
find /var/log -xdev -type f -printf '%10s %TY-%Tm-%Td %p\n' 2>/dev/null | sort -nr | head -50
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.