OnWorks favicon

mbuffer - Online in the Cloud

Run mbuffer in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command mbuffer that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



mbuffer - measuring buffer


mbuffer [options]


mbuffer buffers I/O operations and displays the throughput rate. It is multi-threaded,
supports network connections, and offers more options than the standard buffer.


-i <filename>
Use filename as input instead of the standard input (needs to be given for multi
volume support). If filename is -, input is read from standard input.

-I <port>
Use network port port as input instead of the standard input. If given a hostname
and a port in the form hostname:port, the first interface with the IP of hostname
will be used.

-o <filename>
Use filename as output instead of the standard output (needs to be given for multi
volume support, will enable use of sendfile if available). If filename is -, output
is written to standard output. The option -o can be passed multiple times to
specify multiple outputs.

-O <hostname:port>
Write output to hostname:port instead of the standard output (will enable use of
sendfile if available). This option can be used multiple times to send data to
multiple machines.

-b <num>
Use num blocks for buffer (default 256).

-s <size>
Use blocks of size bytes for buffer (default pagesize of system).

-m <size>
Use a total of size bytes for buffer (default 2MB) - size can be set with a
trailing character (b and B for Byte, k for kByte, M for MByte, G for Gigabyte, and
with % for a percentage of total physical memory).

-L Lock buffer in memory - this option is not available for file-based buffers and
requires mbuffer to be set-UID root (use with care).

-n <num>
num volumes in input device (requires use of option -i for input device
specification, pass 0 as argument if mbuffer should prompt for every new volume)

-t use a memory-mapped temporary file as buffer (use with huge buffers)

-T <file>
as -t but use file instead

-d use block-size of device for output (needed for some devices, slows output down)

-D <size>
assume an output volume of size bytes (default infinite) after which a volume
change will be initiated. Small values are useful for the timely testing of multi-
volume runs; accurate values if your device doesn't properly signal end of media.
Size can be set with a trailing character (b and B for Byte, k for kByte, M for
MByte, or G for Gigabyte)

-P <num>
start writing after the buffer has been filled to num% (default 0 - start at once)

-p <num>
start reading after the buffer has dropped below fill-ratio of num% (default 100 -
start at once)

-l <file>
log messages to file instead of standard error output

-u <num>
pause num microseconds after each write - might increase performance on some drives
with very low performance (< 1 MB/sec)

-r <rate>
Set the maximum read rate to <rate>. <rate> can be given in either Bytes, kBytes,
MBytes, or GBytes per second. To do so, use an appropriate suffix (i.e. k,M,G).
This option is useful if you have a tape that is capable of transferring data
faster than the host can handle it. In this case you can use this option to limit
the transfer rate and keep the tape running. Be aware that this is both good for
your tape drive, and enhances overall performance, by avoiding tape screwing.

-R <rate>
Same as above only for setting the transfer limit for the writer.

-A <cmd>
the device used is an autoloader which uses cmd to load the next volume. Pass
</bin/false> as an autoload command to suppress the warning message that appears
when run without controlling terminal (e.g. via cron). Like this the autoload will
fail and mbuffer will terminate with an error message when reaching the end of the

-a <time>
the device used is an autoloader which takes time seconds to load a new tape

-f overwrite output file if it exists already

-c write with synchronous data integrity support - This option forces all writes to
complete before continuing. This enables errors to be reported earlier and more
precisely, but might decrease performance. Especially systems with high level of
data integrity support suffer a huge performance hit. Others might seem to be
unaffected, but just neglect support for full synchronous data integrity.

-v <num>
set verbose level to num. Valid values are 0..6 (0 = none, 1 = errors, 2 =
warnings, 4 = information messages, 5 = debugging messages, 6 = I/O debugging).
Higher values include lower values messages.

-q quiet - do not display the status on the standard error output

-Q quiet - do not log the status in the log file

Use O_DIRECT to open file descriptors. This option is not available on all systems.
It tells the OS to bypass the page cache to improve performance when reading and
writing. On Solaris this is an auto-magic option that is enabled if it is supported
for the relevant file. Be aware that this option might lead to read/write failures,
if the buffer isn't properly aligned for direct I/O. Additionally, open might fail
with EINVAL (i.e. invalid argument) if the named file does not support O_DIRECT.

Open next output file given via option -o in append mode.

Truncate next output file given via option -o when opening it.

-6 Force IPv6 mode for the following network I/O options on command line. -4 Force
IPv4 mode for the following network I/O options on command line. -0 Choose
IPv4/IPv6 mode on demand.

-h, --help
Output help information and exit.

-H, --md5
Generate a MD5 hash of transferred data.

-H, --pid
Print PID of current process. This option can help you to figure out which instance
of mbuffer to kill, if multiple are running and one is hanging due to a network
issue. Printing of the PID can also be triggered by adding "printpid = 1" to your
.mbuffer.rc file.

-V, --version
Output version information and exit.

-W <timeout>
Activates a watchdog that gets triggered every timeout seconds and checks weather
I/O activity has stalled. If either channel has stalled for a complete period, the
watchdog writes an error message and terminates mbuffer via SIGINT. Be aware that
the watchdog is unaware of tape-change activities. So choose the watchdog timeout
greater that the worst-case tape-change time.


The default values for following options can be set as key = value pairs in the
~/.mbuffer.rc file:
blocksize: block size (option -s)
timeout: watchdog timeout (option -W)
totalmem: total buffer size (option -m)
maxreadspeed: maximum read speed (option -r)
maxwritespeed: maximum write speed (option -R)
startwrite: threshold for start writing (option -P)
startread: threshold for start reading (option -p)
pause: pause after writing a block (option -u)
numblocks: number of blocks in buffer (option -b)
memlock: lock buffer in memory (option -L)
showstatus: print transfer status on console (option -q)
logstatus: write transfer status to logfile (option -Q)
tcpbuffer: TCP buffer size (option --tcpbuffer)


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

Use mbuffer online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    VBA-M (Archived - Now on Github)
    VBA-M (Archived - Now on Github)
    Project has moved to
    Features:Cheat creationsave statesmulti
    system, supports gba, gbc, gb, sgb,
    Download VBA-M (Archived - Now on Github)
  • 2
    Linux System Optimizer and Monitoring
    Github Repository:
    Audience: End Users/Desktop. User
    interface: Qt. Programming La...
    Download Stacer
  • 3
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    Download OrangeFox
  • 4
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 5
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 6
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    Download XISMuS
  • 7
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • More »

Linux commands