目录
一.简介
iotop是一款开源、免费的用来监控磁盘I/O使用状况的类似top命令的工具,iotop可以监控进程的I/O信息。它是Python语言编写的,与iostat工具比较,iostat是系统级别的IO监控,而iotop是进程级别IO监控。
二.安装
ubuntu下:
apt install iotop -y
centos下:
yum install iotop -y
三.参数
[root@devops03 ~]# iotop -h
Usage: /usr/sbin/iotop [OPTIONS]
DISK READ and DISK WRITE are the block I/O bandwidth used during the sampling
period. SWAPIN and IO are the percentages of time the thread spent respectively
while swapping in and waiting on I/O more generally. PRIO is the I/O priority at
which the thread is running (set using the ionice command).
Controls: left and right arrows to change the sorting column, r to invert the
sorting order, o to toggle the --only option, p to toggle the --processes
option, a to toggle the --accumulated option, i to change I/O priority, q to
quit, any other key to force a refresh.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o, --only only show processes or threads actually doing I/O # --only只显示正在产生I/O的进程或线程。除了传参,可以在运行过程中按o生效。
-b, --batch non-interactive mode # --batch非交互模式,一般用来记录日志。
-n NUM, --iter=NUM number of iterations before ending [infinite] # --iter=NUM设置监测的次数,默认无限。在非交互模式下很有用。
-d SEC, --delay=SEC delay between iterations [1 second] # --delay=SEC设置每次监测的间隔,默认1秒,接受非整形数据例如1.1。
-p PID, --pid=PID processes/threads to monitor [all] # --pid=PID指定监测的进程/线程。
-u USER, --user=USER users to monitor [all] # --user=USER指定监测某个用户产生的I/O。
-P, --processes only show processes, not all threads # --processes仅显示进程,默认iotop显示所有线程。
-a, --accumulated show accumulated I/O instead of bandwidth # --accumulated显示累积的I/O,而不是带宽。
-k, --kilobytes use kilobytes instead of a human friendly unit # --kilobytes使用kB单位,而不是对人友好的单位。在非交互模式下,脚本编程有用。
-t, --time add a timestamp on each line (implies --batch) # --time 加上时间戳,非交互非模式。
-q, --quiet suppress some lines of header (implies --batch) # --quiet 禁止头几行,非交互模式。有三种指定方式。
-q 只在第一次监测时显示列名
-qq 永远不显示列名。
-qqq 永远不显示I/O汇总。
交互按键:
和top命令类似,iotop也支持以下几个交互按键。
left和right方向键:改变排序。
r:反向排序。
o:切换至选项--only。
p:切换至--processes选项。
a:切换至--accumulated选项。
q:退出。
i:改变线程的优先级。
四.使用
4.1查看top
# iotop
Total DISK READ : 0.00 B/s | Total DISK WRITE : 11.63 K/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 740.41 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
322 be/3 root 0.00 B/s 0.00 B/s 0.00 % 0.42 % [jbd2/vda2-8]
21010 be/4 elastics 0.00 B/s 3.88 K/s 0.00 % 0.08 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20881 be/4 elastics 0.00 B/s 3.88 K/s 0.00 % 0.03 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
21012 be/4 elastics 0.00 B/s 3.88 K/s 0.00 % 0.03 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % systemd --system --deserialize 22
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_gp]
4 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_par_gp]
6 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/0:0H-kblockd]
8 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [mm_percpu_wq]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
10 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_sched]
11 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
13 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/0]
14 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/1]
15 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/1]
16 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/1]
18 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/1:0H-kblockd]
19 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/2]
20 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/2]
21 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/2]
23 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/2:0H-kblockd]
24 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/3]
25 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/3]
26 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/3]
28 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/3:0H-kblockd]
29 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kdevtmpfs]
30 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [netns]
31 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kauditd]
32 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khungtaskd]
33 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [oom_reaper]
34 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [writeback]
35 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kcompactd0]
36 be/5 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksmd]
37 be/7 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khugepaged]
8232 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
89 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kintegrityd]
90 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kblockd]
91 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [blkcg_punt_bio]
92 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [tpm_dev_wq]
93 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [md]
94 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [edac-poller]
95 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [devfreq_wq]
96 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdogd]
97 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kswapd0]
99 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthrotld]
100 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [acpi_thermal_pm]
101 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kmpath_rdacd]
102 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kaluad]
8295 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
104 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ipv6_addrconf]
105 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kstrp]
8306 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
4.2查看正在产生I/O的进程或线程
# iotop -o
Total DISK READ : 0.00 B/s | Total DISK WRITE : 156.27 K/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 1031.36 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
322 be/3 root 0.00 B/s 113.29 K/s 0.00 % 0.89 % [jbd2/vda2-8]
20881 be/4 elastics 0.00 B/s 7.81 K/s 0.00 % 0.09 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
21010 be/4 elastics 0.00 B/s 7.81 K/s 0.00 % 0.08 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20883 be/4 elastics 0.00 B/s 7.81 K/s 0.00 % 0.04 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
21011 be/4 elastics 0.00 B/s 3.91 K/s 0.00 % 0.03 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
21012 be/4 elastics 0.00 B/s 3.91 K/s 0.00 % 0.01 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20814 be/4 elastics 0.00 B/s 3.91 K/s 0.00 % 0.00 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~rch/lib/* org.elasticsearch.bootstrap.Elasticsearch [VM Thread]
20822 be/4 elastics 0.00 B/s 7.81 K/s 0.00 % 0.00 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~b/* org.elasticsearch.bootstrap.Elasticsearch [VM Periodic Tas]
4.3时间刷新间隔2秒,输出5次
# iotop -d 2 -n 5
Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % systemd --system --deserialize 22
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_gp]
4 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_par_gp]
6 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/0:0H-kblockd]
8 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [mm_percpu_wq]
9 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/0]
10 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_sched]
11 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/0]
13 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/0]
14 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/1]
15 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/1]
16 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/1]
18 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/1:0H-kblockd]
19 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/2]
20 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/2]
21 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/2]
23 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/2:0H-kblockd]
24 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [cpuhp/3]
25 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [migration/3]
26 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksoftirqd/3]
28 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kworker/3:0H-kblockd]
29 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kdevtmpfs]
30 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [netns]
31 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kauditd]
32 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khungtaskd]
33 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [oom_reaper]
34 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [writeback]
35 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kcompactd0]
36 be/5 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ksmd]
37 be/7 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [khugepaged]
8232 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
89 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kintegrityd]
90 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kblockd]
91 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [blkcg_punt_bio]
92 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [tpm_dev_wq]
93 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [md]
94 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [edac-poller]
20575 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % python3 /usr/bin/salt-master
96 rt/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [watchdogd]
97 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kswapd0]
99 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthrotld]
100 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [acpi_thermal_pm]
101 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kmpath_rdacd]
102 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kaluad]
8295 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
104 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [ipv6_addrconf]
105 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kstrp]
8306 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
8211 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % dockerd -H fd:// --containerd=/run/containerd/containerd.sock
117 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [charger_manager]
28792 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % python3 /usr/bin/salt-minion
28798 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % python3 /usr/bin/salt-minion
4.4查看非交互式,输出5次,间隔2秒,输出到屏幕,也可输出到日志文本
# iotop -botq -d 2 -n 5
20:51:23 Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s
20:51:23 Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
TIME TID PRIO USER DISK READ DISK WRITE SWAPIN IO COMMAND
20:51:25 Total DISK READ : 0.00 B/s | Total DISK WRITE : 7.90 K/s
20:51:25 Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 361.46 K/s
20:51:25 926 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.11 % [kworker/u8:0-flush-253:0]
20:51:25 322 be/3 root 0.00 B/s 0.00 B/s 0.00 % 0.10 % [jbd2/vda2-8]
20:51:25 21011 be/4 elastics 0.00 B/s 2022.60 B/s 0.00 % 0.01 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20:51:25 20814 be/4 elastics 0.00 B/s 2022.60 B/s 0.00 % 0.00 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [VM Thread]
20:51:25 20822 be/4 elastics 0.00 B/s 3.95 K/s 0.00 % 0.00 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [VM Periodic Tas]
20:51:27 Total DISK READ : 0.00 B/s | Total DISK WRITE : 3.95 K/s
20:51:27 Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 0.00 B/s
20:51:27 20814 be/4 elastics 0.00 B/s 3.95 K/s 0.00 % 0.00 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [VM Thread]
20:51:29 Total DISK READ : 0.00 B/s | Total DISK WRITE : 61.24 K/s
20:51:29 Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 104.70 K/s
20:51:29 322 be/3 root 0.00 B/s 53.34 K/s 0.00 % 0.19 % [jbd2/vda2-8]
20:51:29 21012 be/4 elastics 0.00 B/s 2022.95 B/s 0.00 % 0.05 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20:51:29 20883 be/4 elastics 0.00 B/s 2022.95 B/s 0.00 % 0.01 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
20:51:29 21011 be/4 elastics 0.00 B/s 2022.95 B/s 0.00 % 0.01 % java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp/elasticsearch-14262837723520261652 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.locale.providers=COMPAT -Dio.netty.allocator.type=unpooled -Des.path.home=/usr/local/elasticsearch -Des.path.conf=/usr/local/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -Des.bundled_jdk=true -cp /usr/local/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch [elasticsearch[d]
4.5查看非交互式,输出pid为29265的进程信息
# iotop -p 20744
Total DISK READ : 0.00 B/s | Total DISK WRITE : 0.00 B/s
Actual DISK READ: 0.00 B/s | Actual DISK WRITE: 351.26 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
20744 be/4 elastics 0.00 B/s 0.00 B/s ?unavailable? java -Xms512m -Xmx512m -XX:+UseConcMarkSweepGC -XX:CMSInitiati~l/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch
标签:0.00,Des,iotop,命令,XX,elasticsearch,Linux,DISK,root
From: https://www.cnblogs.com/even160941/p/18400913