Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioping
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ioping
Commits
47019903
Commit
47019903
authored
Jun 10, 2011
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rate test, iops
parent
e14cfa56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
ioping.1
ioping.1
+10
-1
ioping.c
ioping.c
+15
-6
No files found.
ioping.1
View file @
47019903
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.SH NAME
.SH NAME
ioping \- simple disk I/O latency monitoring tool
ioping \- simple disk I/O latency monitoring tool
.SH SYNOPSYS
.SH SYNOPSYS
\fBioping\fR [\fB\-LCDhq\fR] [\fB\-c \fIcount\fR] [\fB\-w \fIdeadline\fR] \
\fBioping\fR [\fB\-LCD
R
hq\fR] [\fB\-c \fIcount\fR] [\fB\-w \fIdeadline\fR] \
[\fB\-p \fIperiod\fR] [\fB\-i \fIinterval\fR] [\fB\-s \fIsize\fR] \
[\fB\-p \fIperiod\fR] [\fB\-i \fIinterval\fR] [\fB\-s \fIsize\fR] \
[\fB\-S \fIwsize\fR] [\fB\-o \fIoffset\fR] \
[\fB\-S \fIwsize\fR] [\fB\-o \fIoffset\fR] \
\fIdevice\fR | \fIfile\fR | \fIdirectory\fR
\fIdevice\fR | \fIfile\fR | \fIdirectory\fR
...
@@ -40,6 +40,9 @@ Use cached I/O.
...
@@ -40,6 +40,9 @@ Use cached I/O.
\fB\-D\fR
\fB\-D\fR
Use direct I/O.
Use direct I/O.
.TP
.TP
\fB\-R\fR
Rate-test, implies: -q -i 0 -w 3
.TP
\fB\-h\fR
\fB\-h\fR
Display help message and exit.
Display help message and exit.
.TP
.TP
...
@@ -97,3 +100,9 @@ until interrupted.
...
@@ -97,3 +100,9 @@ until interrupted.
.TP
.TP
.B ioping -c 10 -s 1M /tmp
.B ioping -c 10 -s 1M /tmp
Measure latency on \fB/tmp\fR using 10 requests of 1 megabyte each.
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.
ioping.c
View file @
47019903
...
@@ -82,19 +82,20 @@ int posix_memalign(void **memptr, size_t alignment, size_t size)
...
@@ -82,19 +82,20 @@ int posix_memalign(void **memptr, size_t alignment, size_t size)
void
usage
(
void
)
void
usage
(
void
)
{
{
fprintf
(
stderr
,
fprintf
(
stderr
,
" Usage: ioping [-LCDhq] [-c count] [-w deadline] [-p period] [-i interval]
\n
"
" Usage: ioping [-LCD
R
hq] [-c count] [-w deadline] [-p period] [-i interval]
\n
"
" [-s size] [-S wsize] [-o offset] device|file|directory
\n
"
" [-s size] [-S wsize] [-o offset] device|file|directory
\n
"
"
\n
"
"
\n
"
" -c <count> stop after <count> requests
\n
"
" -c <count> stop after <count> requests
\n
"
" -w <deadline> stop after <deadline>
\n
"
" -w <deadline> stop after <deadline>
\n
"
" -p <period> print raw statistics for every <period> requests
\n
"
" -p <period> print raw statistics for every <period> requests
\n
"
" -i <interval> interval between requests
(1s)
\n
"
" -i <interval> interval between requests
\n
"
" -s <size> request size
(4k)
\n
"
" -s <size> request size
\n
"
" -S <wsize> working set size
(1m for dirs, full range for others)
\n
"
" -S <wsize> working set size
\n
"
" -o <offset> in file offset
\n
"
" -o <offset> in file offset
\n
"
" -L use sequential operations rather than random
\n
"
" -L use sequential operations rather than random
\n
"
" -C use cached-io
\n
"
" -C use cached-io
\n
"
" -D use direct-io
\n
"
" -D use direct-io
\n
"
" -R rate-test, implies: -q -i 0 -w 3
\n
"
" -h display this message and exit
\n
"
" -h display this message and exit
\n
"
" -q suppress human-readable output
\n
"
" -q suppress human-readable output
\n
"
"
\n
"
"
\n
"
...
@@ -241,13 +242,20 @@ void parse_options(int argc, char **argv)
...
@@ -241,13 +242,20 @@ void parse_options(int argc, char **argv)
exit
(
1
);
exit
(
1
);
}
}
while
((
opt
=
getopt
(
argc
,
argv
,
"hLDCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
while
((
opt
=
getopt
(
argc
,
argv
,
"hL
R
DCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
switch
(
opt
)
{
switch
(
opt
)
{
case
'h'
:
case
'h'
:
usage
();
usage
();
exit
(
0
);
exit
(
0
);
case
'L'
:
case
'L'
:
randomize
=
0
;
randomize
=
0
;
size
=
1
<<
18
;
temp_wsize
=
1
<<
26
;
break
;
case
'R'
:
interval
=
0
;
deadline
=
3000000
;
quiet
=
1
;
break
;
break
;
case
'D'
:
case
'D'
:
direct
=
1
;
direct
=
1
;
...
@@ -609,8 +617,9 @@ int main (int argc, char **argv)
...
@@ -609,8 +617,9 @@ int main (int argc, char **argv)
if
(
!
quiet
||
!
period
)
{
if
(
!
quiet
||
!
period
)
{
printf
(
"
\n
--- %s ioping statistics ---
\n
"
,
path
);
printf
(
"
\n
--- %s ioping statistics ---
\n
"
,
path
);
printf
(
"%d requests completed in %.1f ms, %.1f mb/s
\n
"
,
printf
(
"%d requests completed in %.1f ms, %.
0f iops %.
1f mb/s
\n
"
,
request
,
time_total
/
1000
.,
request
,
time_total
/
1000
.,
request
*
1000000
.
/
time_sum
,
(
double
)
request
*
size
/
time_sum
/
(
double
)
request
*
size
/
time_sum
/
(
1
<<
20
)
*
1000000
);
(
1
<<
20
)
*
1000000
);
printf
(
"min/avg/max/mdev = %.1f/%.1f/%.1f/%.1f ms
\n
"
,
printf
(
"min/avg/max/mdev = %.1f/%.1f/%.1f/%.1f ms
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment