If your Linux server suddenly becomes incredibly sluggish, or if a specific web application starts repeatedly crashing under heavy load, your very first troubleshooting step must be to analyze the system’s live resource consumption. You need to instantly determine if the CPU is maxed out at 100%, if the physical RAM is completely exhausted, or if a rogue, frozen program has entered an infinite loop and is aggressively eating system resources. The oldest, most reliable, and universally installed diagnostic tool for this critical job is the top command.
How to Launch the System Monitor
Unlike modern graphical task managers, top runs entirely inside the command line, making it perfect for managing headless servers via SSH.
- Open your terminal application or connect to your server remotely.
- Type the following command and press Enter:
top
The terminal screen will instantly clear and transform into a live, continuously updating dashboard that refreshes every three seconds.
How to Read the Output Dashboard
The screen is divided into two distinct, highly informative sections.
- The Top Header (Global Stats): The first five lines display the absolute health of the entire server. You can see the system uptime, the load average (how many processes are waiting for CPU time), the total percentage of CPU being utilized, and exactly how much physical RAM and Swap memory is currently free.
- The Process List (The Culprits): The bottom half of the screen displays a dynamic, constantly shifting list of every single running process on the machine. By default,
topsorts this massive list in real-time based on which application is currently using the highest percentage of CPU power (the%CPUcolumn).
How to Exit the Command
Because the top command runs in a continuous, infinite monitoring loop, you cannot type new commands while it is active.
- To exit this live dashboard, kill the monitoring process, and safely return to the normal command prompt, simply press the “Q” key on your keyboard.