The top command is very useful as it can help you understand the status of your server, providing you with information about the current load, the number of days it has been running without a reboot, the number of users connected via SSH, and overall real-time information about your server.
This command must be executed via SSH, so you will have to access your server via SSH to use it:
Additional Information
You can find more information about accessing your server via SSH in the article:
Once inside, simply execute the command:
# top
This will display detailed information as shown in the following image:
- Line 1: Provides information about the current time, how long the server has been running, the number of connected users, and the server load in 1, 5, and 15-minute intervals.
- Line 2: Shows the total number of processes, the number of running processes, the number of sleeping processes, the number of stopped processes, and the number of zombie processes.
-
Line 3: Provides information about CPU usage.
- Percentage of CPU used by user processes (20.8%us)
- Percentage of CPU used for system processes (9.8%sy)
- Percentage of CPU with nice upgrade priority (0.0%ni)
- Percentage of CPU that is currently idle (70.0%id)
- Percentage of CPU waiting for I/O operations (0.0%wa)
- Percentage of CPU serving hardware interrupts (0.0%hi)
- Percentage of CPU serving software interrupts (0.2%si)
- The amount of CPU “stolen” from this virtual machine by the hypervisor and other tasks. This will be 0 on desktop PCs and servers without virtual machines (0.0%st)
- Lines 4 and 5: Show information about memory and swap usage.
If you have any questions that are not resolved in this article, remember that you can always contact support.