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
fa5463c6
Commit
fa5463c6
authored
Jun 01, 2011
by
Konstantin Khlebnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use random operations by defult, add -L option for sequential.
parent
967eeb5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
ioping.1
ioping.1
+3
-3
ioping.c
ioping.c
+11
-9
No files found.
ioping.1
View file @
fa5463c6
...
...
@@ -2,7 +2,7 @@
.SH NAME
ioping \- simple disk I/O latency monitoring tool
.SH SYNOPSYS
\fBioping\fR [\fB\-
R
CDhq\fR] [\fB\-c \fIcount\fR] [\fB\-w \fIdeadline\fR] \
\fBioping\fR [\fB\-
L
CDhq\fR] [\fB\-c \fIcount\fR] [\fB\-w \fIdeadline\fR] \
[\fB\-p \fIperiod\fR] [\fB\-i \fIinterval\fR] [\fB\-s \fIsize\fR] \
[\fB\-S \fIwsize\fR] [\fB\-o \fIoffset\fR] \
\fIdevice\fR | \fIfile\fR | \fIdirectory\fR
...
...
@@ -31,8 +31,8 @@ Working set size.
\fB\-o\fR \fIoffset\fR
Offset in input file.
.TP
\fB\-
R
\fR
Use
random offsets in the work set
.
\fB\-
L
\fR
Use
sequential operations rather than random
.
.TP
\fB\-C\fR
Use cached I/O.
...
...
ioping.c
View file @
fa5463c6
...
...
@@ -41,7 +41,7 @@
void
usage
(
void
)
{
fprintf
(
stderr
,
" Usage: ioping [-
R
CDhq] [-c count] [-w deadline] [-p period] [-i interval]
\n
"
" Usage: ioping [-
L
CDhq] [-c count] [-w deadline] [-p period] [-i interval]
\n
"
" [-s size] [-S wsize] [-o offset] device|file|directory
\n
"
"
\n
"
" -c <count> stop after <count> requests
\n
"
...
...
@@ -51,7 +51,7 @@ void usage(void)
" -s <size> request size (4k)
\n
"
" -S <wsize> working set size (1m)
\n
"
" -o <offset> in file offset
\n
"
" -
R use random offsets in the work set
\n
"
" -
L use sequential operations rather than random
\n
"
" -C use cached-io
\n
"
" -D use direct-io
\n
"
" -h display this message and exit
\n
"
...
...
@@ -175,7 +175,7 @@ int quiet = 0;
int
period
=
0
;
int
direct
=
0
;
int
cached
=
0
;
int
randomize
=
0
;
int
randomize
=
1
;
long
long
interval
=
1000000
;
long
long
deadline
=
0
;
...
...
@@ -198,12 +198,12 @@ void parse_options(int argc, char **argv)
if
(
argc
<
2
)
usage
();
while
((
opt
=
getopt
(
argc
,
argv
,
"-h
R
DCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
while
((
opt
=
getopt
(
argc
,
argv
,
"-h
L
DCqi:w:s:S:c:o:p:"
))
!=
-
1
)
{
switch
(
opt
)
{
case
'h'
:
usage
();
case
'
R
'
:
randomize
=
1
;
case
'
L
'
:
randomize
=
0
;
break
;
case
'D'
:
direct
=
1
;
...
...
@@ -458,9 +458,11 @@ int main (int argc, char **argv)
part_sum
=
part_sum2
=
0
;
}
woffset
+=
size
;
if
(
woffset
+
size
>
wsize
)
woffset
=
0
;
if
(
!
randomize
)
{
woffset
+=
size
;
if
(
woffset
+
size
>
wsize
)
woffset
=
0
;
}
if
(
exiting
)
break
;
...
...
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