BTRFS-HEATMAP(1) | Btrfs Heatmap | BTRFS-HEATMAP(1) |
btrfs-heatmap - visualize the layout of data on your btrfs filesystem
btrfs-heatmap [args] mountpoint
The btrfs-heatmap script creates a visualization of how a btrfs filesystem is using the underlying disk space of the block devices that are added to it.
The resulting PNG image will show unallocated disk space as black pixels. Raw disk space that is allocated to be used for data (white), metadata (blue) or system (red) gets brighter if the fill factor of block groups is higher.
Because the needed information is retrieved using the btrfs kernel API, it has to be run as root.
By default, the filename of the PNG image is a combination of the filesystem ID and a timestamp, so that if you create multiple of them, they nicely pile up as input for creating a timelapse video.
By default, the ordering inside the picture is based on a Hilbert Curve. The lowest physical address of the block devices is located in the bottom left corner. From there it walks up, to the right and down again.
The picture that is generated by default shows the physical address space of a filesystem, by walking all dev extents of all devices in the filesystem using the search ioctl and concatenating all information into a single big image. The usage values are computed by looking up usage counters in the block group items from the extent tree.
It's also possible to have the picture sorted by btrfs virtual address space instead, or to create pictures of the contents of block groups, on extent level by using the --blockgroup option.
Source and documentation on github: https://github.com/knorrie/btrfs-heatmap
2017 |