usage: ceph-dencoder [commands ...]
version print version string (to stdout)
import <encfile> read encoded data from encfile
export <outfile> write encoded data to outfile
set_features <num> set feature bits used for encoding
get_features print feature bits (int) to stdout
list_types list supported types
type <classname> select in-memory type
skip <num> skip <num> leading bytes before decoding
decode decode into in-memory object
encode encode in-memory object
add_crc32c calculate and encode crc32c for in-memory object
dump_json dump in-memory object as json (to stdout)
hexdump print encoded data in hex
get_struct_v print version of the encoded object
get_struct_compat print the oldest version of decoder that can decode the encoded object
copy copy object (via operator=)
copy_ctor copy object (via copy ctor)
count_tests print number of generated test objects (to stdout)
select_test <n> select generated test object as in-memory object
is_deterministic exit w/ success if type encodes deterministically
Examples (6) from the manual page, untested
cd /mnt/osd.12/current/2.b_head
Say you want to examine an attribute on an object stored by ceph-osd.attr -l foo_bar_head_EFE6384B
Say you want to examine an attribute on an object stored by ceph-osd.attr foo_bar_head_EFE6384B -g ceph._ -q > /tmp/a
Say you want to examine an attribute on an object stored by ceph-osd.ceph-dencoder type object_info_t import /tmp/a decode dump_json
Say you want to examine an attribute on an object stored by ceph-osd.rados -p metadata get mds_snaptable mds_snaptable.bin
Alternatively, perhaps you wish to dump an internal CephFS metadata object, you might do that like this:ceph-dencoder type SnapServer skip 8 import mds_snaptable.bin decode dump_json
Alternatively, perhaps you wish to dump an internal CephFS metadata object, you might do that like this:
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.