.TH IOPING "1" "Oct 2014" "" "User Commands" .SH NAME ioping \- simple disk I/O latency monitoring tool .SH SYNOPSYS .SY ioping .OP \-ABCDLRWGYykq .OP \-c count .OP \-i interval .OP \-l speed .OP \-t time .OP \-T time .OP \-s size .OP \-S wsize .OP \-o offset .OP \-w deadline .OP \-p period .OP \-P period .IR directory | file | device .br .SY ioping .B -h | .B -v .br .SH DESCRIPTION This tool generates various I/O patterns and lets you monitor I/O speed and latency in real time. .SH OPTIONS .TP .BI \-c \ count Stop after \fIcount\fR requests. .TP .BI \-i \ interval Set time between requests to \fIinterval\fR (\fB1s\fR). .TP .BI \-l \ speed Set \fIspeed\fR limit in bytes per second. Set interval to request-size / speed. .TP .BI \-t \ time Minimal valid request time (\fB0us\fR). Too fast requests are ignored in statistics. .TP .BI \-T \ time Maximum valid request time. Too slow requests are ignored in statistics. .TP .BI \-s \ size Request size (\fB4k\fR). .TP .BI \-S \ wsize Working set size (\fB1m\fR for directory, whole size for file or device). .TP .BI \-o \ offset Starting offset in the file/device (0). .TP .BI \-w \ deadline Stop after \fIdeadline\fR time passed. .TP .BI \-p \ period Print raw statistics for every \fIperiod\fR requests (see format below). .TP .BI \-P \ period Print raw statistics for every \fIperiod\fR in time. .TP .B \-A Use asynchronous I/O (\fBio_setup\fR(2), \fBio_submit\fR(2) etc syscalls). .TP .B \-B Batch mode. Be quiet and print final statistics in raw format. .TP .B \-C Use cached I/O. Suppress cache invalidation via \fBposix_fadvise\fR(2)) before read and \fBfdatasync\fR(2) after each write. .TP .B \-D Use direct I/O (see \fBO_DIRECT\fR in \fBopen\fR(2)). .TP .B \-L Use sequential operations rather than random. This also sets default request size to \fB256k\fR (as in \fB-s 256k\fR). .TP .B \-R Disk seek rate test. This option suppress human-readable output for each request (as \fB-q\fR), sets default interval to zero (\fB-i 0\fR), stops measurement after 3 seconds (\fB-w 3\fR) and increases default working set size to 64m (\fB-S 64m\fR). Working set (\fB-S\fR) should be increased accordingly if disk has huge cache. .TP .B \-W Use writes rather than reads. Safe for directory target. Write I/O gives more reliable results for systems where non-cached reads are not supported or cached at some level. Might be \fB*DANGEROUS*\fR for file/device: it will shred your data. In this case should be repeated three times (\fB-WWW\fR). .TP .B \-G Alternate read and write requests. .TP .B \-Y Use sync I/O (see \fBO_SYNC\fR in \fBopen\fR(2)). .TP .B \-y Use data sync I/O (see \fBO_DSYNC\fR in \fBopen\fR(2)). .TP .BI \-k Keep and reuse temporary working file "ioping.tmp" (only for directory target). .TP .B \-q Suppress periodical human-readable output. .TP .B \-h Display help message and exit. .TP .B \-v Display version and exit. .SS Argument suffixes For options that expect time argument (\fB\-i\fR, \fB\-P\fR and \fB\-w\fR), default is seconds, unless you specify one of the following suffixes (case-insensitive): .TP .BR ns ,\ nsec nanoseconds (a billionth of a second, 1 / 1 000 000 000) .TP .BR us ,\ usec microseconds (a millionth of a second, 1 / 1 000 000) .TP .BR ms ,\ msec milliseconds (a thousandth of a second, 1 / 1 000) .TP .BR s ,\ sec seconds .TP .BR m ,\ min minutes .TP .BR h ,\ hour hours .PP For options that expect "size" argument (\fB\-s\fR, \fB\-S\fR and \fB\-o\fR), default is bytes, unless you specify one of the following suffixes (case-insensitive): .TP .B sector disk sectors (a sector is always 512). .TP .BR KiB ,\ k ,\ kb kilobytes (1 024 bytes) .TP .B page memory pages (a page is always 4KiB). .TP .BR MiB ,\ m ,\ mb megabytes (1 048 576 bytes) .TP .BR GiB ,\ g ,\ gb gigabytes (1 073 741 824 bytes) .TP .BR TiB ,\ t ,\ tb terabytes (1 099 511 627 776 bytes) .PP For options that expect "number" argument (\fB-p\fR and \fB-c\fR) you can optionally specify one of the following suffixes (case-insensitive): .TP .B k kilo (thousands, 1 000) .TP .B m mega (millions, 1 000 000) .TP .B g giga (billions, 1 000 000 000) .TP .B t tera (trillions, 1 000 000 000 000) .SH EXIT STATUS Returns \fB0\fR upon success. The following error codes are defined: .TP .B 1 Invalid usage (error in arguments). .TP .B 2 Error during preparation stage. .TP .B 3 Error during runtime. .SH RAW STATISTICS .B ioping -p 100 -c 200 -i 0 -q . .ad l .br \f(CW99 10970974 9024 36961531 90437 110818 358872 30756 100 12516420 .br 100 9573265 10446 42785821 86849 95733 154609 10548 100 10649035 .br (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) .br .br (1) count of requests in statistics .br (2) running time (nanoseconds) .br (3) requests per second (iops) .br (4) transfer speed (bytes per second) .br (5) minimal request time (nanoseconds) .br (6) average request time (nanoseconds) .br (7) maximum request time (nanoseconds) .br (8) request time standard deviation (nanoseconds) .br (9) total requests (including warmup, too slow or too fast) .br (10) total running time (nanoseconds) .SH EXAMPLES .TP .B ioping . Show disk I/O latency using the default values and the current directory, until interrupted. This command prepares temporary (unlinked/hidden) working file and reads random chunks from it using non-cached read requests. .TP .B ioping -c 10 -s 1M /tmp Measure latency on \fB/tmp\fR using 10 requests of 1 megabyte each. .TP .B ioping -R /dev/sda Measure disk seek rate. .TP .B ioping -RL /dev/sda Measure disk sequential speed. .TP .B ioping -RLB . | awk '{print $4}' Get disk sequential speed in bytes per second. .SH SEE ALSO .BR iostat (1), .BR dd (1), .BR fio (1), .BR stress (1), .BR stress-ng (1), .BR dbench (1), .BR sysbench (1), .BR fsstress, .BR xfstests, .BR hdparm (8), .BR badblocks (8), .BR .SH HOMEPAGE .UR https://github.com/koct9i/ioping/ .UE . .SH AUTHORS This program was written by Konstantin Khlebnikov .MT koct9i@gmail.com .ME . .br Man-page was written by Kir Kolyshkin .MT kir@openvz.org .ME .