forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch implements tape statistics in the st module via sysfs. Current no statistics are available for tape I/O and there is no easy way to reuse the block layer statistics for tape as tape is a character device and does not have perform I/O in sector sized chunks (the size of the data written to tape can change). For tapes we also need extra stats related to things like tape movement (via other I/O). There have been multiple end users requesting statistics including AT&T (and some HP customers who have not given permission to be named). It is impossible for them to investigate any issues related to tape performance in a non-invasive way. [jejb: eliminate PRId64] Signed-off-by: Shane Seymour <[email protected]> Tested-by: Shane Seymour <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: James Bottomley <[email protected]>
- Loading branch information
Seymour, Shane M
authored and
James Bottomley
committed
Jun 2, 2015
1 parent
ba92999
commit 05545c9
Showing
4 changed files
with
461 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
What: /sys/class/scsi_tape/*/stats/in_flight | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Show the number of I/Os currently in-flight between the st | ||
module and the SCSI mid-layer. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/io_ns | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total amount of time spent waiting for all I/O | ||
to and from the tape drive to complete. This includes all | ||
reads, writes, and other SCSI commands issued to the tape | ||
drive. An example of other SCSI commands would be tape | ||
movement such as a rewind when a rewind tape device is | ||
closed. This item is measured in nanoseconds. | ||
|
||
To determine the amount of time spent waiting for other I/O | ||
to complete subtract read_ns and write_ns from this value. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/other_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
The number of I/O requests issued to the tape drive other | ||
than SCSI read/write requests. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/read_byte_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total number of bytes requested from the tape drive. | ||
This value is presented in bytes because tape drives support | ||
variable length block sizes. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/read_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total number of read requests issued to the tape | ||
drive. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/read_ns | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total amount of time in nanoseconds waiting for | ||
read I/O requests to complete. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/write_byte_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total number of bytes written to the tape drive. | ||
This value is presented in bytes because tape drives support | ||
variable length block sizes. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/write_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total number of write requests issued to the tape | ||
drive. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/write_ms | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the total amount of time in nanoseconds waiting for | ||
write I/O requests to complete. | ||
Users: | ||
|
||
|
||
What: /sys/class/scsi_tape/*/stats/resid_cnt | ||
Date: Apr 2015 | ||
KernelVersion: 4.2 | ||
Contact: Shane Seymour <[email protected]> | ||
Description: | ||
Shows the number of times we found that a residual >0 | ||
was found when the SCSI midlayer indicated that there was | ||
an error. For reads this may be a case of someone issuing | ||
reads greater than the block size. | ||
Users: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.