GithubHelp home page GithubHelp logo

sdsc / blktrace Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 6.0 1.54 MB

This repository is a mirror of git://git.kernel.dk/blktrace.git

License: GNU General Public License v2.0

Makefile 0.83% C 84.24% Shell 0.14% TeX 12.18% Python 2.61%

blktrace's Introduction

Block IO Tracing
----------------

Written by Jens Axboe <[email protected]> (initial version and kernel support),
Alan D. Brunelle (threading and splitup into two seperate programs),
Nathan Scott <[email protected]> (bug fixes, process names, multiple devices)
Also thanks to Tom Zanussi <[email protected]> for good input and
patches.


Requirements
------------

blktrace was integrated into the mainline kernel between 2.6.16 and 2.6.17-rc1.
The target trace needs to run on a kernel at least that new.

git://git.kernel.dk/blktrace.git

If you don't have git, you can get hourly snapshots from:

http://brick.kernel.dk/snaps/

The snapshots include the full git object database as well. kernel.org has
excessively long mirror times, so if you have git installed, you can pull
the master tree from:

git://git.kernel.dk/blktrace.git

For browsing the repo over http and viewing history etc, you can direct
your browser to:

http://git.kernel.dk/

A blktrace visualization tool, iowatcher, was added to blktrace in version
1.1.0. It requires librsvg and either png2theora or ffmpeg to generate movies.

Usage
-----

$ blktrace -d <dev> [ -r debug_path ] [ -o output ] [ -k ] [ -w time ]
		    [ -a action ] [ -A action mask ]

	-d Use specified device. May also be given last after options.
	-r Path to mounted debugfs, defaults to /sys/kernel/debug.
	-o File(s) to send output to.
	-D Directory to prepend to output file names.
	-k Kill running trace.
	-w Stop after defined time, in seconds.
	-a Only trace specific actions (use more -a options to add actions).
	   Available actions are:

		READ
		WRITE
		BARRIER
		SYNC
		QUEUE
		REQUEUE
		ISSUE
		COMPLETE
		FS
		PC

	-A Give the trace mask directly as a number.

	-b Sub buffer size in KiB.
	-n Number of sub buffers.
	-l Run in network listen mode (blktrace server)
	-h Run in network client mode, connecting to the given host
	-p Network port to use (default 8462)
	-s Disable network client use of sendfile() to transfer data
	-V Print program version info.

$ blkparse -i <input> [ -o <output> ] [ -b rb_batch ] [ -s ] [ -t ] [ -q ]
		      [ -w start:stop ] [ -f output format ] [ -F format spec ]
		      [ -d <binary> ]

	-i Input file containing trace data, or '-' for stdin.
	-D Directory to prepend to input file names.
	-o Output file. If not given, output is stdout.
	-b stdin read batching.
	-s Show per-program io statistics.
	-h Hash processes by name, not pid.
	-t Track individual ios. Will tell you the time a request took to
	   get queued, to get dispatched, and to get completed.
	-q Quiet. Don't display any stats at the end of the trace.
	-w Only parse data between the given time interval in seconds. If
	   'start' isn't given, blkparse defaults the start time to 0.
	-d Dump sorted data in binary format
	-f Output format. Customize the output format. The format field
	   identifiers are:

		%a	- Action
		%c	- CPU ID
		%C	- Task command (process) name
		%d	- Direction (r/w)
		%D	- Device number
		%e	- Error number
		%M	- Major
		%m	- Minor
		%N	- Number of bytes
		%n	- Number of sectors
		%p	- PID
		%P	- PDU
		%s	- Sequence number
		%S	- Sector number
		%t	- Time (wallclock - nanoseconds)
		%T	- Time (wallclock - seconds)
		%u	- Time (processing - microseconds)
		%U	- Unplug depth

	-F Format specification. The individual specifiers are:

		A	- Remap
		B	- Bounce
		C	- Complete
		D	- Issue
		M	- Back merge
		F	- Front merge
		G	- Get request
		I	- Insert
		P	- Plug
		Q	- Queue
		R	- Requeue
		S	- Sleep requests
		T	- Unplug timer
		U	- Unplug IO
		W	- Bounce
		X	- Split

	-v More verbose for marginal errors.
	-V Print program version info.

$ verify_blkparse filename

	Verifies an output file from blkparse. All it does is check if
	the events in the file are correctly time ordered. If an entry
	is found that isn't ordered, it's dumped to stdout.

$ blkrawverify <dev> [<dev>...]

	The blkrawverify utility can be used to verify data retrieved
	via blktrace. It will check for valid event formats, forward
	progressing sequence numbers and time stamps, also does reasonable
	checks for other potential issues within invidividual events.

	Errors found will be tracked in <dev>.verify.out.

If you want to do live tracing, you can pipe the data between blktrace
and blkparse:

% blktrace -d <device> -o - | blkparse -i -

This has a small risk of displaying some traces a little out of sync, since
it will do batch sorts of input events. Similarly, you can do traces over
the network. The network 'server' must run:

% blktrace -l

to listen to incoming blktrace connections, while the client should use

% blktrace -d /dev/sda -h <server hostname>

to connect and transfer data over the network.


Documentation
-------------

A users guide is distributed with the source. It is in latex, a
'make docs' will build a PDF in doc/. You need tetex and latex installed
to build the document.


Resources
---------

vger hosts a mailing list dedicated to btrace discussion and development.
The list is called [email protected], subscribe by sending
a mail to [email protected] with 'subscribe linux-btrace' in
the mail body.



2006-09-05, Jens Axboe <[email protected]>

blktrace's People

Contributors

natoscott avatar andyprice avatar jankara avatar axboe avatar baszoetekouw avatar masoncl avatar taoma-tm avatar jeffmoyer avatar dwmw2 avatar vincele avatar sectorsize512 avatar zanussi avatar schiele avatar olafhering avatar nikitadanilov avatar namhyung avatar liubogithub avatar kraj avatar jteravest avatar malyzelenyhnus avatar etsukata avatar daveboutcher avatar chlunde avatar kvaneesh avatar polvi avatar

Stargazers

 avatar  avatar MingWangSong avatar Shuwen Sun avatar Zhao Weng avatar Amber Lin avatar ringsaturn avatar 刘泊 avatar Qiliang Li avatar Jeff Xie avatar Chenfei avatar

Watchers

Trevor Cooper avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.