While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.
The atop command is a tool for monitoring system resources in Linux. It displays tons of information related to the amount of load on the system’s resources at the process level. There can be indefinite advantages to the user if this utility is mastered.
First things first, we have to install the atop command on the system. Debian/Ubuntu users can do so by:
sudo apt install atop
Other Linux users can use their standard package manager, followed by the
This command has the ability to display multiple confidential information related to the system. In order to prevent any data abstraction, we can get elevated access using
'sudo su' or
'sudo -s'. We have complete documentation on sudo.
To display all the process-level use of the system’s resources, we can simply run
'atop' in the terminal.
As we can see, the whole layout is divided into two panels. The upper panel provides the cumulative use of the system’s resources, whereas the bottom one, displays disintegrated information for each process. Let’s see each of the
Each entry in this view, focuses on a particular system resource.
'#tslpi'denotes the number of threads that are currently sleeping and interruptible.
'#tslpu'denotes the number of threads that are currently sleeping and uninterruptible.
'guest'denotes the guest-percentage, which is the CPU time spent on other virtual machines.
'atop'displays the above statistics for each core independently.
MEM - Memory Utilization
The total physical memory supported.
The memory currently free.
The current cache memory.
'buff' as in “buffer” is the amount of memory consumed in filesystem meta-data.
The sum of memory for kernel’s memory allocation shown as
The amount of shared memory.
SWP - Swap Memory.
'transport'signifies the Transport layer in Networking, which deals with the data protocols.
'udpi'for UDP in) and (
'udpo'for UDP out).
'tcpao'is the number of active TCP open connections.
'tcppo'is the number of passive TCP connections, but still open.
'network'signifies the Network Layer, which deals with Internet Protocols, IPv4 and IPv6 combined.
This concludes the explanation of the top panel of the atop command.
It is worth noticing that the values in
'atop' command keeps updating after certain time intervals.
The generic output of the
'atop' command displays the following details for each process entry:
In this generic output, the processes are sorted on the basis of percentage CPU utilization. As we can see, in this particular output, we get small amount of information for every type of system resource.
Let us try to study process-level information for each type of system resource.
'atop' command provides the opportunity to study the memory consumption for each process running in the system. We can do so by running:
As we can see, the top panel remains constant even if we added the memory option,
'-m'. Let us now understand the columns for each process entry.
The processes are sorted with respect to the
'atop'is somewhat an interactive command utility, we can alter the columns from within itself. All we have to do is type the specific option while it is displaying information.
For instance, after running
'atop'on the terminal, we can switch to memory-specific output by just typing
To extract information related to disk utilization, we can use the
'-d' option along with
There is not a lot of stuff to notice in the disk-specific output. Some of the key findings are:
It must be noted that, the processes are sorted on the bases of
This gives us the commands that are running in the background as processes in a command-line output format.
If you copy-paste the lines under the command line column, you can re-run the same process. This output tells us exactly what command was run in the background to initiate the process.
Instead of just inspecting process information,
atop command provides the ability to check for thread-specific resource utilization. To access this output we can either run:
or just press
'y' key when the command is already displaying system resource information.
It is clear that none of the system resource columns have changed. All that has been added is the thread count of their respective process.
There can numerous kinds of information that can be extracted using the
'atop' command. Some of the useful ones are:
'-v' option, we can get process characteristics.
This specific kind of information comes under scheduling characteristics for a process. It can be accessed by using
There are certain
'atop' command tricks that might be useful:
'atop'screen - using
i'key followed by the number of seconds, we wish to change it to.
We know that
'atop' command can be too much to handle for any Linux user. It takes patience and perseverance to learn about this brilliant command. For any queries, feel free to ping us down in the comments section.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Click here to Sign up and get $200 of credit to try our products over 60 days!