Table of Contents

Name

fblckgen - Fast block generator

Synopsis

fblckgen [-a|-r] [-q] [-v] [-b blocksize] [-c count]

Description

fblckgen generates blocks of data, either a repeating ascii sequence which is very compressible, or a pseudo- random binary sequence, which, although very simple, does not compress. Very handy for benchmarking tape drives, or just making a sized lump of data. By using double buffering and either pthreads or multiple processes, it can generally keep a tape drive busy.

Data is written directly to a copy of the standard output file descriptor. Shell redirection must be used to output to an alternate destination.

Before exiting, fblckgen writes a single summary line to standard error, containing statistics from the run.

Options

-a
Instructs fblckgen to generate blocks of a repeating ASCII sequence, from octal 040 (` ', space), through octal 176 (`~', tilde). The sequence repeats, without newlines. This the default mode of operation.
-b blocksize
Writes blocks of size blocksize to standard output. If not specified, a blocksize of `1s', 512 bytes, is used.
-c count
Writes count blocks, or until error if count is zero. If not specified, a default of `1k', 1024, is used.
-q
Quiet operation, suppresses the printing of the summary line.
-r
Instructs fblckgen to generate a pseudo-random sequence, based on an inlined copy of rand(3).
-v
Verbose: regularly prints a status line showing current progress.

All numeric arguments may take an optional letter suffix, similar to the strsuftollx(3) function introduced in NetBSD.

s
sector; multiply by 512.
k
kibibytes; multiply by 1024 or 2^10.
m
mebibytes; multiply by 1048576 or 2^20.
g
gibibytes; multiply by 2^30.
t
tebibytes; multiply by 2^40.
p
pebibytes; multiply by 2^50.
e
exbibytes; multiply by 2^60.

Exit Status

fblckgen exits 0 on success, and >0 if an error occurred.

Examples

Filling an LTO1 tape with pseudo-random data:


sh$ fblckgen -rb 64k -c 0 > /dev/nrst1
Write failed: Input/output error
105722740736 bytes written in 7064.506 secs (14614.590 KB/sec)

See Also

iohammer(1), mbdd(1)

Author

fblckgen and the rest of the iotools were developed by Paul Ripke, <stixpjr@gmail.com>. See <http://stix.id.au/wiki/iotools> for the current version.


Table of Contents