Provided by: nbdkit_1.16.2-1ubuntu3_amd64
NAME
nbdkit-stats-filter - display statistics about operations
SYNOPSIS
nbdkit --filter=stats PLUGIN statsfile=FILE [statsappend=true]
DESCRIPTION
"nbdkit-stats-filter" is a filter that displays statistics about NBD operations, such as the number of bytes read and written. Statistics are written to a file once when nbdkit exits.
EXAMPLE
In this example we run guestfish(1) over nbdkit to create an ext4 filesystem on a RAM disk, and use the stats filter to display the number of read, write and trim operations involved: $ nbdkit -U - --filter=stats memory 1G statsfile=/dev/stderr \ --run ' guestfish add-drive "" protocol:nbd server:unix:$unixsocket \ discard:enable format:raw : \ run : \ mkfs ext4 /dev/sda ' elapsed time: 1.1248 s read: 219 ops, 4964864 bytes, 3.53119e+07 bits/s write: 78 ops, 34230272 bytes, 2.43458e+08 bits/s trim: 33 ops, 1073741824 bytes, 7.63683e+09 bits/s
PARAMETERS
statsfile=FILE The file where we write the stats. This parameter is required. statsappend=true If set then we append to the file instead of replacing it.
FILES
$filterdir/nbdkit-stats-filter.so The filter. Use "nbdkit --dump-config" to find the location of $filterdir.
VERSION
"nbdkit-stats-filter" first appeared in nbdkit 1.14.
SEE ALSO
nbdkit(1), nbdkit-filter(3), nbdkit-log-filter(1).
AUTHORS
Richard W.M. Jones
COPYRIGHT
Copyright (C) 2019 Red Hat Inc.
LICENSE
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: · Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. · Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. · Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.