コマンド学習「sar」(Vol.5)

「sar -d」って何だろう?

option desctiption
-d Report activity for each block device (kernels 2.4 and newer only).

# sar -d 1 2
Linux 2.6.9-89.0.7.EL (localhost.localdomain) 2009年09月28日

02時40分38秒 DEV tps rd_sec/s wr_sec/s
02時40分39秒 dev3-0 0.00 0.00 0.00
02時40分39秒 dev3-1 0.00 0.00 0.00
02時40分39秒 dev3-2 0.00 0.00 0.00

02時40分39秒 DEV tps rd_sec/s wr_sec/s
02時40分40秒 dev3-0 2.97 31.68 0.00
02時40分40秒 dev3-1 0.00 0.00 0.00
02時40分40秒 dev3-2 2.97 31.68 0.00

平均値: DEV tps rd_sec/s wr_sec/s
平均値: dev3-0 1.50 16.00 0.00
平均値: dev3-1 0.00 0.00 0.00
平均値: dev3-2 1.50 16.00 0.00

  • 出力が長いので一部省略

pオプション*1併用

# sar -d 1 2 -p
Linux 2.6.9-89.0.7.EL (localhost.localdomain) 2009年09月28日

02時40分55秒 DEV tps rd_sec/s wr_sec/s
02時40分56秒 hda 0.00 0.00 0.00
02時40分56秒 hda1 0.00 0.00 0.00
02時40分56秒 hda2 0.00 0.00 0.00

02時40分56秒 DEV tps rd_sec/s wr_sec/s
02時40分57秒 hda 0.00 0.00 0.00
02時40分57秒 hda1 0.00 0.00 0.00
02時40分57秒 hda2 0.00 0.00 0.00

平均値: DEV tps rd_sec/s wr_sec/s
平均値: hda 0.00 0.00 0.00
平均値: hda1 0.00 0.00 0.00
平均値: hda2 0.00 0.00 0.00

  • 出力が長いので一部省略
カラム名 詳細
tps Indicate the number of transfers per second that were issued to the device. Multiple logical requests can be combined into a single I/O request to the device. A transfer is of indeterminate size.
rd_sec/s Number of sectors read from the device. The size of a sector is 512 bytes.
wr_sec/s Number of sectors written to the device. The size of a sector is 512 bytes.
カラム名 詳細(日本語)
tps 1 秒あたりのデバイスに出された転送数。複数の論理的要求は、デバイスに対する 1 つの I/O 要求に纏められることがある。転送のサイズは不定
rd_sec/s バイスから読み出されたセクタ数。セクタのサイズは 512 バイト。
wr_sec/s バイスに書き込まれたセクタ数。セクタのサイズは 512 バイト。

*1:Pretty-print device names. By default names are printed as devn-m where n and m are the major and minor numbers for the device. Use of this option dis- plays the names of the devices as they (should) appear in /dev. Name mappings are controlled by /etc/sysconfig/sysstat.ioconf.