最上面的div下面有空隙
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是主要用于命令行使用而开发的监视工具。 它能够显示有关进程,内存,磁盘网络信息和指标的详细信息。 与常用的top命令相比,top命令提供的详细信息更多。
在命令语法之上 (atop Command Syntax)
We will use following syntax for atop
command.
我们将对atop
命令使用以下语法。
atop OPTION
在命令帮助上方 (atop Command Help)
Help information like flags, options can be listed with -h
option.
可以使用-h
选项列出帮助信息(例如标志,选项)。
$ atop -h
从头开始(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 a better way.
只需发出atop
命令即可启动Atop。 但是要获得有关不同子系统使用情况的更详细的信息和指标,提供根特权是一种更好的方法。
$ 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.
从屏幕截图中可以看到,所提供的信息超出了我们希望终端屏幕填满监视信息的范围。 我们将研究如何显示有关CPU,进程,网络,磁盘内存等的特定信息。
显示CPU使用率 (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.
重新启动后,我们可以使用c
快捷键显示与CPU相关的信息。 这将根据进程使用其PID的CPU使用情况以及带有参数和选项的完整命令行列出进程。
$ 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.
我们可以使用m
快捷方式显示内存使用情况。 这将列出信息,如PIC,最小和最大故障号,vstext,vsize,rsize,vgrow,rgrow,运行用户ID,有效用户ID,内存使用情况和命令。
显示磁盘利用率(Display Disk Utilization)
Another usage type of disk utilization. We will use –d
option for this.
磁盘利用率的另一种使用类型。 我们将使用– d
选项。
$ atop -d
We can see that disk utilization of the each process is show separately. Each process disk metrics like
我们可以看到每个进程的磁盘利用率是分开显示的。 每个进程的磁盘指标如
RRDSK
shows read diskRRDSK
显示读取的磁盘WRDSK
shows write diskWRDSK
显示写磁盘WCANCL
WCANCL
DSK
shows general disk usageDSK
显示常规磁盘使用情况CMD
shows related commandCMD
显示相关命令
以累积方式显示过程信息 (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.
可以使用– p选项列出过程信息。 这还将显示有关磁盘,网络和内存的其他指标。
$ atop -p
SYSCPU
show system side CPU usageSYSCPU
显示系统端CPU使用率USRCPU
shows user side CPU usageUSRCPU
显示用户端CPU使用率VSIZE
shows virtual memory sizeVSIZE
显示虚拟内存大小RSIZE
shows real memory sizeRSIZE
显示实际内存大小RDDSK
shows disk readRDDSK
显示磁盘读取WRDSK
shows disk writeWRDSK
显示磁盘写入RNET
shows network receiveRNET
显示网络接收SNET
shows network sendSNET
显示网络发送CPU
shows shortcutCPU usage percentageCPU
显示快捷方式CPU
使用率百分比CMD
shows related commandCMD
显示相关命令
根据用户显示累积方式的过程信息(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 –u
option.
顶部的另一个有用功能是从用户角度显示指标。 此快捷方式将根据用户汇总所有指标。 我们将使用– u
选项。
$ 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.
可以使用-n选项显示网络使用情况。 但是netatop
依赖于探测网络信息。
$ atop -n
显示一般信息 (Show Generic Information)
General information about system an process can be listed with -g
option like below.
可以使用-g
选项列出有关系统进程的一般信息,如下所示。
This will list information like
这将列出类似的信息
PID
PID
EUID
EUID
USR CPU
User level CPU usageUSR CPU
用户级别的CPU使用率CPU
CPU usageCPU
CPU使用率RDDSK
Read diskRDDSK
读盘WRDSK
Write to diskWRDSK
写入磁盘
显示所有过程(Show All Process)
Up to now only active process are shown. We can list all process without filtering them with -a
option.
到目前为止,仅显示活动过程。 我们可以列出所有进程,而无需使用-a
选项过滤它们。
$ 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.
可以使用详细模式显示有关当前窗口的更多详细信息。 详细模式可以在启动开始后调用-v
选项或v
快捷方式。
$ atop -v
As we can see from previous screenshot the following information is provided for each process.
从前面的屏幕截图可以看出,为每个过程提供了以下信息。
PID
Process IDPID
进程IDPPID
Parent Process IDPPID
父进程IDRGID
RGID
EUID
EUID
STDATE
STDATE
STTIME
STTIME
ENDATE
ENDATE
ENTIME
ENTIME
ST
ST
EXC
EXC
S
S
CPU
CPU
CMD
CMD
显示线程 (Show Threads)
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.
我们还可以显示基于线程的列表。 在此视图中,将显示线程ID和相关信息。 该行的末尾还将有进程名称。
$ 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.raw
atop
是一个非常分析的工具,我们可以在其中将监视的值保存到文件中以供将来读取。 我们将使用-w
选项重定向到二进制格式的文件。 我们将日志文件命名为atop.raw
$ 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.
我们也可以从日志文件中读取。 如果我们需要调查指定时间的过去事件,这将是有益的。 在这种情况下,我们将使用-r
和日志文件名atop.raw
。
$ 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 /etc/atoprc
.
如果我们通常需要使用特定的选项,我们可以在一个全局配置文件,该文件将针对每个效果指定它们atop
运行。 我们将使用/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
我们还可以设置用户级别的配置,如果定义,它将使全局配置超载。 该配置文件位于~/.atoprc
翻译自: https://www.poftut.com/atop-command-tutorial-examples-monitor-linux-system-meterics/
最上面的div下面有空隙