Building Cloud Expertise with centron - Our Tutorials

Whether you are a beginner or an experienced professional, our practical tutorials provide you with the knowledge you need to make the most of our cloud services.

atop Command: The Ultimate Solution for System Monitoring in Linux

Installation of the atop Command:

First, we need to install the atop command on the system. Debian/Ubuntu users can do this with the following command:

Other Linux users can use their default package manager followed by the keyword ‘atop’.

Basic Output of the atop Command:

To display all process-related information about system resources, simply run ‘atop’ in the terminal.

The output consists of two panels. The upper panel displays the cumulative usage of system resources, while the lower panel provides detailed information for each process.

Cumulative Statistics of the atop Command:

Each entry in this view focuses on a specific system resource.

  1. Process-related Statistics:
    • PRC stands for “Process”.
    • The first two values represent the time consumed by the processes ‘sys’ (System) and ‘user’.
    • Followed by the total number of processes as ‘#proc’.
    • Other values include the number of threads currently running in the system (‘#trun’).
    • ‘#tslpi’ indicates the number of threads currently sleeping and interruptible.
    • ‘#tslpu’ indicates the number of threads currently sleeping and uninterruptible.
    • Zombie processes, number of clone system calls, and number of exited processes (‘#exit’) are also displayed.
  2. Performance-related Statistics:
    • CPU refers to CPU utilization.
    • The first two values show the percentage utilization of all cores by system and user processes.
    • Percentages for interrupt requests (‘irq’), idle, and CPU core wait are also displayed.
    • ‘CPL’ refers to CPU load and shows average loads for different periods.
  3. Memory-related Statistics:
    • MEM stands for memory usage.
    • Various memory information such as total memory, free memory, cache memory, and swap memory are displayed.
  4. Disk-related Statistics:
    • DSK stands for disk usage and shows information such as the percentage time the system spends processing requests, as well as read and write requests.
  5. Network-related Statistics:
    • NET displays network statistics at the transport layer and network layer.

System Resources for Each Process:

The generic output of the ‘atop’ command shows details like PID, CPU usage, virtual and physical memory, data transfers during disk accesses, and more for each process. Processes are sorted by CPU usage.

Memory-based Output of the atop Command:

The ‘atop’ command allows studying memory consumption for each running process. To do this, execute ‘atop -m’. Processes are sorted by memory usage.

Disk-specific Output with the atop Command:

For disk usage information, use the ‘-d’ option along with ‘atop’. Processes are sorted by disk occupancy.

Finding Background Commands with atop:

To find background commands as processes in a command-line output, use ‘atop -c’.

Thread-based Information:

atop provides the ability to check resource usage for threads. Execute ‘atop -y’ or press ‘y’ when the command is already displaying system resource information.

Other Information:

There are many types of information that can be extracted with the ‘atop’ command, including process start times, number of processes per user, and which core a process is working on.

Tips and Tricks for the atop Command:

Some useful key combinations include pausing the screen (‘z’ key), changing the refresh interval (‘i’ followed by seconds), refreshing values immediately (‘t’ key), and exiting the display (‘q’ key).

Conclusion:

The atop command may seem overwhelming at first, but it provides a wealth of information for system monitoring. With patience and persistence, this command can become a powerful tool. Feel free to reach out with any questions in the comment section.

Ready to Take Control of Your Linux Systems? Start Your Free Trial Today!

Experience the power of cloud-based system monitoring with our free trial. Gain insights, optimize performance, and enhance security effortlessly. Sign up now to elevate your Linux experience!

Try for free!