nbdkit-stats-filter - Man Page

display statistics about operations

Synopsis

 nbdkit --filter=stats PLUGIN statsfile=FILE
                       [statsappend=true] [statsthreshold=PERCENTILE]

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 Output

 # nbdkit --filter=exitfirst --filter=stats memory 25G statsfile=example.txt
 # nbd-client localhost /dev/nbd1 && mkfs.ext4 /dev/nbd1 &&
   nbd-client -d /dev/nbd1
 [....]
 # cat example.txt
 total: 1252 ops, 3.395897 s, 25.13 GiB, 7.40 GiB/s
 read: 145 ops, 0.000133 s, 3.04 MiB, 22.34 GiB/s op, 917.58 KiB/s total
 write: 1088 ops, 0.065065 s, 132.38 MiB, 1.99 GiB/s op, 38.98 MiB/s total
 trim: 14 ops, 0.002037 s, 25.00 GiB, 12272.95 GiB/s op, 7.36 GiB/s total
 flush: 5 ops, 0.000002 s, 0 bytes, 0 bytes/s op, 0 bytes/s total

 READ request sizes:
      4096 bytes: 66.2% of requests (96)
          12 bit aligned: 100.0% (96)
          13 bit aligned:  69.8% (67)
          14 bit aligned:  54.2% (52)
          15 bit aligned:  46.9% (45)
          16 bit aligned:  41.7% (40)
          17 bit aligned:  36.5% (35)
          18 bit aligned:  31.2% (30)
          19+ bit-aligned: 28.1% (27)
     16384 bytes:  4.8% of requests (7)
          13 bit aligned: 100.0% (7)
          17 bit aligned:  71.4% (5)
          19 bit aligned:  42.9% (3)
     other sizes: 29.0% of requests (42)

 WRITE request sizes:
    131072 bytes: 97.1% of requests (1056)
          17 bit aligned: 100.0% (1056)
          18 bit aligned:  50.0% (528)
          19+ bit-aligned: 25.0% (264)
     other sizes:  2.9% of requests (32)

 TRIM request sizes:
 2147483648 bytes: 85.7% of requests (12)
          24 bit aligned: 100.0% (12)
     other sizes: 14.3% of requests (2)

 ZERO request sizes:
     (no such requests)

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.

statsthreshold=PERCENTILE

Percentile of requests for which block size histogram should be printed. Set to zero to disable collection of block size statistics. Set to 100 to get a list of every block size encountered. Default: 95.

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

Nikolaus Rath

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

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.

Referenced By

nbdkit(1), nbdkit-filter(3), nbdkit-log-filter(1), nbdkit-release-notes-1.14(1), nbdkit-release-notes-1.32(1), nbdkit-S3-plugin(1).

2022-08-11 nbdkit-1.32.1