How to monitor usage of system resources in a period of time using atop?

Started by Administrator, Dec 29, 2022, 07:04 AM

Previous topic - Next topic

Administrator

Question
How to check what process loads CPU, memory and other system resources in a period of time using atop utility?

Answer
Connect to the server via SSH

Install atop package:
For RHEL/CentOS :
Quote# yum install epel-release

# yum install atop
For Debian/Ubuntu :
Quote# apt-get install atop
Start atop service to begin automatic system resources logging:
Quote# systemctl start atop
Adjust interval to the preferences:
For RHEL/CentOS :

Open the file /etc/sysconfig/atop and modify the line and set required interval (in seconds):
INTERVAL=60

For Debian/Ubuntu :
For atop version 1.23 and lower:

Open the file /etc/init.d/atop (or /etc/default/atop, or /usr/share/atop/atop.daily) and modify the line and set required interval (in seconds):
INTERVAL=60

Starting from atop version 1.24
Open the file /etc/atoprc and add the following line
interval 60
Once the file is adjusted, restart the atop service:
Quote# systemctl restart atop
Logged data might be opened via the command:
Quote# atop -r /var/log/atop/atop_*****
Replace *** with actual log value (date).
To move between intervals use arrow buttons or hotkeys t and Shift+T
To disable atop use the following commands:
Quote# mv /etc/cron.d/atop /root/atop
Quote# systemctl stop atop