Cobra Forum

Plesk Panel => Others => Topic started by: mahesh on Jan 23, 2025, 05:50 AM

Title: How to monitor usage of system resources in a period of time using atop
Post by: mahesh on Jan 23, 2025, 05:50 AM
Question
How to monitor the usage of system resources in a period of time using atop?

Answer
I. Installation & setup

1.Connect to the Plesk server via SSH.

2.Install the atop package:

#yum install atop
#apt-get install atop
3.Set monitoring interval to 60 seconds (the default value is 600 seconds):

#sed -i 's/600/60/' /etc/sysconfig/atop
#sed -i 's/600/60/' /etc/default/atop
4.Start the atop service:

#service atop restart
Note: On Debian/Ubuntu-based distributions, atop automatically creates a cron task that starts logging automatically at midnight if it is not running.

 

II. Usage

1.List generated atop logfiles:

#ls -l /var/log/atop/
2.To view the collected data, run:

#atop -r /var/log/atop/atop_*****
where atop_***** is a file name from step 1.

3.To switch between the intervals, use the hotkeys:


Note: To learn more about atop hotkeys, see this atop man page.

 

To disable atop, run:

#service atop stop
On Debian/Ubuntu-based distributions:, remove the atop cron task:

#rm -f /etc/cron.d/atop