Interview Questions/Phone Screen/Find Top CPU Processes in Linux
BeginnerPhone
1 min

Find Top CPU Processes in Linux

LinuxTroubleshootingSystem Administration
Advertisement
Interview Question

How do you quickly identify which processes are consuming the most CPU on a Linux server?

Key Points to Cover
  • Use `top` or `htop` to sort by CPU
  • `ps -eo pid,comm,%cpu --sort=-%cpu | head` for a quick list
  • Optionally check load with `uptime`/`vmstat`
Evaluation Rubric
Mentions top/htop or ps50% weight
Shows sorting/quick listing30% weight
Mentions load/context commands20% weight
Hints
  • 💡Sorting in top: press Shift+P.
Potential Follow-up Questions
  • How do you map PID to service?
  • What about per-CPU usage?
Advertisement