Innovate | Connect | Transform
ContactService statusUSD $

GICT knowledge base

How to Install ‘atop’ to Monitor Real-Time System Performance

Published

System Administration

System performance monitoring helps keep Linux computers running well. When your server slows down or applications lag, you need tools to find the problem. Atop is one such tool that watches your system and shows what’s happening with your computer’s resources.

What is atop?

Atop is a monitoring program for Linux systems. It shows how your computer uses its processor, memory, disk, and network. The tool displays this information on your screen and saves it for later viewing.

Most monitoring tools only show what’s happening right now. Atop is different because it records everything. If your server had problems yesterday, you can use atop to see what went wrong. This makes fixing problems much easier.

The program watches all parts of your system. It tracks every program running on your computer. It measures how much processor time each program uses. It counts how much memory programs need. It records disk and network activity too.

Why Use atop?

System administrators choose atop for several reasons. First, it saves historical data automatically. You don’t need to watch your screen all day. Atop records everything in the background.

Second, atop catches short-lived programs. Some programs run for just a few seconds. Other monitoring tools might miss these programs. Atop sees them and records their activity.

Third, atop shows both system-wide and program-specific information. You can see total CPU usage and which programs use the most CPU. This complete view helps you understand performance problems better.

Fourth, the tool uses few system resources. It won’t slow down your computer while monitoring. This matters on busy servers where every bit of performance counts.

System Requirements

Atop runs on almost any Linux system. It works on:

  • Ubuntu
  • Debian
  • CentOS
  • Red Hat
  • Fedora
  • Other distributions

The program needs very little to run properly. Your computer needs about 50 megabytes of free disk space for installation. Atop also needs space to store its log files. Plan for about 10 to 20 megabytes per day of logs. A month of logs might use 300 to 600 megabytes.

The program uses less than 1 percent of your processor time. It needs about 10 megabytes of memory. These small requirements mean atop works well even on older computers.

Installing on Ubuntu and Debian

Ubuntu and Debian users can install atop easily. Open a terminal window and type these commands:

sudo apt update
sudo apt install atop

The first command updates your package list. The second command installs atop. Your system will download the program and set it up automatically.

After installation, atop starts working right away. It begins collecting data every 10 minutes. You don’t need to configure anything to get started.

To check if atop is running, type:

sudo systemctl status atop

This command shows whether atop is active and collecting data.

Installing on CentOS and RHEL

CentOS and Red Hat systems need an extra step. First, enable the EPEL repository. This repository contains atop and other useful programs.

For CentOS 7 and RHEL 7, type:

sudo yum install epel-release
sudo yum install atop

For CentOS 8, RHEL 8, and newer versions, use:

sudo dnf install epel-release
sudo dnf install atop

After installation, start the atop service:

sudo systemctl enable atop
sudo systemctl start atop

The enable command makes atop start automatically when your computer boots. The start command begins data collection immediately.

Installing on Fedora

Fedora includes atop in its standard repositories. Installation is simple:

sudo dnf install atop

Fedora automatically sets up atop to run as a service. It starts collecting data immediately after installation.

Installing from Source Code

Sometimes you need the newest version of atop. Or your Linux distribution might not have atop packages. In these cases, install from source code.

First, install the tools needed to compile programs:

For Ubuntu and Debian:

sudo apt install make gcc zlib1g-dev

For CentOS and RHEL:

sudo yum install make gcc zlib-devel

Next, download and compile atop:

wget https://www.atoptool.nl/download/atop-2.9.0.tar.gz
tar xvf atop-2.9.0.tar.gz
cd atop-2.9.0
make
sudo make install

These commands download atop, extract the files, compile the program, and install it on your system.

Basic Configuration

Atop works well with default settings. But you might want to change some options. The configuration file is located at /etc/default/atop on Ubuntu and Debian. On CentOS and RHEL, look for /etc/sysconfig/atop.

To edit the configuration:

sudo nano /etc/default/atop

Important settings include:

  • INTERVAL controls how often atop saves data. The default is 600 seconds (10 minutes). Shorter intervals give more detail but use more disk space.
  • LOGGENERATIONS sets how many days to keep log files. The default is 28 days. Adjust this based on your disk space.
  • LOGPATH specifies where to save log files. The default is /var/log/atop.

After changing settings, restart atop:

sudo systemctl restart atop

Using atop for Real-Time Monitoring

Start atop by typing its name in a terminal:

atop

The screen shows system information at the top and process details below. The display updates every 10 seconds by default.

To update every second:

atop 1

To update every 5 seconds:

atop 5

Understanding the Display

The atop screen has two main parts. The top shows system-level information. The bottom lists individual processes.

System information includes:

  • PRC shows process totals. It tells you how many processes are running, sleeping, or stopped.
  • CPU displays processor usage. You see percentages for system, user, and idle time.
  • CPL shows load averages. These numbers indicate how busy your system is.
  • MEM displays memory usage. You see total memory, used memory, and free memory.
  • SWP shows swap space usage. Swap is disk space used when memory runs low.
  • DSK displays disk activity. You see read and write speeds.
  • NET shows network traffic. You see data sent and received.

Process information includes:

  • PID is the process identification number. Each running program has a unique PID.
  • SYSCPU shows system CPU time used by the process.
  • USRCPU shows user CPU time used by the process.
  • VGROW indicates virtual memory growth since the last update.
  • RGROW shows resident memory growth since the last update.
  • RDDSK displays disk reads by the process.
  • WRDSK shows disk writes by the process.
  • CMD is the command name or program name.

Keyboard Commands

While atop is running, press keys to change the display:

  • Press g for generic output. This shows basic process information.
  • Press m for memory details. Processes are sorted by memory usage.
  • Press d for disk activity. Processes are sorted by disk usage.
  • Press n for network information. This shows network statistics per process.
  • Press c to see full command lines. This helps identify specific program instances.
  • Press t to toggle between threads and processes. Threads are sub-parts of programs.
  • Press a to switch between current and average values.
  • Press q to quit atop.

Viewing Historical Data

Atop saves data in files under /var/log/atop/. Each day gets its own file. File names include the date, like atop_20250918 for September 18, 2025.

To view historical data:

atop -r /var/log/atop/atop_20250918

This opens the log file from September 18, 2025. You can browse through the day’s data.

While viewing historical data:

  • Press t to move forward 10 minutes
  • Press T to move backward 10 minutes
  • Press b to jump to a specific time. Enter the time as HH:MM

To view data from 2:00 PM to 3:00 PM:

atop -r /var/log/atop/atop_20250918 -b 14:00 -e 15:00

Finding Performance Problems

High CPU Usage

When your system runs slowly, check CPU usage first. Start atop and press s to sort by CPU usage. Look for processes using more than 50 percent CPU continuously.

Check the CPU line at the top. If it shows high percentages, your processor is working hard. Look at individual CPU cores too. Sometimes one core does all the work while others sit idle.

Programs that calculate or process data use lots of CPU. Web servers, databases, and video encoding programs are common culprits. If a program uses too much CPU, you might need to optimize it or upgrade your processor.

Memory Problems

Press M to sort processes by memory usage. Look for programs using gigabytes of memory. Check the MEM line to see total memory usage.

Watch for programs whose memory usage keeps growing. This might indicate a memory leak. The program forgets to free memory it no longer needs.

If the SWP line shows activity, your system is using swap space. This means you’re running out of RAM. Adding more memory or closing programs can help.

Disk Bottlenecks

Press d for disk information, then D to sort by disk activity. Look at the DSK line for overall disk usage. If it shows 100 percent busy, your disk is overwhelmed.

Programs that read or write large files cause disk bottlenecks. Databases, backup programs, and video editors often stress disks. Consider using faster disks or spreading work across multiple disks.

Network Issues

Press n to see network statistics. Check for high packet rates or bandwidth usage. Look for errors or dropped packets. These indicate network problems.

Programs that transfer lots of data use network bandwidth. File transfers, streaming services, and cloud backups are common bandwidth users. Upgrading network equipment or limiting transfer speeds might help.

Creating Reports

Atop includes a reporting tool called atopsar. It creates summaries from log files.

To create a full report for September 18, 2025:

atopsar -A -r /var/log/atop/atop_20250918

This shows CPU, memory, disk, and network statistics for the entire day.

For specific information:

atopsar -c -r /var/log/atop/atop_20250918

This shows only CPU information.

atopsar -m -r /var/log/atop/atop_20250918

This shows only memory information.

atopsar -d -r /var/log/atop/atop_20250918

This shows only disk information.

Managing Log Files

Atop creates new log files daily. Old files accumulate and use disk space. Set up automatic cleanup to manage these files.

Check your current log files:

ls -lh /var/log/atop/

This shows all atop log files and their sizes.

To manually delete old files:

sudo find /var/log/atop/ -name "atop_*" -mtime +30 -delete

This removes files older than 30 days.

For automatic cleanup, atop includes a rotation script. It runs daily and removes old files based on your configuration. Check the LOGGENERATIONS setting in your atop configuration file.

Conclusion

Atop is a powerful monitoring tool for Linux systems. It combines real-time monitoring with historical data collection. This combination helps you solve performance problems quickly.

Installing atop takes just a few commands. The default configuration works for most systems. Basic commands let you start monitoring immediately.

Regular use of atop helps you understand your systems better. You’ll spot problems before they become critical. You’ll make better decisions about upgrades and optimizations.

Start with simple monitoring tasks. Check CPU and memory usage daily. Look at historical data when problems occur. Gradually explore advanced features as you gain experience.

Remember that atop is one tool among many. It excels at comprehensive system monitoring. Combine it with other tools for complete system management. Together, these tools help you maintain reliable, efficient Linux systems.

Related guides

Account services are unavailable until the production backend is configured.