blktrace を使ってみる

[root@yazekats-linux ~]# blktrace -d /dev/sda -o -|blkparse -i - 
Invalid debug path /sys/kernel/debug: 0/Success

と怒られた。

[root@yazekats-linux ~]# mount -t debugfs debugfs /sys/kernel/debug

とすると、使えるようになった。

[root@yazekats-linux ~]# blktrace -d /dev/sda -o -|blkparse -i - 
  8,0    2        1     0.000000000     0  C  WS 776874696 + 104 [0]
  8,0    2        2     0.000461218     0  C  WS 529211360 + 8 [0]
  8,0    2        3     0.000471493     0  C  WS 529211368 + 8 [0]
  8,0    2        4     0.000477536     0  C  WS 529211376 + 8 [0]
  8,0    2        5     0.000483273     0  C  WS 529211384 + 8 [0]
  8,0    2        6     0.000488970     0  C  WS 529211392 + 8 [0]
  8,0    2        7     0.000668897     0  C  WS 529211408 + 8 [0]
  8,0    2        8     0.000674865     0  C  WS 529211416 + 8 [0]
  8,0    2        9     0.000679450     0  C  WS 529211424 + 8 [0]
  8,0    2       10     0.000687817     0  C  WS 529211400 + 8 [0]
  8,0    2       11     0.000692372     0  C  WS 529211432 + 8 [0]
  8,2    2       12     0.000729250  1741  A  WS 0 + 0 <- (252,0) 0
  8,0    2       13     0.000729895  1741  Q  WS [jbd2/dm-3-8]
  8,0    2       14     0.000730823  1741  G  WS [jbd2/dm-3-8]
  8,0    2       15     0.000731882  1741  I  WS [jbd2/dm-3-8]
  8,0    2       16     0.000752635     0  C  WS 0 [0]
  8,0    2       17     0.000810474 19357  A  WS 529211440 + 8 <- (8,2) 528185392
  8,0    2       18     0.000810817 19357  Q  WS 529211440 + 8 [kworker/2:0]
  8,0    2       19     0.000811429 19357  G  WS 529211440 + 8 [kworker/2:0]
  8,0    2       20     0.000812277 19357  I  WS 529211440 + 8 [kworker/2:0]
  8,0    2       21     0.000812828 19357  D  WS 529211440 + 8 [kworker/2:0]
  8,0    2       22     0.001177404     0  C  WS 529211440 + 8 [0]
  8,0    2       23     0.001204732     0  C  WS 529211440 [0]
  8,0    3        6     0.000176578 19355  A  WS 529211360 + 8 <- (8,2) 528185312
  8,0    3        7     0.000177189 19355  Q  WS 529211360 + 8 [kworker/3:1]
  8,0    3        8     0.000179527 19355  G  WS 529211360 + 8 [kworker/3:1]
  8,0    3        9     0.000180732 19355  I  WS 529211360 + 8 [kworker/3:1]
  8,0    3       10     0.000181717 19355  D  WS 529211360 + 8 [kworker/3:1]
  8,0    3       11     0.000226696 19355  A  WS 529211368 + 8 <- (8,2) 528185320
  8,0    3       12     0.000227037 19355  Q  WS 529211368 + 8 [kworker/3:1]
  8,0    3       13     0.000227705 19355  G  WS 529211368 + 8 [kworker/3:1]
  8,0    3       14     0.000228293 19355  I  WS 529211368 + 8 [kworker/3:1]
  8,0    3       15     0.000228693 19355  D  WS 529211368 + 8 [kworker/3:1]
  8,0    3       16     0.000270026 19355  A  WS 529211376 + 8 <- (8,2) 528185328
  8,0    3       17     0.000270350 19355  Q  WS 529211376 + 8 [kworker/3:1]
  8,0    3       18     0.000270911 19355  G  WS 529211376 + 8 [kworker/3:1]
  8,0    3       19     0.000271322 19355  I  WS 529211376 + 8 [kworker/3:1]
  8,0    3       20     0.000271662 19355  D  WS 529211376 + 8 [kworker/3:1]
  8,0    3       21     0.000312341 19355  A  WS 529211384 + 8 <- (8,2) 528185336
  8,0    3       22     0.000312638 19355  Q  WS 529211384 + 8 [kworker/3:1]
  8,0    3       23     0.000313132 19355  G  WS 529211384 + 8 [kworker/3:1]
  8,0    3       24     0.000313573 19355  I  WS 529211384 + 8 [kworker/3:1]
  8,0    3       25     0.000313880 19355  D  WS 529211384 + 8 [kworker/3:1]
  8,0    3       26     0.000354956 19355  A  WS 529211392 + 8 <- (8,2) 528185344
  8,0    3       27     0.000355250 19355  Q  WS 529211392 + 8 [kworker/3:1]
  8,0    3       28     0.000355728 19355  G  WS 529211392 + 8 [kworker/3:1]
  8,0    3       29     0.000356098 19355  I  WS 529211392 + 8 [kworker/3:1]
  8,0    3       30     0.000356369 19355  D  WS 529211392 + 8 [kworker/3:1]
  8,0    3       31     0.000406912 19355  A  WS 529211400 + 8 <- (8,2) 528185352
  8,0    3       32     0.000407242 19355  Q  WS 529211400 + 8 [kworker/3:1]
  8,0    3       33     0.000407914 19355  G  WS 529211400 + 8 [kworker/3:1]
  8,0    3       34     0.000408662 19355  I  WS 529211400 + 8 [kworker/3:1]
  8,0    3       35     0.000409099 19355  D  WS 529211400 + 8 [kworker/3:1]
  8,0    3       36     0.000455130 19355  A  WS 529211408 + 8 <- (8,2) 528185360
  8,0    3       37     0.000455685 19355  Q  WS 529211408 + 8 [kworker/3:1]
  8,0    3       38     0.000457017 19355  G  WS 529211408 + 8 [kworker/3:1]
  8,0    3       39     0.000457772 19355  I  WS 529211408 + 8 [kworker/3:1]
  8,0    3       40     0.000458380 19355  D  WS 529211408 + 8 [kworker/3:1]
  8,0    3       41     0.000506641 19355  A  WS 529211416 + 8 <- (8,2) 528185368
  8,0    3       42     0.000507055 19355  Q  WS 529211416 + 8 [kworker/3:1]
  8,0    3       43     0.000507723 19355  G  WS 529211416 + 8 [kworker/3:1]
  8,0    3       44     0.000508351 19355  I  WS 529211416 + 8 [kworker/3:1]
  8,0    3       45     0.000508755 19355  D  WS 529211416 + 8 [kworker/3:1]
  8,0    3       46     0.000552532 19355  A  WS 529211424 + 8 <- (8,2) 528185376
  8,0    3       47     0.000552856 19355  Q  WS 529211424 + 8 [kworker/3:1]
  8,0    3       48     0.000553463 19355  G  WS 529211424 + 8 [kworker/3:1]
  8,0    3       49     0.000553968 19355  I  WS 529211424 + 8 [kworker/3:1]
  8,0    3       50     0.000554342 19355  D  WS 529211424 + 8 [kworker/3:1]
  8,0    3       51     0.000595678 19355  A  WS 529211432 + 8 <- (8,2) 528185384
  8,0    3       52     0.000595998 19355  Q  WS 529211432 + 8 [kworker/3:1]
  8,0    3       53     0.000596583 19355  G  WS 529211432 + 8 [kworker/3:1]
  8,0    3       54     0.000597064 19355  I  WS 529211432 + 8 [kworker/3:1]
  8,0    3       55     0.000597441 19355  D  WS 529211432 + 8 [kworker/3:1]
^C  8,0    3        1 1266874889.708395846 19355  A  WS 776874696 + 104 <- (8,2) 775848648
  8,0    3        2 1266874889.708396650 19355  Q  WS 776874696 + 104 [kworker/3:1]
  8,0    3        3 1266874889.708400267 19355  G  WS 776874696 + 104 [kworker/3:1]
  8,0    3        4 1266874889.708403570 19355  I  WS 776874696 + 104 [kworker/3:1]
  8,0    3        5 1266874889.708406010 19355  D  WS 776874696 + 104 [kworker/3:1]
CPU2 (8,0):
 Reads Queued:           0,        0KiB	 Writes Queued:           2,        4KiB
 Read Dispatches:        0,        0KiB	 Write Dispatches:        1,        4KiB
 Reads Requeued:         0		 Writes Requeued:         0
 Reads Completed:        0,        0KiB	 Writes Completed:       14,       96KiB
 Read Merges:            0,        0KiB	 Write Merges:            0,        0KiB
 Read depth:             0        	 Write depth:            11
 IO unplugs:             0        	 Timer unplugs:           0
CPU3 (8,0):
 Reads Queued:           0,        0KiB	 Writes Queued:          11,       92KiB
 Read Dispatches:        0,        0KiB	 Write Dispatches:       11,       92KiB
 Reads Requeued:         0		 Writes Requeued:         0
 Reads Completed:        0,        0KiB	 Writes Completed:        0,        0KiB
 Read Merges:            0,        0KiB	 Write Merges:            0,        0KiB
 Read depth:             0        	 Write depth:            11
 IO unplugs:             0        	 Timer unplugs:           0

Total (8,0):
 Reads Queued:           0,        0KiB	 Writes Queued:          13,       96KiB
 Read Dispatches:        0,        0KiB	 Write Dispatches:       12,       96KiB
 Reads Requeued:         0		 Writes Requeued:         0
 Reads Completed:        0,        0KiB	 Writes Completed:       14,       96KiB
 Read Merges:            0,        0KiB	 Write Merges:            0,        0KiB
 IO unplugs:             0        	 Timer unplugs:           0

Throughput (R/W): 0KiB/s / 0KiB/s
Events (8,0): 78 entries
Skips: 0 forward (0 -   0.0%)