1nbdkit-stats-filter(1)              NBDKIT              nbdkit-stats-filter(1)
2
3
4

NAME

6       nbdkit-stats-filter - display statistics about operations
7

SYNOPSIS

9        nbdkit --filter=stats PLUGIN statsfile=FILE [statsappend=true]
10

DESCRIPTION

12       "nbdkit-stats-filter" is a filter that displays statistics about NBD
13       operations, such as the number of bytes read and written.  Statistics
14       are written to a file once when nbdkit exits.
15

EXAMPLE

17       In this example we run guestfish(1) over nbdkit to create an ext4
18       filesystem on a RAM disk, and use the stats filter to display the
19       number of read, write and trim operations involved:
20
21        $ nbdkit -U - --filter=stats memory 1G statsfile=/dev/stderr \
22                 --run '
23              guestfish add-drive "" protocol:nbd server:unix:$unixsocket \
24                                     discard:enable format:raw : \
25                        run : \
26                        mkfs ext4 /dev/sda
27        '
28        elapsed time: 1.1248 s
29        read: 219 ops, 4964864 bytes, 3.53119e+07 bits/s
30        write: 78 ops, 34230272 bytes, 2.43458e+08 bits/s
31        trim: 33 ops, 1073741824 bytes, 7.63683e+09 bits/s
32

PARAMETERS

34       statsfile=FILE
35           The file where we write the stats.
36
37           This parameter is required.
38
39       statsappend=true
40           If set then we append to the file instead of replacing it.
41

FILES

43       $filterdir/nbdkit-stats-filter.so
44           The filter.
45
46           Use "nbdkit --dump-config" to find the location of $filterdir.
47

VERSION

49       "nbdkit-stats-filter" first appeared in nbdkit 1.14.
50

SEE ALSO

52       nbdkit(1), nbdkit-filter(3), nbdkit-log-filter(1).
53

AUTHORS

55       Richard W.M. Jones
56
58       Copyright (C) 2019 Red Hat Inc.
59

LICENSE

61       Redistribution and use in source and binary forms, with or without
62       modification, are permitted provided that the following conditions are
63       met:
64
65       ·   Redistributions of source code must retain the above copyright
66           notice, this list of conditions and the following disclaimer.
67
68       ·   Redistributions in binary form must reproduce the above copyright
69           notice, this list of conditions and the following disclaimer in the
70           documentation and/or other materials provided with the
71           distribution.
72
73       ·   Neither the name of Red Hat nor the names of its contributors may
74           be used to endorse or promote products derived from this software
75           without specific prior written permission.
76
77       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
78       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
79       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
80       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
81       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
82       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
83       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
84       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
85       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
86       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
87       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
88
89
90
91nbdkit-1.16.1                     2019-12-03            nbdkit-stats-filter(1)
Impressum