
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操作。
当我们引⽤队列时,我们说的是与块设备相关联的队列,它阻⽌请求直到它们被传递到物理设
备。
评论