FILE_IO - Online Linux Manual PageSection : 3
Updated : 14 February 2017
Source : NFStest 2.1.5
Note : file_io 1.3
NAMEnfstest.file_io - File I/O module
DESCRIPTIONProvides an interface to create and manipulate files of different types. The arguments allow running for a specified period of time as well as running multiple processes. Each process modifies a single file at a time and the file name space is different for each process so there are no collisions between two different processes modifying the same file. File types:
- Regular file
- Hard link
- Symbolic link File operations:
- Open (create or re-open)
- Open downgrade
This is done by opening the file for read and write, then the file is
opened again as read only and finally closing the read and write file
descriptor
- Read (sequential or random access)
- Write (sequential or random access)
- Remove
- Rename
- Truncate (path or file descriptor)
- Readdir
- Lock
- Unlock
- Tlock
CLASSES
class FileIO(baseobj.BaseObj)FileIO object
Usage:
from nfstest.file_io import FileIO
# Instantiate FileIO object given top level directory
x = FileIO(datadir="/tmp/data")
# Run workload creating the top level directory if necessary
x.run()
Methods defined here:
---------------------
__del__(self)
Destructor
__init__(self, **kwargs)
Constructor
Initialize object's private data
datadir:
Top level directory where files will be created,
it will be created if it does not exist
seed:
Seed to initialized the random number generator
[default: automatically generated]
nprocs:
Number of processes to use [default: 1]
runtime:
Run time [default: 0 (indefinitely)]
verbose:
Verbose level: none|info|debug|dbg1-7|all [default: 'none']
exiterr:
Exit on first error [default: False]
read:
Read file percentage [default: 40.0]
write:
Write file percentage [default: 40.0]
rdwr:
Read/write file percentage [default: 20.0]
randio:
Random file access percentage [default: 50.0]
iodelay:
Seconds to delay I/O operations [default: 0.0]
direct:
Use direct I/O [default: False]
rdwronly:
Use read and write only, no rename, remove, etc. [default: False]
create:
Create file percentage [default: 5.0]
odgrade:
Open downgrade percentage [default: 5.0]
osync:
Open file with O_SYNC [default: 10.0]
fsync:
Percentage of fsync after write [default: 2.0]
rename:
Rename file percentage [default: 5.0]
remove:
Remove file percentage [default: 5.0]
trunc:
Truncate file percentage [default: 2.0]
ftrunc:
Truncate opened file percentage [default: 2.0]
link:
Create hard link percentage [default: 1.0]
slink:
Create symbolic link percentage [default: 0.2]
readdir:
List contents of directory percentage [default: 0.5]
lock:
Lock file percentage [default: 20.0]
unlock:
Unlock file percentage [default: 80.0]
tlock:
Lock test percentage [default: 20.0]
lockfull:
Lock full file percentage [default: 50.0]
minfiles:
Minimum number of files to create before any file operation
is executed [default: 10]
fsizeavg:
File size average [default: 1m]
fsizedev:
File size standard deviation [default: 256k]
rsize:
Read block size [default: 64k]
rsizedev:
Read block size standard deviation [default: 8k]
wsize:
Write block size [default: 64k]
wsizedev:
Write block size standard deviation [default: 8k]
sizemult:
Size multiplier [default: 1.0]
createlog:
Create log file [default: False]
createlogs:
Create a log file for each process [default: False]
logdir:
Log directory [default: '/tmp']
get_mountpoint(self)
Get mount point from data directory
run(self)
Main function where all processes are started
run_process(self, tid=0)
Main loop for each process
class FileObj(baseobj.BaseObj)# File object
class TermSignal(exceptions.Exception)Exception to be raised on SIGTERM signal
FUNCTIONS
stop_handler(signum, frame)Signal handler to catch SIGTERM and allow for graceful termination of subprocesses
SEE ALSObaseobj(3), formatstr(3)
BUGSNo known bugs.
AUTHORJorge Mora (mora@netapp.com) 0
Johanes Gumabo
Data Size : 22,094 byte
man-nfstest.file_io.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 172,932
Visitor ID : :
Visitor IP : 3.15.18.73 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.