IO性能工具

一、iotop

1. 用法

复制代码
/# iotop --help
Usage: iotop [-h] [-P] [-d <delay>] [-n <cycles>] [-s <column>]
   -a  Show byte count instead of rate
   -d  Set the delay between refreshes in seconds.
   -h  Display this help screen.
   -m  Set the number of processes or threads to show
   -n  Set the number of refreshes before exiting.
   -P  Show processes instead of the default threads.
   -s  Set the column to sort by: pid, read, write, total, io, swap, faults, sched, mem or delay.
复制代码


2. 示例

iotop -d 5 //统计最近5秒的

iotop -m 4 //循环显示4个线程

iotop -m 4 -n 3 //只循环显示3次

iotop -P -m 4 //以进程为单位进行展示而不是线程

iotop -s faults -m 4 //按faults进行排序,可选的还有 pid, read, write, total, io, swap, faults, sched, mem or delay

复制代码
/ # iotop | head -5
                          --- IO (KiB/s) --- --- faults ---  ----------- delayed on ---------- //单位KB/s
   PID Command            read  write  total  major  minor  IO     swap   sched  mem    total
  1165 logcat                0    212    212      0      0  0.00%  0.00%  0.00%  0.00%  0.00%
 26337 peechservice          0     44     44      0   3451  0.00%  0.00%  0.00%  0.00%  0.00%
  2808 queued-work-loo       0     12     12      0      3  0.00%  0.00%  0.00%  0.00%  0.00%

# iotop -a | head -5
                          ---- IO (KiB) ---- --- faults ---  ----------- delayed on ---------- //单位KB
   PID Command            read  write  total  major  minor  IO     swap   sched  mem    total
  1165 logcat                0    240    240      0      0  0.00%  0.00%  0.00%  0.00%  0.00%
  1167 logcat                0     36     36      0      0  0.00%  0.00%  0.00%  0.00%  0.00%
  2921 Thread-4              0     12     12      0      0  0.00%  0.00%  0.00%  0.00%  0.00%
复制代码


3. 相关命令

# io
ionice                   iorap.cmd.maintenance    iorap.prefetcherd        iorenice
iorap.cmd.compiler       iorap.inode2filename     iorapd                   iotop

 

posted on   Hello-World3  阅读(11)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!
历史上的今天:
2023-01-17 Uid和Gid
2019-01-17 Android开发小问题解决汇总

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示