1mbuffer(1)                      console utility                     mbuffer(1)
2
3
4

NAME

6       mbuffer - measuring buffer
7

SYNTAX

9       mbuffer [options]
10

DESCRIPTION

12       mbuffer  buffers i/o operations and displays the throughput rate. It is
13       multithreaded, supports network connections, and  offers  more  options
14       than the standard buffer.
15

OPTIONS

17       -i <filename>
18              use filename as input instead of the standard input (needs to be
19              given for multi volume support)
20
21       -I <port>
22              use network port port as input instead of the standard input. If
23              given  a hostname and a port in the form hostname:port the first
24              interface with the IP of hostname will be used.
25
26       -o <filename>
27              use filename as output instead of the standard output (needs  to
28              be  given  for multi volume support, will enable use of sendfile
29              if available)
30
31       -O <hostname:port>
32              write output to hostname:port instead  of  the  standard  output
33              (will enable use of sendfile if available)
34
35       -b <num>
36              use num blocks for buffer (default 256)
37
38       -s <size>
39              use blocks of size bytes for buffer (default 10240)
40
41       -m <size>
42              use a total of size bytes for buffer (default 2MB) - size can be
43              set with a trailing character (b and B for Byte, k for kByte,  M
44              for  MByte, G for Gigabyte, and with % for a percentage of total
45              physical memory)
46
47       -L     lock buffer in memory - this option is not available  for  file-
48              based  buffers  and requires mbuffer to be setuid root (use with
49              care)
50
51       -n <num>
52              num volumes in input device (requires use of option -i for input
53              device specification) [currently multi volume support is EXPERI‐
54              MENTAL]
55
56       -t     use a memory mapped temporaray file as  buffer  (use  with  huge
57              buffers)
58
59       -T <file>
60              as -t but use file instead
61
62       -d     use  blocksize  of  device  for output (needed for some devices,
63              slows output down)
64
65       -D <size>
66              assume an output volume of size bytes (default  infinite)  after
67              which a volume change will be initiated. Small values are useful
68              for the timely testing of multi-volume runs; accurate values  if
69              your  device  doesn't  properly signal end of media. Size can be
70              set with a trailing character (b and B for Byte, k for kByte,  M
71              for MByte, or G for Gigabyte)
72
73       -P <num>
74              start  writing after the buffer has been filled to num% (default
75              0 - start at once)
76
77       -p <num>
78              start reading after the buffer has dropped  below  fillratio  of
79              num% (default 100 - start at once)
80
81       -l <file>
82              log messages to file instead of standard error output
83
84       -u <num>
85              pause num microseconds after each write - might increase perfor‐
86              mance on some drives with very low performace (< 1 MB/sec)
87
88       -r <rate>
89              Set the maximum read rate to <rate>.  <rate>  can  be  given  in
90              either  Bytes,  kBytes,  MBytes, or GBytes per second. To do so,
91              use an apropriate suffix (i.e. k,M,G). This options is useful if
92              you have a tape that is capable to transfer data faster than the
93              host can handle it. In this case you  can  use  this  option  to
94              limit the transfer rate and keep the tape running. Be aware that
95              this is both good for your tape drive, and enhances overall per‐
96              formance, by avoiding tape screwing.
97
98       -R <rate>
99              Same  as  above  only  for  setting  the  transfer limit for the
100              writer.
101
102       -A <cmd>
103              used devices is an autoloader which uses cmd to  load  the  next
104              volume
105
106       -a <time>
107              used  device is an autoloader which takes time seconds to load a
108              new tape
109
110       -f     overwrite output file if it exists already
111
112       -c     write with synchronous data  integrity  support  -  This  option
113              forces  all  writes  to complete before continuing. This enables
114              errors to be reported earlier  and  more  precisely,  but  might
115              decrease performance. Especially systems with high level of data
116              integrity support suffer a huge performance  hit.  Others  might
117              seem  to  be  unaffected, but just neglect support for full syn‐
118              chronous data integrity.
119
120       -v <num>
121              set verbose level to num. Valid values are 0..5 (0 = none,  1  =
122              errors,  2  = warnings, 4 = informations, 5 = debugging informa‐
123              tions). Higher values include lower values messages.
124
125       -q     quiet - do not display the status on the standard error output
126
127       -h, --help
128              Output help information and exit.
129
130       -H, --md5
131              Generate md5 hash of transfered data.
132
133       -V, --version
134              Output version information and exit.
135

ENVIRONMENT VARIABLES

137       If TMPDIR is set, mbuffer allocates storage for file based  buffers  in
138       this directory. If TMPDIR is unset /var/tmp will be used.
139

FILES

141       /bin/mbuffer
142       /var/tmp/mbuffer-*
143

EXAMPLES

145       To run this program with the default options just type:
146
147       mbuffer
148
149       Using  mbuffer  to  do  a  backup  with tar to the default tape device.
150       Options for this example: memory mapped temporary file with a  size  of
151       10 Megabytes, start after 80% of the buffer have been filled.
152
153       tar cf - mydirectory | gzip | mbuffer -t -m 10M -p 80 -f -o $TAPE
154
155       Using mbuffer with 3 tapes for input and extracting the contents in the
156       current work directory:
157
158       mbuffer -n 3 -i $TAPE | gzip -dc | tar xf -
159
160       Using mbuffer to write to multiple tape volumes:
161
162       tar cf - /usr | mbuffer -f -o $TAPE
163
164       Write to multiple tapes and erase every tape before writing:
165
166       tar cf - /usr | mbuffer -A "echo next tape; read a < /dev/tty; mt erase
167       $TAPE" -f -o $TAPE
168
169       Making a backup via network:
170
171       tape server: mbuffer -I 8000 -f -o $TAPE
172
173       backup client: tar zcf - /home | mbuffer -O tapeserver:8000
174

AUTHORS

176       Thomas Maier-Komor <software@maier-komor.de>
177
178

SEE ALSO

180       buffer(1), gpl(7)
181
182
183
184Thomas Maier-Komor                 20070502                         mbuffer(1)
Impressum