标签:
0 Usage
blktrace: Device configuration, and event extraction utility.
-Store events in long term storge
-Or, pipe to blkparse utility for live tracing
blkparse: Event formatting utility
-Supports textual or binary dump output
$blktrace -d <device> [ -r debug_path ] [ -o output ] [ -k ] [ -w time ]
$blkparse -i <input> []
As noted previously, blktrace does not analyze the data, it is responsible for storing and formatting events.
------------------------------------------------------------------------------------------------------------------------------------------
1.1 blktrace User Guide
The blktrace utility extracts event traces from the kernel (via the relaying through the debug file system).
Alternatively, one may specify the entire mask utilizing a hexadecimal value that is version-specific. (Requires understanding of the internal representation of the filter mask).
The device portion of the event file name can be changed via the -o option.
1.2 Command Line arguments
-d Use specified devices
-r Path to mounted debugfs, defaults to /sys/kernel/debug
-o File(s) to send output to
-k Kill running trace
-w Stop after defined time, in seconds.
-b Sub buffer size in kiB
-n Number of sub buffers
-a Add mask to current filter. Available actions are:READ, WRITE, BARRIER, SYNC, QUEUE, REQUEUE, ISSUE, COMPLETE, FS, PC.
-A Set filter mask to hex-mask
------------------------------------------------------------------------------------------------------------------------------------------
2.1 blkparse User Guide
The blkparse utility will attempt to combine streams of events for various devices on various CPUs, and produce a formatted output of the event information. As with blktrace, some details concerning blkparse will help in understanding the command line options presented below.
blkparse may be run in a live manner concurrently with blktrace by specifying -i - to blkparse, and combining it with the live option for blktrace. An example would be:
% blktrace -d /dev/sda -o - | blkparse -i -
By default, blkparse sends formatted data to standard output. This may be changed via the -o option, or text output can be disabled via the -O option. A merged binary stream can be produced using the -d option.
2.2 Command Line arguments
2.3 Trace actions(Events)
2.4 Output Description and Formatting
------------------------------------------------------------------------------------------------------------------------------------------
Appendix
标签:
原文地址:http://www.cnblogs.com/jason0401/p/5603627.html