Linux Commands / IT Support Guides
Observe a Linux slowdown with top
Watch Linux process activity over several updates with top.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Understand the problem
Open a terminal on the affected host. Keep the application or task that triggers the slowdown running if it is safe to do so.
Run the command
Run top and watch several refreshes. Press P to sort by CPU usage, M to sort by memory usage, and q to quit.
top
Read the output
Read PID and COMMAND to identify a process. A process that repeatedly ranks high in %CPU deserves a closer look. RES shows how much physical memory the process currently keeps resident.
Choose the next step
Compare the readings before and during the slowdown. If the same process keeps rising to the top, check what work it was doing at that time.
Before making changes
Record the time and process details before changing anything. A momentary spike is common, so look for a pattern that matches the symptom.