Applicable to:
- Plesk for Linux
Question
How to monitor the usage of system resources in a period of time using atop?
Answer
I. Installation & setup
-
Connect to the Plesk server via SSH.
-
Install the
atop
package:-
on CentOS/RHEL-based distributions:
# yum install atop
-
on Debian/Ubuntu-based distributions:
# apt-get install atop
-
-
Set monitoring interval to 60 seconds (the default value is 600 seconds):
-
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
-
-
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
-
List generated atop logfiles:
# ls -l /var/log/atop/
-
To view the collected data, run:
# atop -r /var/log/atop/atop_*****
where atop_***** is a file name from step 1.
-
To switch between the intervals, use the hotkeys:
-
t - move forward
-
Shift + t - move backward
-
r - reset all counters
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
-
Comments
0 comments
Please sign in to leave a comment.