如果不使用任何选项,则 zpool iostat 命令会显示自引导以来系统中所有池的累积统计信息。例如:
# zpool iostat capacity operations bandwidth pool alloc free read write read write ---------- ----- ----- ----- ----- ----- ----- rpool 6.05G 61.9G 0 0 786 107 tank 31.3G 36.7G 4 1 296K 86.1K ---------- ----- ----- ----- ----- ----- ----- |
由于这些统计信息是自引导以来累积的,因此,如果池相对空闲,则带宽可能显示为较低。通过指定时间间隔,可以请求查看更准确的当前带宽使用情况。例如:
# zpool iostat tank 2 capacity operations bandwidth pool alloc free read write read write ---------- ----- ----- ----- ----- ----- ----- tank 18.5G 49.5G 0 187 0 23.3M tank 18.5G 49.5G 0 464 0 57.7M tank 18.5G 49.5G 0 457 0 56.6M tank 18.8G 49.2G 0 435 0 51.3M |
在本示例中,此命令显示了池 tank 的使用情况统计信息,每隔两秒显示一次,直到键入 Ctrl-C 组合键为止。或者,也可以再指定 count 参数,该参数用于使命令在指定的重复次数之后终止。例如, zpool iostat 2 3 每隔两秒列显一次摘要信息,重复三次,共六秒。如果仅有一个池,则会在连续的行上显示统计信息。如果存在多个池,则用附加虚线分隔每次重复,以提供直观的分隔效果。