Atop Command Tutorial With Examples To Monitor Linux System Metrics

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/atop-command-tutorial-examples-monitor-linux-system-meterics/
PINTEREST
PINTEREST
INSTAGRAM

Atop is a monitoring tool which is mainly developed for command line usage. It is capable of showing detailed information about process, memory, disk network information and metrics. Atop commands provides more details than popular top command.

Syntax

We will use following syntax for atop command.

Help

Help information like flags, options cna be listed with -h option.

atop help
atop help

Start atop

Atop can be started just issuing atop command. But to get more detailed information and metrics about different subsystem usages providing root privileges are better way.

Atop
Atop

As we can see from screenshot the information provided is more than we may want the terminal screen fills up with monitoring information. We will look 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.

Display CPU Usage
Display CPU Usage

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 Memory Usage
Display Memory Usage

Display Disk Utilization

Another usage type of disk utilization. We will use –d option for this.

Display Disk Utilization
Display Disk Utilization

We can see that disk utilization of the each process is show separately. Each process disk metrics like

  • RRDSK shows read disk
  • WRDSK shows write disk
  • WCANCL
  • DSK shows general disk usage
  • CMD shows related command
LEARN MORE  How To Release and Renew IP Address In Windows with Ip Release and Renew

Display Process Information In Cumulative Manner

Process information can be listed with –p option. This will also show other metrics about disk, network and memory

Display Process Information
Display Process Information
  • SYSCPU show system side CPU usage
  • USRCPU shows user side CPU usage
  • VSIZE shows virtual memory size
  • RSIZE shows real memory size
  • RDDSK shows disk read
  • WRDSK shows disk write
  • RNET shows network receive
  • SNET shows network send
  • CPU shows shortcutCPU usage percentage
  • CMD shows related command

Display Process Information In Cumulative Manner According To User

Another useful feature of the atop is showing metrics in user perspective. This shortcut will sum up all metrics according to user. We will use –u option.

Display Process Information In Cumulative Manner According To User
Display Process Information In Cumulative Manner According To User

Display Network Usage shortcut

Network usage can be displayed with  –n option. But there is dependency for netatop to probe the network information.

Show Generic Information

General information about system an process can be listed with -g option like below.

Show Generic Information
Show Generic Information

This will list information like

  • PID
  • EUID
  • USR CPU User level CPU usage
  • CPU CPU usage
  • RDDSK Read disk
  • WRDSK  Write to disk

Show All Process

Up to now only active process are shown. We can list all process without filtering them with -a option.

Show All Process
Show All Process

Display Details / Verbose Mode

More details about current windows can be show with verbose mode. Verbose mode can be call -v option or v shortcut after atop starts.

Display Details / Verbose Mode
Display Details / Verbose Mode

As we can see from previous screenshot the following information is provided for each process.

  • PID Process ID
  • PPID Parent Process ID
  • RGID
  • EUID
  • STDATE
  • STTIME
  • ENDATE
  • ENTIME
  • ST
  • EXC
  • S
  • CPU
  • CMD

Show Threads

We can also show 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.

LEARN MORE  Powershell Start-Process Command Tutorial with Examples

Show Threads
Show Threads

Write To Log File

atop is 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.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 specified time. We will use -r and the log file name which is atop.raw in this case.

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 /etc/atoprc .

Set User Based Configuration

We can also set user level configuration which will overload global configuration if defined. This configuration file is located ~/.atoprc

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/atop-command-tutorial-examples-monitor-linux-system-meterics/
PINTEREST
PINTEREST
INSTAGRAM