Basic atop Usage
Oct 26, 2016 · 2 minute readCategory: monitoring
What is atop?
Taken from the man page:
The program atop is an interactive monitor to view the load on a Linux system. It shows the occupation of the most critical hardware resources (from a performance point of view) on system level, i.e. cpu, memory, disk and network.
Raw Data Format
The raw data format is a binary log file that atop can be configured to record. This log file can be generated for any length of time and allows you to go back in time to debug system performance issues.
Setup
You can install atop from most Linux repos or download it directly from their site.
In order to gain the benefits of the binary log file you can either configure atop to generate this on an ongoing basis or you can run atop with the following command. This command would be most useful for debugging easily repeatable bugs / issues.
atop -w <log file path>
To configure atop for ongoing log generation you need to point a cron job at atop.daily
0 0 * * * root /etc/atop/atop.daily
NOTE: this file seems to be missing from both Fedora and Centos when atop is installed from the repos. I’m still looking into a fix for this.
atop will write it’s log files to:
/var/log/atop/atop_YYYYMMDD
To read these log files use:
atop -r <log file path>
Basic Usage
For more detailed usage info I recommend you check out the very detailed man page.
- ? – help
- g – Generic output
- m – Memory output
- d – Disk output
- n – Network output
- c – Show commandline of the process
- u – Show activity by user
- p – Show cumulative activity per program
- z – Freeze the output
When viewing a binary log:
- t – View next sample
- T – View previous sample
- r – Rewind to the beginning