-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
79 lines (57 loc) · 2.64 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Yngwie
------
Random I/O Performance Measurement Tool
Copyright 2011-2012 (c) Felipe Franciosi <[email protected]>
Disclaimer:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Description:
This program performs read or write operations at random locations
of a block device and outputs the time (milliseconds) taken for the
operation to complete.
The output is in the form: O C B T, where:
O - Offset where the operation was performed
C - Number of times the operation was executed
B - Buffer size
T - Time (ms) to complete the operation
The time is printed in milliseconds and includes *only* the time spent
in the I/O operations.
Compiling:
gcc -o yngwie yngwie.c -lrt -Wall -O3 -s
Usage:
./yngwie < -r | -w | -i > < -d dev_name > [ -hysv[v] ] [ -b buf_size ] [ -c count ] [ -o offset ]
One of the following operation modes must be selected:
-r Read from device.
-w Write to device (*CAUTION* This will overwrite the device).
-i Print information about the device (default) to stderr.
The device must be specified as follows:
-d <dev_name> For example: /dev/sdb
The following options are available for both reading and writing:
-b <buf_size> Buffer size, in bytes.
-c <count> Repeat the operation <count> times.
-o <offset> Offsets <offset> bytes prior to I/O operations.
-s Seek back to the offset before the next count.
-y Open device with O_SYNC (see open(2) man page).
-v Print output of "-i" when reading or writing as well.
Changelog:
2011.10.19 - Felipe Franciosi
- Program creation.
2011.11.01 - Felipe Franciosi
- Major modifications.
2011.12.06 - Felipe Franciosi
- Include counter option.
2011.12.19 - Felipe Franciosi
- Include optional O_SYNC.
2012.01.16 - Felipe Franciosi
- Comitting to github. yay!
TODO:
add a -B option that buffers all (or most of) the output prior to flushing it
(useful to prevent disk seeking when outputing to the same device being evaluated)