MAN page from RedHat 6.X buffer-1.19-1.i386.rpm
BUFFER
Section: User Commands (1)
Updated: 14 May 1990
Index NAME
buffer - very fast reblocking program
SYNTAX
buffer[
-S size] [
-b blocks] [
-s size] [
-m size][
-p percentage] [
-u microseconds] [
-B] [
-t][
-Z] [
-i filename] [
-o filename]
OPTIONS
- -i filename
- Use the given file as the input file. The default is stdin.
- -o filename
- Use the given file as the output file. The default is stdout.
- -S size
- After every chunk this size has been writen print out how much been writen so far.By default this is not set.
- -s size
- Size in bytes of each block. The default blocksize is 10k to matchthe normal output of thetar(1)program.
- -z size
- Combines the-Sand-sflags.
- -b blocks
- Number of blocks to allocate to shared memory circular buffer.Defaults to the number required to fill up the shared memory requested.
- -m size
- Maximum size of the shared memory chunk to allocate for the circularqueue. Defaults to one megabyte.
- -p percentage
- Only start a write when the given percentage of the internal queue isfull. A percentage around 75 often proves best. Defaults to zero.
- -u microseconds
- After every write pause for this many microseconds. Defaults to zero.(Suprisingly a small sleep, 100 usecs, after each write can greatly enhancethroughput on some drives.)
- -B
- Force each block writen to be padded out to the blocksize. This is needed by some tapeand cartridge drives. Defaults to unpadded. This only affects thelast block writen.
- -t
- On exiting print to stderr a brief message showing the total number ofbytes written.
- -Z
- If reading/writing directly to a character device (like a tape drive)then after each gigabyte perform an lseek to the start of the file.Use this flag with extreme care. If can only be used on devices wherean lseek does not rewind the tape but does reset the kernels positionflags. It is used to allow more than 2 gigabytes to be written.
Sizes are a number with an optional trailing character. A 'b' multiplies the size by 512, a 'k' by 1024 and an 'm' by a meg.
DESCRIPTION
Bufferreads from standard input reblocking to the given blocksize and writeseach block to standard output.
Internallybufferis a pair of processes communicating via a large circular queue heldin shared memory. The reader process only has to block when the queueis full and the writer process when the queue is empty.Bufferis designed to try and keep the writer side continuously busy so thatit can stream when writing to tape drives. When used to write tapeswith an intervening networkbuffercan result in a considerable increase in throughput.
The default settings forbufferare normally good enough. If you are a heavy tape user then it isworth your while trying out various different combinations of options.In particular running abufferat both ends of the pipe can provide a substantial increase (see lastexample below).
EXAMPLES
$
buffer < /etc/termcap > /dev/rst8$ tar cf - . | rsh somehost 'buffer > /dev/rst8'
$ dump fu - | rsh somehost 'buffer -s 16k > /dev/nrst8'
$ tar cf - . | buffer |
rsh somehost 'buffer -S 500K -p 75 > /dev/rst0'
BUGS
Internally, for printing purposes, buffer counts in terms of thenumber of kilobytes output. If the blocksize you use is not a wholenumber of kilobytes then the numbers printed will be inaccurate.
THANKS
Thanks to Kevin Twidle <kptAATTdoc.ic.ac.uk> for a lot of earlysuggestions and patches to make it work with non-tar/dump tapes toexabyte drives.
Thanks to Andi Karrer <karrerAATTbernina.ethz.ch>, Rumi Zahir<rumi@iis.ethz.ch> and Christoph Wicki <wickiAATTiis.ethz.ch> for patchesto make buffer work when trying to write single tape files of greaterthan 2 gigabytes.
COPYRIGHT
Copyright (C) 1990, 1991 by Lee McLoughlin.
SEE ALSO
dd(1),
tar(1),
rsh(1)
Index
- NAME
- SYNTAX
- OPTIONS
- DESCRIPTION
- EXAMPLES
- BUGS
- THANKS
- COPYRIGHT
- SEE ALSO
This document was created byman2html,using the manual pages.