atop

The program atop is an interactive monitor to view the load on a Linux system.

To install on Ubuntu/Debian

apt-get install atop

On CentOS/RHEL

yum install atop

On CentOS, you will need epel repo enabled.

View Historical Data

One of the powerful features of atop is its ability to record and store detailed snapshots of system performance, allowing you to go back and review exactly how resources were used at any given time. This is invaluable for diagnosing past performance issues, investigating system load patterns, and understanding resource usage over time. With atop’s logging capabilities, you can access historical data quickly and analyze it interactively, just as if you were viewing real-time activity.

Atop stores its log files by default in the /var/log/atop/ directory, with filenames that include the date (formatted as atop_YYYYMMDD), making it easy to locate and access historical performance data for specific days.

To view past data with atop, use the replay mode by running the following command:

atop -r

This will open today’s log file in replay mode. If you need older logs, you can specify the log file with -r option.

atop -r /var/log/atop/atop_YYYYMMDD

Replace YYYYMMDD with the desired date to load the log file for that day.

Once in replay mode, you can navigate through the data using keyboard shortcuts t and T to jump forward or backward in 10-minute intervals, and b or e to jump to the beginning or end of the log. This lets you explore historical resource usage interactively, just as you would with real-time data.

Back to Linux Commands

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *