Atop is a monitoring tool which is mainly developed for command-line usage. It is capable of showing detailed information about the process, memory, disk network information, and metrics. Atop commands provides more details than popular top command.
atop Command Syntax
We will use following syntax for
atop Command Help
Help information like flags, options can be listed with
$ atop -h
Atop can be started just issuing
atop command. But to get more detailed information and metrics about different subsystem usages providing root privileges are a better way.
$ sudo atop
As we can see from the screenshot the information provided is more than we may want the terminal screen fills up with monitoring information. We will look at how to show specific information about CPU, process, network, disk memory, etc.
Display CPU Usage
We can display CPU related information with
c shortcut after atop started. This will list processes according to their CPU usage with their PID’s and full command line with parameters and options.
$ atop -c
Display Memory Usage
We can show memory usage with
m shortcut. This will list information like PIC, minimum and maximum fault numbers, vstext, vsize,rsize,vgrow, rgrow, running user ID, effective user ID , memory usage, and command.
Display Disk Utilization
Another usage type of disk utilization. We will use –
d option for this.
$ atop -d
We can see that disk utilization of the each process is show separately. Each process disk metrics like
RRDSKshows read disk
WRDSKshows write disk
DSKshows general disk usage
CMDshows related command
Display Process Information In Cumulative Manner
Process information can be listed with –p option. This will also show other metrics about the disk, network, and memory.
$ atop -p
SYSCPUshow system side CPU usage
USRCPUshows user side CPU usage
VSIZEshows virtual memory size
RSIZEshows real memory size
RDDSKshows disk read
WRDSKshows disk write
RNETshows network receive
SNETshows network send
CPUshows shortcutCPU usage percentage
CMDshows related command
Display Process Information In Cumulative Manner According To User
Another useful feature of the atop is showing metrics from the user perspective. This shortcut will sum up all metrics according to the user. We will use –
$ atop -u
Display Network Usage shortcut
Network usage can be displayed with -n option. But there is a dependency for
netatop to probe the network information.
$ atop -n
Show Generic Information
General information about system an process can be listed with
-g option like below.
This will list information like
USR CPUUser level CPU usage
WRDSKWrite to disk
Show All Process
Up to now only active process are shown. We can list all process without filtering them with
$ atop -a
Display Details / Verbose Mode
More details about current windows can be shown with verbose mode. The verbose mode can be call
-v option or
v shortcut after atop starts.
$ atop -v
As we can see from previous screenshot the following information is provided for each process.
PPIDParent Process ID
We can also show a thread-based list. In this view, the Thread ID and related information will be shown. There will be also the process name at the end of the line.
$ atop -y
Write To Log File
atop is a very analytical tool where we can save the monitored values into a file to read in the future. We will redirect into a binary format file with the
-w option. We will name the log file as
$ atop -w /root/atop.raw
Read From Log File
We can also read from a log file too. This will be beneficial If we need to investigate a past event for a specified time. We will use
-r and the log file name which is
atop.raw in this case.
$ atop -r /tmp/atop.raw
Set Global Configuration
If we generally need to use specific options we can specify them in a global configuration file which will effect for each
atop run. We will use
Set User Based Configuration
We can also set user level configuration which will overload global configuration if defined. This configuration file is located