How to monitor the usage of system resources over a period of time using atop

Have more questions? Submit a request

Applicable to:

  • SolusVM
  • SolusVM 2

Question

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

Answer

I. Installation & setup

  1. Connect to the Management node or Compute Resource via SSH.

  2. Install the atop package:

    • on CentOS/RHEL-based distributions:

      # yum install atop
    • on Debian/Ubuntu-based distributions:

      # apt-get install atop
  3. Set the 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
  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:

    • t - move forward

    • Shift + t - move backward

    • r - reset all counters

      Note: See this atop man page to learn more about atop hotkeys.

    To disable atop, run:

    # service atop stop

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

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

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.