$ cat /proc/diskstats
sda
sda1
sda2
gg-
gg-
gg- 主号 次号 名称 成功读 合并读 扇区读 读时间
 

每一列的含义分别为:

  • 第一列为 设备号

(number of issued reads. This is the total number of reads completed successfully.)

  • 第二列为 次设备号

(number of reads merged)

  • 第三列为 设备名称

(number of sectors read. This is the total number of sectors read successfully.)

  • 第四列为 成功完成读的总次数

(number of milliseconds spent reading. This is the total number of milliseconds spent by all reads (as measured from __make_request() to end_that_request_last()).)

  • 第五列为 合并读次数,为了效率可能会合并相邻的读和写,从而两次4K的读在它最终被处理到磁盘上之前可能会变成一次8K的读,才被计数(和排队),因此只有一次I/O操作。

(number of writes merged Reads and writes which are adjacent to each other may be merged for efficiency. Thus two 4K reads may become one 8K read before it is ultimately handed to the disk, and so it will be counted (and queued) as only one I/O. This field lets you know how often this was done.)

  • 第六列为 读扇区的次数

  • 第七列为 读花的时间(ms),这是所有读操作所花费的毫秒数(用__make_request()到end_that_request_last()测量)

  • 第八列到第十一列分别是写

  • 第十二列为 I/O的当前进度,只有这个域应该是0,如果这个值为0,同时write_complete read_complete io_processing 一直不变可能就就是IO hang了。

number of I/Os currently in progress. The only field that should go to zero. Incremented as requests are given to appropriate request_queue_t and decremented as they finish.)

  • 第十三列为 输入输入花的时间(ms),花在I/O操作上的毫秒数,这个域会增长只要field 9不为0。

(number of milliseconds spent doing I/Os. This field is increased so long as field 9 is nonzero.)

  • 第十四列为 输入/输出操作花费的加权毫秒数,

(number of milliseconds spent doing I/Os. This field is incremented at each I/O start, I/O completion, I/O merge, or read of these stats by the number of I/Os in progress (field 9) times the number of milliseconds spent doing I/O since the last update of this field. This can provide an easy measure of both I/O completion time and the backlog that may be accumulating.)

可以参考:

  The /proc/diskstats file displays the I/O statistics
of block devices. Each line contains the following 14
fields:
1 - major number
2 - minor mumber
3 - device name
4 - reads completed successfully
5 - reads merged
6 - sectors read
7 - time spent reading (ms)
8 - writes completed
9 - writes merged
10 - sectors written
11 - time spent writing (ms)
12 - I/Os currently in progress
13 - time spent doing I/Os (ms)
14 - weighted time spent doing I/Os (ms)

/sys/block/device_name/stat的输出和上面各个字段是一样的。

系统io统计的更多相关文章

  1. Linux系统IO分析工具之iotstat常用参数介绍

    Linux系统IO分析工具之iotstat常用参数介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 1>.安装iostat [root@flume115 ~]# yum - ...

  2. Java nio 笔记:系统IO、缓冲区、流IO、socket通道

    一.Java IO 和 系统 IO 不匹配 在大多数情况下,Java 应用程序并非真的受着 I/O 的束缚.操作系统并非不能快速传送数据,让 Java 有事可做:相反,是 JVM 自身在 I/O 方面 ...

  3. 清除缓存、开启IO统计

    SQL性能优化前期准备-清除缓存.开启IO统计 如果需要进行SQl Server下的SQL性能优化,需要准备以下内容: 一.SQL查询分析器设置: 1.开启实际执行计划跟踪. 2.每次执行需优化SQL ...

  4. 系统IO

    系统IO:Linux系统提供给应用程序操作文件的接口 Everything is a file  ,in  Unix 在Unix/Linux下,万物皆文件 打开文件函数原型: #include< ...

  5. Linux系统IO分析工具之iotop常用参数介绍

      Linux系统IO分析工具之iotop常用参数介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在一般运维工作中经常会遇到这么一个场景,服务器的IO负载很高(iostat中的 ...

  6. 【未解决】对于使用Windows的IDEA进行编译的文件,但无法在Linux系统中统计代码行数的疑问

    在我学习使用Windows的IDEA的过程中,将代码文件转移到Linux虚拟机当中,但无法在Linux系统中统计代码行数. 注意:拷贝进虚拟机的文件均能编译运行. 具体过程如下: root@yogil ...

  7. SQL性能优化前期准备-清除缓存、开启IO统计

    文章来至:https://www.cnblogs.com/Ren_Lei/p/5669662.html 如果需要进行SQl Server下的SQL性能优化,需要准备以下内容: 一.SQL查询分析器设置 ...

  8. yuchuan_Linux_C 编程之七系统IO函数

    一.整体大纲 二. 系统IO函数 1. 一些概念    文件描述符     PCB     C库函的IO缓冲区 1) 文件描述符            int 类型            一个进程最多 ...

  9. Linux vmstat具体解释(系统IO)

    1. vmstat 能够展现给定时间间隔的server的状态值,包含server的CPU使用率,内存使用,虚拟内存交换情况,IO读写情况 vmstat 2 10 2: 每隔2s 10 : 统计10次 ...

随机推荐

  1. Cmd使用方式--命令行运行程序

    工具用惯却不知道如何去描述什么用,总感觉自己学东西用东西零零散散不系统,心虚!下面总结下自己使用cmd的几种方式. 1 => cmd,command,是window系统下命令提示符,是一种com ...

  2. Idea 2018.2.5创建springboot项目依赖包没有的错误

  3. 踩坑记-java mysql 新增获取主键、DIY主键、UUID

    java mysql 获取主键.DIY主键.UUID,简单粗暴,代码如下: mapper.xml insert id="add" parameterType="com.x ...

  4. CF1166D——数学公式思维题

    #include<bits/stdc++.h> using namespace std; #define ll long long ll ans[],a,b,m; /* b=2^(n-2) ...

  5. Joomla - K2组件(文章管理扩展)

    一.下载 K2 进入 https://getk2.org/ ,点击DOWNLOAD K2 下载K2 下载完毕得到一个安装包 二.安装 K2 进入看后台,点击顶栏主菜单 扩展管理 -> 扩展安装 ...

  6. 最后的egret

    坚持做一件事真的好难~ 决定重新写博客的时候想着一定要坚持一个周一篇,然而.... 年后上班老板找我的第一件大事:以后公司的棋牌产品不会有大的动作了:公司PHP(内部用的运营后台)的小姐姐休产假了,我 ...

  7. java使用stream流批量读取并合并文件,避免File相关类导致单文件过大造成的内存溢出。

    import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.F ...

  8. javaweb的几种开发模式

    1.MVC模式基础 1.1.MVC模式简介 MVC是一种架构型模式,它本身并不引入新的功能,只是用来指导我们改善应用程序的架构,使得应用的模型和视图相分离,从而达到更好的开发和维护效率.在MVC模式中 ...

  9. BufferedReader用法

      BufferedReader由Reader类扩展而来,提供通用的缓冲方式文本读取,而且提供了很实用的readLine,读取一个文本行,从字符输入流中读取文本,缓冲各个字符,从而提供字符.数组和行的 ...

  10. mysql 根据时间查询 格式转换竟然要注意大小写,天坑

    时间需要转换格式在查询 查询2018年12月24日以后的记录 SELECT id FROM t_client_info WHERE DATE_FORMAT(visit_datetime,'%Y-%m- ...