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!
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:
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:
2. For CentOS:
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):
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:
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!