1FILE_IO(3)                        file_io 1.3                       FILE_IO(3)
2
3
4

NAME

6       nfstest.file_io - File I/O module
7

DESCRIPTION

9       Provides  an  interface  to  create  and  manipulate files of different
10       types.  The arguments allow running for a specified period of  time  as
11       well as running multiple processes. Each process modifies a single file
12       at a time and the file name space is  different  for  each  process  so
13       there  are  no collisions between two different processes modifying the
14       same file.
15
16       File types:
17         - Regular file
18         - Hard link
19         - Symbolic link
20
21       File operations:
22         - Open (create or re-open)
23         - Open downgrade
24           This is done by opening the file for read and write, then the  file
25       is
26           opened  again  as  read only and finally closing the read and write
27       file
28           descriptor
29         - Read (sequential or random access)
30         - Write (sequential or random access)
31         - Remove
32         - Rename
33         - Truncate (path or file descriptor)
34         - Readdir
35         - Lock
36         - Unlock
37         - Tlock
38

CLASSES

40   class FileIO(baseobj.BaseObj)
41       FileIO object
42
43       Usage:
44           from nfstest.file_io import FileIO
45
46           # Instantiate FileIO object given top level directory
47           x = FileIO(datadir="/tmp/data")
48
49           # Run workload creating the top level directory if necessary
50           x.run()
51
52
53       Methods defined here:
54       ---------------------
55
56       __del__(self)
57       Destructor
58
59       __init__(self, **kwargs)
60       Constructor
61
62       Initialize object's private data
63
64
65              datadir:
66                     Top level directory where files will be created,
67                     it will be created if it does not exist
68
69              seed:  Seed to initialized the random number generator
70                     [default: automatically generated]
71
72              nprocs:
73                     Number of processes to use [default: 1]
74
75              runtime:
76                     Run time [default: 0 (indefinitely)]
77
78              verbose:
79                     Verbose level: none|info|debug|dbg1-7|all [default: 'none']
80
81              exiterr:
82                     Exit on first error [default: False]
83
84              read:  Read file percentage [default: 40.0]
85
86              write: Write file percentage [default: 40.0]
87
88              rdwr:  Read/write file percentage [default: 20.0]
89
90              randio:
91                     Random file access percentage [default: 50.0]
92
93              iodelay:
94                     Seconds to delay I/O operations [default: 0.0]
95
96              direct:
97                     Use direct I/O [default: False]
98
99              rdwronly:
100                     Use read and write only, no rename, remove, etc. [default: False]
101
102              create:
103                     Create file percentage [default: 5.0]
104
105              odgrade:
106                     Open downgrade percentage [default: 5.0]
107
108              osync: Open file with O_SYNC [default: 10.0]
109
110              fsync: Percentage of fsync after write [default: 2.0]
111
112              rename:
113                     Rename file percentage [default: 5.0]
114
115              remove:
116                     Remove file percentage [default: 5.0]
117
118              trunc: Truncate file percentage [default: 2.0]
119
120              ftrunc:
121                     Truncate opened file percentage [default: 2.0]
122
123              link:  Create hard link percentage [default: 1.0]
124
125              slink: Create symbolic link percentage [default: 0.2]
126
127              readdir:
128                     List contents of directory percentage [default: 0.5]
129
130              lock:  Lock file percentage [default: 20.0]
131
132              unlock:
133                     Unlock file percentage [default: 80.0]
134
135              tlock: Lock test percentage [default: 20.0]
136
137              lockfull:
138                     Lock full file percentage [default: 50.0]
139
140              minfiles:
141                     Minimum number of files to create before any file operation
142                     is executed [default: 10]
143
144              fsizeavg:
145                     File size average [default: 1m]
146
147              fsizedev:
148                     File size standard deviation [default: 256k]
149
150              rsize: Read block size [default: 64k]
151
152              rsizedev:
153                     Read block size standard deviation [default: 8k]
154
155              wsize: Write block size [default: 64k]
156
157              wsizedev:
158                     Write block size standard deviation [default: 8k]
159
160              sizemult:
161                     Size multiplier [default: 1.0]
162
163              createlog:
164                     Create log file [default: False]
165
166              createlogs:
167                     Create a log file for each process [default: False]
168
169              logdir:
170                     Log directory [default: '/tmp']
171
172       get_mountpoint(self)
173       Get mount point from data directory
174
175       run(self)
176       Main function where all processes are started
177
178       run_process(self, tid=0)
179       Main loop for each process
180
181   class FileObj(baseobj.BaseObj)
182       # File object
183
184
185   class TermSignal(exceptions.Exception)
186       Exception to be raised on SIGTERM signal
187
188

FUNCTIONS

190   stop_handler(signum, frame)
191       Signal handler to catch SIGTERM and allow for graceful  termination  of
192       subprocesses
193

SEE ALSO

195       baseobj(3), formatstr(3)
196
197

BUGS

199       No known bugs.
200

AUTHOR

202       Jorge Mora (mora@netapp.com)
203
204
205
206NFStest 2.1.5                  14 February 2017                     FILE_IO(3)
Impressum