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 @@
...
@@ -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\-
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\-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
...
@@ -31,8 +31,8 @@ Working set size.
...
@@ -31,8 +31,8 @@ Working set size.
\fB\-o\fR \fIoffset\fR
\fB\-o\fR \fIoffset\fR
Offset in input file.
Offset in input file.
.TP
.TP
\fB\-
R
\fR
\fB\-
L
\fR
Use
random offsets in the work set
.
Use
sequential operations rather than random
.
.TP
.TP
\fB\-C\fR
\fB\-C\fR
Use cached I/O.
Use cached I/O.
...
...
ioping.c
View file @
fa5463c6
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
void
usage
(
void
)
void
usage
(
void
)
{
{
fprintf
(
stderr
,
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
"
" [-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
"
...
@@ -51,7 +51,7 @@ void usage(void)
...
@@ -51,7 +51,7 @@ void usage(void)
" -s <size> request size (4k)
\n
"
" -s <size> request size (4k)
\n
"
" -S <wsize> working set size (1m)
\n
"
" -S <wsize> working set size (1m)
\n
"
" -o <offset> in file offset
\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
"
" -C use cached-io
\n
"
" -D use direct-io
\n
"
" -D use direct-io
\n
"
" -h display this message and exit
\n
"
" -h display this message and exit
\n
"
...
@@ -175,7 +175,7 @@ int quiet = 0;
...
@@ -175,7 +175,7 @@ int quiet = 0;
int
period
=
0
;
int
period
=
0
;
int
direct
=
0
;
int
direct
=
0
;
int
cached
=
0
;
int
cached
=
0
;
int
randomize
=
0
;
int
randomize
=
1
;
long
long
interval
=
1000000
;
long
long
interval
=
1000000
;
long
long
deadline
=
0
;
long
long
deadline
=
0
;
...
@@ -198,12 +198,12 @@ void parse_options(int argc, char **argv)
...
@@ -198,12 +198,12 @@ void parse_options(int argc, char **argv)
if
(
argc
<
2
)
if
(
argc
<
2
)
usage
();
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
)
{
switch
(
opt
)
{
case
'h'
:
case
'h'
:
usage
();
usage
();
case
'
R
'
:
case
'
L
'
:
randomize
=
1
;
randomize
=
0
;
break
;
break
;
case
'D'
:
case
'D'
:
direct
=
1
;
direct
=
1
;
...
@@ -458,9 +458,11 @@ int main (int argc, char **argv)
...
@@ -458,9 +458,11 @@ int main (int argc, char **argv)
part_sum
=
part_sum2
=
0
;
part_sum
=
part_sum2
=
0
;
}
}
woffset
+=
size
;
if
(
!
randomize
)
{
if
(
woffset
+
size
>
wsize
)
woffset
+=
size
;
woffset
=
0
;
if
(
woffset
+
size
>
wsize
)
woffset
=
0
;
}
if
(
exiting
)
if
(
exiting
)
break
;
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