博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux的IO性能监控
阅读量:6424 次
发布时间:2019-06-23

本文共 5803 字,大约阅读时间需要 19 分钟。

一般使用iostat命令监控I/O性能

1.iostat命令可用参数列表:

OPTIONS       -c     Display the CPU utilization report.       -d     Display the device utilization report.       -h     Make the NFS report displayed by option -n easier to read by a human.       -k     Display statistics in kilobytes per second instead of blocks per second.  Data displayed are valid only with kernels  2.4  and              later.       -m     Display statistics in megabytes per second instead of blocks or kilobytes per second.  Data displayed are valid only with ker-              nels 2.4 and later.       -N     Display the registered device mapper names for any device mapper devices.  Useful for viewing LVM2 statistics.       -n     Display the network filesystem (NFS) report. This option works only with kernel 2.6.17 and later.       -p [ { device [,...] | ALL } ]              The -p option displays statistics for block devices and all their partitions that are used by the system.  If a device name is              entered on the command line, then statistics for it and all its partitions are displayed. Last, the ALL keyword indicates that              statistics have to be displayed for all the block devices and partitions defined by the  system,  including  those  that  have              never been used.  Note that this option works only with post 2.5 kernels.       -t     Print  the time for each report displayed. The timestamp format may depend on the value of the S_TIME_FORMAT environment vari-              able (see below).       -V     Print version number then exit.       -x     Display extended statistics.  This option works with post 2.5 kernels since it needs /proc/diskstats file or a  mounted  sysfs              to  get  the  statistics. This option may also work with older kernels (e.g. 2.4) only if extended statistics are available in              /proc/partitions (the kernel needs to be patched for that).       -z     Tell iostat to omit output for any devices for which there was no activity during the sample period.

2.iostat 常用参数举例:

iostat -d -x -k 1 10

$ iostat -d -x -k 1 10Linux 2.6.32-358.el6.x86_64 (vnode1)    2015年02月25日  _x86_64_        (64 CPU)Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               7.23  2923.45  111.97  158.24  4305.81 12331.61   123.14     0.42    1.53   1.55  41.99Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00     0.00 1313.00    0.00 38884.00     0.00    59.23    13.14   10.14   0.76 100.10Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00 19604.00  587.00  361.00  8380.00 55624.00   135.03    80.47   64.34   1.05 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               1.00 11641.00   93.00 1079.00  4436.00 67312.00   122.44   143.71  119.34   0.85 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00 12925.00   91.00 1036.00  6612.00 54072.00   107.69   142.63  133.53   0.89 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00 15597.00   66.00 1101.00  3284.00 69080.00   124.02   142.49  124.61   0.86 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               4.00  6834.00  326.00  766.00 10532.00 37696.00    88.33    75.73   80.81   0.92 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00  7322.00  417.00  331.00  6796.00 22568.00    78.51    65.42   68.01   1.34 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00 12862.00   80.00 1464.00  1424.00 63416.00    83.99   121.29   87.37   0.65 100.00Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %utilsda               0.00     0.00  857.00   10.00 12512.00  1972.00    33.41    11.65   14.53   1.15 100.00

iostat -d -k 1 10

$ iostat -d -k 1 10Linux 2.6.32-358.el6.x86_64 (vnode1)    2015年02月25日  _x86_64_        (64 CPU)Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             270.40      4306.84     12331.65 23370851441 66917123180Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             812.00     35820.00        56.00      35820         56Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda            1175.00     24940.00       508.00      24940        508Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             910.00     10056.00     12224.00      10056      12224Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             733.00      2672.00     20064.00       2672      20064Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             836.00       712.00     10456.00        712      10456Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             995.00       604.00     13052.00        604      13052Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             966.00       104.00     14264.00        104      14264Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda             811.00       268.00     19728.00        268      19728Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtnsda            1056.00       124.00     16788.00        124      16788

更多关于iostat命令的说明可参见转载文章:

你可能感兴趣的文章
UIApplication
查看>>
12:Web及MySQL服务异常监测案例
查看>>
hdu 3955 March
查看>>
数据库性能优化之冗余字段的作用
查看>>
C语言程序设计第五次作业
查看>>
Go语言的接口
查看>>
DBA_实践指南系列9_Oracle Erp R12应用补丁AutoPatch/AutoControl/AutoConfig(案例)
查看>>
Python语言学习 (六)1.2
查看>>
数据库设计三大范式
查看>>
ionic 字体的导入方法
查看>>
IP路由原理
查看>>
内部类详解
查看>>
洛谷P2726 阶乘 Factorials 数学
查看>>
类加载机制
查看>>
火柴棒等式(2008年NOIP全国联赛提高组)
查看>>
mongodb int型id 自增
查看>>
【转】关于大型网站技术演进的思考(十八)--网站静态化处理—反向代理(10)...
查看>>
绝大部分项目都是跟金融创新、互联网、移动互联网、社区经济、分享经济、互联网金融有关...
查看>>
Java中的4种代码块
查看>>
Ocelot(七)- 入门
查看>>