VPS diagnostics using atop

VPS diagnostics using atop

Autor: HostZealot Team
2 min.

If you want to monitor the load of your virtual private server on Linux, then you should pay attention to atop. This utility is recognized by many experts as one of the most functional and easy to use! Although, when getting to know atop, how to use it is still the main question. This article will help you figure it out!

Was werden Sie in diesem Artikel erfahren?

What is atop?

The atop utility is a Linux-based program that monitors the load on servers at the moment and simplifies its administration. It is regularly updated and the latest version available is from December 2020. But remember: it only works over SSH. However, this is more than offset by the pluses of atop:

  • Processor, RAM, hard disk and network monitoring;

  • Percent indication of the load for each processed process;

  • Displaying the load by block devices and network interfaces;

  • Writing all information about changes to a log file in binary format;

  • Creation of snapshots of changes at specified intervals.

How to install atop?

Before describing how to use atop, let's understand how to install it and how to configure it. There is nothing difficult about this:

1. For Debian/Ubuntu:

  • Install: apt-get install atop

  • Launch: /etc/init.d/atop start

  • Auto launch: update-rc.d atop defaults

2. For CentOS:

  • installing EPEL repository: yum install epel-release

  • install atop: yum install atop

  • start: systemctl start atop

  • autostart: systemctl enable atop

Next, it remains to refer to the atop configuration file, which indicates the interval between the created load snapshots (in seconds), the path to the logs, the backup storage period (in days):


  • LOGPATH = "/ var / log / atop"

  • keepdays = N

vps diagnostics using atop

How to use atop?

When you run the program, a split-screen appears in 2 parts. In the first screen, you will see data about the system, in the second - about active processes. Let's move on to the hotkeys that are most often needed when using atop and the atopsar log analyzer. They change the view of the screen, building active processes according to one or another attribute:

  • m: by the memory allocated to the processes;

  • d: by loading each process of the hard disk;

  • n: by distribution between network processes (patch required);

  • v: details about each process (user and start time);

  • u: from the most resource-intensive processes to the least;

  • g: return to the original display.

If you need not real-time data, but in a record of the past, then use the following command:

atop -r path to log file

The entire history is shown by default. But you can set the desired period of time in the command. To do this, add the following command after the log, where instead of YYYYMMDD specify the date, and instead of nn - hours, minutes and seconds:

/ atop_ YYYYMMDD -b nn: nn: nn -e nn: nn: nn

Press t to move forward between images, shift + t to return to the past. By default, the utility takes snapshots after 10 minutes, but you can change the period with the following command (NN is the number of seconds):

# atop -a -w /var/log/atop.log NN

If you have questions about VPS diagnostics, then such competent and attentive support as in HostZealot is what you might've been looking for. We will always tell you how to use atop or how to connect to servers via RDP, but most importantly, they will offer you a reliable hosting of your site!

Verwandte Artikel