Skip to content

gluster/parsefuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parsefuse

This is a program to present fusedumps (binary dumps of FUSE traffic) in a human readable or standard machine processable (JSON) format.

You can get fusedumps with:

  • glusterfs, with --dump-fuse=<PATH> option;
  • tracing a FUSE server with a hacked strace, with -efuse=<PATH> option.

To build it, you need the following artifacts:

  • ruby,
  • go,
  • cast, which you can get with gem install cast;
  • the header file which defines the FUSE data structures, usually called fuse.h or fuse_kernel.h.

Where to find this header file, which variant to use?

  • The general case: this header is available in the source of the linux kernel and in various userspace C codebases that implement a FUSE server from scratch; so for example:

    The header to use depends on two things:

    • the fuse server producing the fuse dump
    • the kernel on which the dumped session ran.

    You should identify the header files that were used to build these two. Of the two header files, you should use the older one (which has the lower value of the (FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION) pair).

    So you will not obtain a one-fits-all parsefuse binary, it has to built specifically with the appropriate header.

    It might happen that the right header cannot be identified or an earlier parsefuse build is reused and thus the header used to build parsefuse does not match the scenario. It's not fatal issue — some messages will fail to parse and will be shown as raw binary dump, but the rest will be shown properly dissected.

  • When building to use with dumps created by Glusterfs: this being the main use case of the tool, we concretize the above general rule for this use case.

    • On RHEL/CentOS 7 or Fedora 24 or older distros, use /usr/include/linux/fuse.h (provided by the kernel-headers package).

    • On RHEL/CentOS 8 or Fedora 25 or newer distros, use contrib/fuse-include/fuse_kernel.h from the Glusterfs source tree.

    • On other distros: Glusterfs uses FUSE 7.24, so if the kerrnel's FUSE version is higher than this, then use the header in the Glusterfs source tree; else use the kernel's version.

Once you located the appropriate header file, build parsefuse with the following command:

./make.sh <path-to-fuse-header>

After a succesful build you will have the binary at go/bin/parsefuse.