The top utility for server monitoring

Step-by-step guide to using the top utility for server load monitoring.

Top is a built-in Linux utility for real-time monitoring of processes and system resources on VPS and dedicated servers. It displays a list of running processes in a table format with information about resource consumption for each process, including disk subsystem load. This helps optimize server performance and take timely action when excessive load occurs.

Quick Start

  1. Connect to your server via SSH.
  2. Enter the command top and press Enter.

Don't have a VPS yet?

Fornex offers VPS hosting with full root access, 24/7 support, and DDoS protection. Get a stable server with NVMe disks for fast and reliable operation. Find more details on the Fornex VPS page.

After launching, you'll see a table listing processes, initially sorted by descending CPU usage.

Launching the top command Launching the top command

Process Table Breakdown

The first two columns:

  • PID — process ID number.
  • USER — name of the user who started the process.

The next two columns show priorities:

  • PR — current process priority.
  • NI — priority assigned to the process by the nice command.

The remaining columns reflect resource consumption levels:

  • VIRT — virtual memory used by the process.
  • RES — physical memory occupied by the process.
  • SHR — shared memory that the process shares with others.
  • S — current process status: R — running, S — sleeping, Z — zombie (terminated but not removed).
  • %CPU — percentage of CPU usage.
  • %MEM — percentage of RAM usage.
  • TIME+ — process runtime since launch.
  • COMMAND — name of the command (program) that initiated the process.

Summary Information Breakdown

Five lines of summary system data are displayed before the process table.

First Line — General System Information

First line of top General system information

  • Current time.
  • up — system uptime since boot.
  • user — number of users connected to the system.
  • load average — average system load over 1, 5, and 15 minutes.

Note

It's considered normal if load average doesn't exceed 1 for single-core processors. A load average value equal to the number of cores is considered the limit.

Second Line — Process Statistics

Second line of top Process statistics

  • total — total number of processes.
  • running — number of actively running processes.
  • sleeping — number of processes waiting for an event.
  • stopped — number of stopped processes.
  • zombie — number of processes waiting for the parent process to complete.

Third Line — CPU Usage

Third line of top CPU usage statistics

  • us — percentage of CPU used by user processes.
  • sy — percentage of CPU used by system processes.
  • ni — percentage of CPU used by processes with modified priority (nice).
  • id — percentage of CPU idle time.
  • wa — percentage of time CPU waits for I/O operations to complete.
  • hi — Hardware IRQ (hardware interrupts).
  • si — Software Interrupts.
  • st — Steal Time — CPU resources "borrowed" by the hypervisor for other tasks. Equals zero on physical servers.

Fourth and Fifth Lines — Memory and Swap

Memory and swap Memory usage information

Values are shown in order:

  • total — total amount of memory.
  • used — used.
  • free — free.
  • buffers — cache and buffers.

Sorting and Customizing the Table

By default, the table is sorted by CPU usage (%CPU).

Hotkeys for sorting:

  • Shift+M — sort by memory (%MEM).
  • Shift+T — sort by process runtime (TIME+).
  • Shift+N — sort by PID.
  • Shift+P — return to sorting by CPU.

Adding Additional Columns

Not all sorting options are available through hotkeys. For example, to identify processes with the highest SWAP usage, use the field selection menu.

  1. Press Shift+F to open the field selection menu.

Field selection menu in top Field selection menu

  1. Use the navigation keys to select SWAP (or another parameter).
  2. Press d to add it to the table (an asterisk "*" will appear next to it).
  3. To sort by the selected field, press s.
  4. Press ESC to exit the menu.
  5. Press x to highlight the column with the selected parameter in bold.

Sorting by SWAP Table with added SWAP column

Help

If you have any questions or need assistance, please contact us through the ticket system — we're always here to help!

Need help?Our engineers will help you free of charge with any question in minutesContact us