atop - Analyze Linux Server Performance

The "atop" is an advanced system and process monitor used in the Linux environment to analyze the server performance. It is necessary to analyze the performance of the server continuously.

It is a performance monitor which gives us a report on all the activities of processes running on a server.

Installation of Atop:

For Debian/Ubuntu, use the following command to install,

$ apt install atop

For RHEL/CentOS/Fedora, use the following command to install,

$ yum install atop

Starting Atop:

To start Atop, use the following command,

$ atop

Other key combinations

Some of the other commands are explained below:

Command Description
atop -1: This command is used for displaying average-per-second total values.
atop -a: This command is used for displaying only the processes which are active.
atop -c: This command is used to launch the command line per process.
atop -d: This command is used for displaying disk info.
atop -m: This command is used for displaying memory info.
atop -n: This command is used for displaying network info.
atop -s: This command is used for displaying scheduling info.
atop -v: This command is used for displaying various info like ppid, user, time, etc.
atop -y: This command is used for launching with individual threads.

The output of ATOP:

The whole layout can be divided into two sections. The upper section provides the cumulative statistics and the lower section about system resources used by each process. Let us see in detail the parameters in the output of the atop command.

The whole layout can be divided into two sections. The upper section provides the cumulative statistics and the lower section about system resources used by each process. Let us see in detail the parameters in the output of the atop command.

Cumulative statistics

The cumulative statistics section contains the statistics related to process, performance, memory, disk, and network.

Let us see each section separately and the parameters in it.

a.) Process-related Statistics

The first line of the output explains the process and displays the statistics on the time consumed by the total number of processes and other parameters. Let us see ‌the parameters displayed in the output.

This is how the process related statistics parameters were displayed in the terminal. Let us see the abbreviations and explanation of the parameters below:

PRC - Short for “Process”.

  1. sys - The time consumed by the system.
  2. user - The time consumed by the user.
  3. #proc - The total number of processes.
  4. #tslpi - The number of threads that are currently sleeping and interruptible.
  5. #tslpu - The number of threads that are currently sleeping and uninterruptible
  6. #zombie - The number of zombie processes.
  7. #exit - The number of processes that ended during the elapsed time.

b.) Performance-related Statistics

The second and third line of the output, which starts with CPU and CPL, displays us with the performance-related statistics like the CPU percentage, waiting time., etc. The parameters displayed in the output are explained ‌below.

CPU - Denotes the CPU Utilization.

  1. sys, user - The percentage of utilization of the cores by the system and user.
  2. irq - Percentage of CPU used for interrupt requests.
  3. idle - Idle percentage of all the cores.
  4. wait - The waiting time each CPU core needs to do.
  1. CPL - Denotes the CPU Load.
  2. avg1, avg5, avg15 - Average loads with periods of duration like 1, 5, and 15 minutes.
  3. csw - Represents the context switches.
  4. intr - Denotes the number of interrupts.
  5. numcpu - Denotes the number of CPUs.

c.) Memory-related statistics

The MEM line in the command window shows us the memory-related statistics, which include the free memory, used memory, total amount of memory available, etc..

We can see that the memory related statistics parameters are displayed above. Let us see the abbreviations and explanation of the parameters below.

MEM - Stands for Memory Utilization.

  1. tot - Represents the total physical memory supported.
  2. free - Represents the memory that is free currently.
  3. cache - Represents the cached memory.
  4. buff - Represents the amount of memory consumed in filesystem metadata.
  5. slab - Represents the sum of memory for kernel’s memory allocation.
  6. SWP - Represents the Swap Memory.

d.) Disk-related statistics

The usage of the disk, the number of reading and writing requests., etc are all displayed in this section. We can see that the Disk related statistics parameters are displayed below. Let us see the abbreviations and explanation of the parameters as follows.

DSK - Represents the disk usage.

  1. busy - Represents the percentage of time the system is busy handling the requests it receives.
  2. read - Represents the reading requests issued.
  3. write - Represents the writing requests issued.
  4. MBr/s - Represents the rate at which data is read per request in megabytes(MB).
  5. MBw/s -  Represents the rate at which data is written per request in megabytes(MB).
  6. avio - Represents the average number of milliseconds spent handling the requests.

e.) Network-related statistics

The network-related statistics section reports us the network statistics from the transport and the network layer.

The transport layer statistics report is displayed below.

i.) NET | transport

  1. transport - Denotes the transport layer, which is one layer in the OSI model, which manages the delivery of data packets.
  2. tcpi - represents the number of segments received by the system.
  3. tcpo - represents the number of segments transmitted.
  4. udpi , udpo - stands for UDP in and UDP out.
  5. tcpao - Represents the number of TCP open connections which are active.
  6. tcppo - Represents the number of TCP open connections which are passive. Opposite to tcpao.

ii.) NET | network - Represents the network statistics at the network layer.

  1. network -  Denotes the network layer which is also one of the layers in the OSI model, which deals with the transmission of data.
  2. ipi - Denotes the number of IP packets received by network interfaces.
  3. ipo - Denotes the number of IP packets transmitted out by network interfaces.
  4. ipfrw - Representation of quantity of IP packets forwarded to other interfaces.
  5. deliv - Denotes the number of IP packets delivered successfully.
  6. icmpi ,icmpo - Representation of the ICMP packets received and transmitted by the network interfaces.

iii.) NET | wlp0s20

  1. wlp0s20 - Represents the name of the interface.
  2. pcki, pcko - Represents the packets received and transmitted by a particular interface.
  3. sp - Represents the network speed.
  4. si, so - Represents the rate at which bits are transmitted and received.
  5. erro - Represents the number of errors in the packet received.

System resource consumed by each process

Let us see what are the parameters in the system resource consumed section explain to us in detail.

System resource consumed by each process
  1. PID - represents the process ID.
  2. SYSCPU - represents the amount of CPU consumed during system handling.
  3. USRCPU - represents the amount of CPU consumed during user mode.
  4. VGROW - represents the amount of virtual memory that the process has occupied since the last update.
  5. RGROW - represents the amount of physical memory gained since the last update.
  6. RUID - represents the real user ID.
  7. EUID - represents the effective user ID.
  8. ST - represents the current status of the process.
  9. EXC - represents the exit code once the process gets terminated.
  10. THR - denotes the number of threads within the process.
  11. S - represents the current status of the primary thread in the process.
  12. CPU - denotes the percentage of utilization of CPU for the whole process.
  13. CMD - Indicates the name of the process.

Advantages of using Atop

Atop is a performance monitor which records resource usage data for analysis. Now let us see the advantages of Atop.

  • It gives attention only to threads that are in the process and ignores the processes which are not in use.
  • We can get the report on the usage of resources for all the processes such as running, completing, or even closing.
  • The report of the Atop includes the detail on Disk I/O and network utilization.
  • The critical resources are highlighted using the color red which makes them stand out from others and paves the way for the useful and easy way of finding out the critical resources and keeping track of them.
  • Even if the size of the display window changes, it adds and removes columns automatically according to its size.

Conclusion

The topics we have discussed in this blog are:

  1. Installation of the system and the key combinations to be used.
  2. The detailed information about the statistics generated by atop, the command for monitoring the performance of a Linux system.
  3. Finally, the advantages of the atop command.

There are other commands like htop, top and iotop, which are more preferably used by Linux users to monitor the processes in the Linux System to analyze the resource usage and reduce the slowness of the system. And these commands are mostly practiced by Linux users.

ATOP, ‌if mastered, has its own advantages and can be helpful in monitoring the system resources of the Linux system like the other mostly used commands.


Monitor Your Entire Application with Atatus

Atatus is a Full Stack Observability Platform that lets you review problems as if they happened in your application. Instead of guessing why errors happen or asking users for screenshots and log dumps, Atatus lets you replay the session to quickly understand what went wrong.

We offer Application Performance Monitoring, Real User Monitoring, Server Monitoring, Logs Monitoring, Synthetic Monitoring, Uptime Monitoring and API Analytics. It works perfectly with any application, regardless of framework, and has plugins.

Atatus can be beneficial to your business, which provides a comprehensive view of your application, including how it works, where performance bottlenecks exist, which users are most impacted, and which errors break your code for your frontend, backend, and infrastructure.

If you are not yet a Atatus customer, you can sign up for a 14-day free trial .