暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
PT-DISKSTATS
876
5页
3次
2020-06-30
免费下载
PT-DISKSTATS
#
🌂
tools/pt
⽤法
pt-diskstats [OPTIONS] [FILES]
pt-diskstats打印GNU/Linux系统的磁盘I/O的统计,它有点类似于iostat,但它是交互式的,更
加详细。 它可以分析从另⼀台机器收集的样品。
描述
pt-diskstats⼯具类似于iostat,但有⼀些优点。 它分别打印读的统计信息和写的统计信息,并
且具有更多内容。 它是菜单驱动和交互式的,有⼏种不同的⽅式来聚合数据。
它可以与pt-stalk⼯具很好地集成。
默认情况下它也会执⾏正确的操作,例如隐藏闲置的磁盘。 这些属性使得快速深⼊钻取I/O
性能和检查磁盘⾏为⾮常⽅便。
该程序有两种⼯作模式。
默认设置是收集/proc/diskstats的样本并按时间间隔打印格式化的统计信息。
另⼀种模式是处理包含/proc/diskstats的已保存样本的⽂件; 这有⼀个shell脚本显示如何收集
此类⽂件案例
在这两种情况下,该⼯具都通过按键交互控制,因此您可以灵活轻松地重新显示和切分数据。
它永远循环,直到你⽤ q 键退出。如果按 ?键,将打开交互式帮助菜单,显示哪些键可以控
制程序。
当程序收集/ proc / diskstats的样本并刷新其显示时,它会在每次刷新时打印有关最新样本的
信息。 当它对保存的样本⽂件进⾏操作时,每次更改选项时都会重绘整个⽂件的内容。程序
不会打印有关系统上每个块设备的信息。 它隐藏了从未观察到任何活动的设备。 您可以按 i
键启⽤和禁⽤此功能。
输出
we will try to clarify the distinction between block devices (/dev/sda1, for example),which
the kernel presents to the application via a filesystem, versus the (usually) physical device
underneath the block device, which could be a disk, a RAID controller, and so on. We will
sometimes refer to logical I/O operations, which occur at the block device, versus physical
I/Os which are performed on the underlying device. When we refer to the queue, we are
speaking of the queue associated with the block device, which holds requests until they’re
issued to the physical device.
我们将尝试阐明block devices块设备——————内核通过⽂件系统提供给应⽤程序(例如/ dev /
sda1)。与块设备(通常)下层级的physical device物理设备之间的区别,
physical device物理设备可以是磁盘,RAID控制器等。
我们有时会提到在块设备上发⽣的逻辑I/O操作,⽽不是在底层设备上执⾏的物理I/O操作。
当我们引⽤队列时,我们说的是与块设备相关联的队列,它阻⽌请求直到它们被传递到物理设
备。
#ts
此列的内容取决于⼯具的聚合模式:
在默认模式下,当每⾏包含有关单个磁盘的信息但可能聚合来⾃该磁盘的多个样本时,此列显
{curly braces}中包含在输出⾏中的样本数。
In the “all” group-by mode,此列显示时间戳偏移,相对于⼯具开始聚合的时间或打印的前⼀
⾏的时间戳,具体取决于模式。输出可能很难解释,但是当您看到屏幕上出现的线条时,它会
⾮常直观。
in “sample” group-by mode,数字表示分组到每个样本的总时间跨度。如果指定--show-
timestamps,则此字段显示采样的时间戳;如果在单⾏输出中存在多个时间戳,则使⽤第⼀个
时间戳。
简单来说:如果按照disksample聚合,该值代表到run的总时间,如果按照all聚合,代表两
个快照间时间间隔。
device
设备设备名称。如果有多个设备,则在{花括号}中显示聚合到该⾏中的设备数量
rd_s
每秒的平均读取次数。这是发送到底层设备的I/O请求数。这通常⽐应⽤程序发出的逻辑IO
求数⼩。
更多请求可能已经在块设备中排队,并且他们其中⼀些通常在发送到磁盘之前进⾏了合并。
rd_avkb
The average size of the reads, in kilobytes. 读取的平均⼤⼩,以千字节为单位。
rdmbs
The average number of megabytes read per second.每秒读取的平均兆字节数。
rd_mrg
The percentage of read requests that were merged together in the queue scheduler
before being sent to the physical device.在发送到物理设备之前在队列调度程序中合并在⼀
起的读取请求的百分⽐。 rd_cnc
The average concurrency of the read operations, as computed by Little’s Law. This is the
end-to-end concurrency on the block device, not the underlying disk’s concurrency. It
includes time spent in the queue.
Little定律计算的读操作的平均并发性。这是块设备上的端到端并发,⽽不是底层磁盘的并
发性。它包括在队列中花费的时间。
rd_rt
The average response time of the read operations, in milliseconds. This is the end-to-end
response time,including time spent in the queue. It is the response time that the
application making I/O requests sees,not the response time of the physical disk
underlying the block device.读操作的平均响应时间,以毫秒为单位。这是端到端响应时间,
包括在队列中花费的时间。它是发出I / O请求的应⽤程序所看到的响应时间,⽽不是块设备下
⾯的物理磁盘的响应时间。
wrs」「wravkb」「wrmbs」「wrmrg」「wrcnc」「wr_rt
These columns show write activity, and they match the corresponding columns for read
activity.这些列显示写活动,它们可以类⽐读活动的相应列。
busy
wall-clock的⼀⼩部分,表示设备中⾄少⼀个请求in process的时间,也就是iostat的所
%util,实际上它是utilization利⽤率,具体取决于你如何定义利⽤率,但有时候这通常是模
棱两可的说法。它也可以称为the residence time驻留时间(the time during which at least
one request was resident in the system. )。 我认为这个时间不能写成running time⽽必须
写作in process的原因是:他可能包含running time,但是还包含在块设备排队,在磁盘上查
找等等的时间,所以是从发起执⾏⼀起到结束的整个过程的时间
in_prg
The number of requests that were in progress.正在进⾏的请求数。与读并发和写并发(由可
靠数字⽣成的平均值)不同,此数字是⼀个瞬时样本,您可以看到它可能代表请求的峰值,⽽
不是真正的⻓期平均值。如果此数字很⼤,则实质上意味着设备负载很重。
ios_s
The average throughput of the physical device, in I/O operations per second (IOPS).
物理设备的平均吞吐量,以每秒I/O操作数(IOPS)为单位。
此列显示基础设备正在处理的总IOPS。它是rdswrs的总和。
qtime
The average queue time; that is, time a request spends in the device scheduler queue
before being sent to the physical device. This is an average over reads and writes.平均排队
时间;也就是说,请求在发送到物理设备之前在设备调度程序队列中花费的时间。这是读写的
平均值。
stime
The average service time; that is, the time elapsed while the physical device processes the
request, after the request finishes waiting in the queue. This is an average over reads and
of 5
免费下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。