Skip to content

Inspecting State

Once a volume is serving, most days need nothing. When you do want to look, flexblock show and a handful of metrics answer most questions.

show prints the device, volume, ownership and connection state. It takes no lock, so it is safe to run against a live daemon. Figures it reads from a device a daemon is serving are labeled as estimates.

Terminal window
sudo flexblock show /dev/nvme1n1p1
sudo flexblock show /dev/nvme1n1p1 --remote -v
sudo flexblock show --remote --json
FlagWhat it adds
--jsonMachine-readable output on stdout.
--remoteThe volume superblock and ownership marker, fetched from object storage.
-v, --verboseOn-disk layout detail: region offsets, WAL head and generation. Needs a device.

The device argument is optional when --remote is given, which lets you look at a volume from a host that has no cache device for it.

show needs only read access to the cache device. It also reports the PID of the daemon serving the device, which is how you find the right process to signal when a host serves more than one volume.

With metrics enabled (start --metrics-port), a few series cover most questions: how much data is waiting to be uploaded, how old the oldest unflushed write is, how well the cache is hitting, whether object storage is returning errors, and the license state.

Terminal window
curl -s http://localhost:10056/metrics | grep -E '^flexblock_(cache_dirty_slots|cache_hits_total|cache_misses_total|cache_oldest_dirty_age_seconds|license_state|obj_errors_total) '