We’re all familiar with top, a real-time system monitor. Some prefer htop and previously, I mentioned iotop for use with storage read/write monitoring. Let’s looks at another popular tool for Linux server performance analysis: atop.
Atop is an ASCII full-screen performance monitor which can log and report the activity of all server processes. One feature I really like is that atop will stay active in the background for long-term server analysis (up to 28 days by default). Other advantages include:
Once atop is launched, by default, it will show system activity for CPU, memory, swap, disks, and network in 10-second intervals. In addition, for each process and thread, you can analyze CPU utilization, memory consumption, disk I/O, priority, username, state, and even exit codes.
By default after install the atop daemon writes snapshots to a compressed log file (eg. /var/log/atop/atop_20140813). These log files can be read using: