Applicable to:
- Plesk for Linux
Question
How to monitor and analyze the usage of system resources (CPU, Memory, Disk) in a period of time using atop?
Answer
- Connect to your Plesk server via SSH.
- Install the
atoppackage:-
on CentOS/RHEL-based distributions:
# yum install atop
-
On AlmaLinux 10,
atopis not available for installation viadnfat the moment. Install it manually using the steps below:2.1. Download the package:
# wget https://dl.fedoraproject.org/pub/epel/10/Everything/x86_64/Packages/a/atop-2.11.1-1.el10_1.x86_64.rpm
2.2. Install it:
# rpm -Uvh atop-2.11.1-1.el10_1.x86_64.rpm
-
-
on Debian/Ubuntu-based distributions:
# apt-get install atop
-
- Set monitoring interval to 60 seconds (the default value is 600 seconds).
If you need to track short-term events, setting the value to 10 seconds is recommended to collect more detailed information:-
on CentOS/RHEL-based distributions:
# sed -i 's/600/60/' /etc/sysconfig/atop
-
on Debian/Ubuntu-based distributions:
# sed -i 's/600/60/' /etc/default/atop
-
On Debian 10,
/etc/default/atopis empty by default. Run the command below to addLOGINTERVALline:# echo 'LOGINTERVAL=60' >> /etc/default/atop
-
On Ubuntu 20, atop uses
/usr/share/atop/atop.daily. Change theLOGINTERVALvalue using the command:# echo 'LOGINTERVAL=60' >> /usr/share/atop/atop.daily
-
-
-
Start the atop service:
# systemctl restart atop
Note: On Debian/Ubuntu-based distributions, atop automatically creates a cron task that starts logging automatically at midnight if the service is not running.
-
List generated atop logfiles:
# ls -l /var/log/atop/
-
To view the collected data, run:
# atop -r /var/log/atop/atop_20250718
where atop_20250718 is a file name from step 1 with the start date of the log.
-
To switch between the intervals and sort, use the hotkeys:
- t - move forward in time
- Shift + t - move backward in time
- g - go to a specific time (eg 12:00)
- b - go to a specific date and time (Enter time format [YYYYMMDD]hhmm[ss])
- d - sort by disks
- m - sort by memory
- n - sort by network
- c - sort by processes with full path
- r - reset all counters
- q - exit
Note: To learn more about atop hotkeys, see this atop man page.
-
Example and how to analyze:
Main blocks:
Block What it shows PRC (Processes) Total CPU time, number of processes, zombies CPU CPU load: sys, user, idle, irq, wait MEM RAM usage SWP Swap usage DSK Disk load (busy, read, write, latency) NET TCP/UDP network traffic and IP packets PID Process table with details for each How to analyze:
CPU load:
Metric name What it shows idle if <20%, then the CPU is loaded. sys system load (kernel, drivers). If sys >30% - system functions (network operations, I/O) are frequently called. usr If usr >80% a lot of calculations. irq interrupts (if many - problem with devices) wait >20% — CPU is idle waiting for disk or network. (usually slow disk). MEM (Memory):
Metric name What it shows free free (unused) RAM. cache data cached by the system (e.g. files from disk), is good used for speed. slab the kernel allocates for data structures. SWP (Swap):
Metric name What it shows tot Total size of swap partition/file used How much swap is currently in use free Free space in swap DSK (Disk):
Metric name What it shows busy 70% - the disk is actively used. avio (average IO time): >10ms slowdown! avq disk queue, high value means disk overload. NET (Network):
Metric name What it shows tcp/udp active connections. ip in/out useful for traffic estimation. PID table (bottom):
Metric name What it shows MEM the amount of memory occupied. SYSCPU and USRCPU are the CPU load of this process. VGROW / RGROW virtual/real memory growth since the last update (tracks leaks). Analysis result:
- DSK (Busy and AVQ) - A high value of disk queue (AVQ) means that the disk subsystem cannot cope with disk I/O.
- irq 4% - issue with devices (Disk).
- wait 140% - CPU is waiting for IO (usually slow disk).
- sys 99% - System functions (network operations, I/O) are often called. Usually when the disk or network interface cannot handle the load.
- steal >5% - indicates the use of virtualization, your virtual machine wanted to use the CPU, but the hypervisor (e.g. KVM, VMware, Xen) allocated the CPU to another guest (another VM) at that time.
Summary: In this example, the server uses virtualization and has an issue with disk speed. (This may be caused by virtualization host limit settings or competition for resources between virtual machines.)
-
After investigating the metrics, it is recommended that the atop service be disabled to avoid using the server's disk space for logs.
Note: If the data monitoring interval is low, the logs may be large. The server may run out of disk space if the service has been running for a long time.
To disable atop, run:
# systemctl stop atop
On Debian/Ubuntu-based distributions, remove the atop cron task:
# rm -f /etc/cron.d/atop
Comments
Monitoring system resources with atop is a great method for detailed, periodic analysis on Plesk for Linux servers. For installation and setup, you can usually install it via your package manager (like yum install atop or apt-get install atop). For usage and analysis, atop runs as a service to log data; you can then replay logs with commands like atop -r /var/log/atop/atop_YYYYMMDD to analyze CPU, memory, and disk usage for a specific day. Once your server monitoring is set and stable, if you’re looking for a strategic mental break, you might enjoy a game of chess master. Thanks.
Useful guide for anyone managing a Plesk server and trying to diagnose performance issues over time. atop is especially helpful because it records historical CPU, memory, disk, and network usage instead of only showing live stats like top or htop. It’s a great tool for tracking down random spikes, slowdowns, or resource-heavy processes.
Please sign in to leave a comment.