Apps Artificial Intelligence CSS DevOps Go JavaScript Laravel Linux MongoDB MySQL PHP Python Rust Svelte Vue

Read and Use `top` on Linux

1 min read .
Read and Use `top` on Linux

top is a standard Linux tool for viewing system load and processes in real time. It is useful when diagnosing high CPU use, memory pressure, runaway processes, or general server load.

Start top

top

The display has a system summary at the top and a process table below it.

Read the System Summary

Common fields include:

  • uptime — how long the system has been running;
  • load average — average runnable/uninterruptible work over roughly 1, 5, and 15 minutes;
  • tasks — running, sleeping, stopped, and zombie processes;
  • CPU — time spent in user, system, idle, I/O wait, and other states;
  • memory and swap — total, free, used, and cache-related values.

A load average is not a CPU percentage. Interpret it relative to the number of logical CPUs and the type of workload.

Read the Process Table

Important columns commonly include:

  • PID — process ID;
  • USER — owner;
  • PR / NI — scheduling priority and nice value;
  • VIRT — virtual address space;
  • RES — resident memory currently held in RAM;
  • %CPU and %MEM — resource usage;
  • TIME+ — accumulated CPU time;
  • COMMAND — process name or command.

Useful Interactive Keys

Inside top:

  • P sorts by CPU usage;
  • M sorts by memory usage;
  • T sorts by accumulated CPU time;
  • k prompts for a PID and signal;
  • r changes a process nice value;
  • d changes the refresh delay;
  • f selects displayed fields;
  • h shows help;
  • q quits.

Available keys can differ slightly between implementations, so the built-in help is authoritative for the installed version.

Save Configuration

Many procps-ng versions of top let you press W to write the current configuration to a user config file, commonly under ~/.config/procps/ or a legacy ~/.toprc location depending on the version.

Conclusion

top gives a fast real-time view of system and process activity. Learn the CPU, load, memory, and process columns first, then use its sorting and filtering controls to narrow down the source of resource problems.

Related Posts

chevron-up