Update nbdview.
[libguestfs-talks.git] / 2019-fosdem / nbdview / README
1 nbdview is a small Tcl/Tk program that lets you visualize reads and
2 writes happening to an nbdkit server in real time.
3
4 To use it you will need to start your nbdkit server with the log
5 filter.  For example, using the memory plugin (but any plugin may be
6 used):
7
8   size=$((64 * 1024 * 1024))
9   delay=20ms
10   nbdkit --filter=log --filter=delay \
11          memory \
12          size=$size \
13          logfile=/tmp/log \
14          rdelay=$delay wdelay=$delay &
15
16 In this example I have also added a delay which helps to make the
17 stuff happening on screen easier to see and more "animated", but it is
18 not required.
19
20 Then start nbdview.tcl specifying the log file and virtual size:
21
22   ./nbdview.tcl /tmp/log $size &
23
24 Note that only small disk sizes really work (larger sizes would
25 require too many pixels!)  With the defaults compiled into
26 nbdview.tcl: 4K block size, 128 x 128 pixel canvas, you can display at
27 most 64MB.
28
29 Then you can write to the NBD server using ordinary tools such as
30 qemu, qemu-io, guestfish, etc. and observe the reads and writes to the
31 disk.