系统io统计
$ 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统计的更多相关文章
- Linux系统IO分析工具之iotstat常用参数介绍
Linux系统IO分析工具之iotstat常用参数介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 1>.安装iostat [root@flume115 ~]# yum - ...
- Java nio 笔记:系统IO、缓冲区、流IO、socket通道
一.Java IO 和 系统 IO 不匹配 在大多数情况下,Java 应用程序并非真的受着 I/O 的束缚.操作系统并非不能快速传送数据,让 Java 有事可做:相反,是 JVM 自身在 I/O 方面 ...
- 清除缓存、开启IO统计
SQL性能优化前期准备-清除缓存.开启IO统计 如果需要进行SQl Server下的SQL性能优化,需要准备以下内容: 一.SQL查询分析器设置: 1.开启实际执行计划跟踪. 2.每次执行需优化SQL ...
- 系统IO
系统IO:Linux系统提供给应用程序操作文件的接口 Everything is a file ,in Unix 在Unix/Linux下,万物皆文件 打开文件函数原型: #include< ...
- Linux系统IO分析工具之iotop常用参数介绍
Linux系统IO分析工具之iotop常用参数介绍 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 在一般运维工作中经常会遇到这么一个场景,服务器的IO负载很高(iostat中的 ...
- 【未解决】对于使用Windows的IDEA进行编译的文件,但无法在Linux系统中统计代码行数的疑问
在我学习使用Windows的IDEA的过程中,将代码文件转移到Linux虚拟机当中,但无法在Linux系统中统计代码行数. 注意:拷贝进虚拟机的文件均能编译运行. 具体过程如下: root@yogil ...
- SQL性能优化前期准备-清除缓存、开启IO统计
文章来至:https://www.cnblogs.com/Ren_Lei/p/5669662.html 如果需要进行SQl Server下的SQL性能优化,需要准备以下内容: 一.SQL查询分析器设置 ...
- yuchuan_Linux_C 编程之七系统IO函数
一.整体大纲 二. 系统IO函数 1. 一些概念 文件描述符 PCB C库函的IO缓冲区 1) 文件描述符 int 类型 一个进程最多 ...
- Linux vmstat具体解释(系统IO)
1. vmstat 能够展现给定时间间隔的server的状态值,包含server的CPU使用率,内存使用,虚拟内存交换情况,IO读写情况 vmstat 2 10 2: 每隔2s 10 : 统计10次 ...
随机推荐
- Hibernate的多对多映射
一.创建Java工程,新建Lib文件夹,加入Hibernate和数据库(如MySql.Oracle.SqlServer等)的Jar包,创建 hibernate.cfg.xml 文件,并配置,配置项如下 ...
- RunLoop运行循环机制
http://www.jianshu.com/p/0be6be50e461 基本概念 进程 进程是指在系统中正在运行的一个应用程序,而且每个进程之间是独立的,它们都运行在其专用且受保护的内存空间内,比 ...
- Spring Cache 简介
org.springframework.cache; org.springframework.cache.Cache org.springframework.cache.CacheManager 依赖 ...
- 2-sat——hdu3062
对于怎么建边还是不太清楚 选了a,那么b c不选,所以连边 选了b或c,那么a必定不选 /* 每个点拆成i*2,i*2+1 队长选,那么队友不选 队长不选,那么队友必定要选 */ #include&l ...
- String类型_static成员_动态内存分配_拷贝构造函数_const关键字_友元函数与友元类
1:String类型 #include <iostream> using namespace std; int main() { //初始化方法 string s1 = "hel ...
- 企业微信开发免登授权时提示scope不能为空,错误代码1001
企业免登授权提示scope不能为空1001 原因是我们是单页面应用url自带#/在微信里面认为#号后面的参数不被识别 后端开发人员把参数放到跳转 URL地址前面,正确形式是 https://open. ...
- Extjs4 desktop 图标自动换行,横纵排列 图标大小修改
一.图标换行 /*! * Ext JS Library 4.0 * Copyright(c) 2006-2011 Sencha Inc. * licensing@sencha.com * http:/ ...
- php数据结构课程---5、树(树的 存储方式 有哪些)
php数据结构课程---5.树(树的 存储方式 有哪些) 一.总结 一句话总结: 双亲表示法:data parent:$tree[1] = ["B",0]; 孩子表示法:data ...
- 使用Native API 创建进程
使用 Native API 创建进程 最近几个星期一直在研究这个题目.因为关于方面的资料比较多(可以看下面的参考文章),所以开始时以为很快就结束了.谁知道真正动起手来才发现有很多要考虑的地方,不过还好 ...
- Python学习day07 - Python进阶(1) 内置方法
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...