1 # VPP stats segment FUSE filesystem
3 The statfs binary allows to create a FUSE filesystem to expose and to browse the stats segment.
4 Is is leaned on the Go-FUSE library and requires Go-VPP stats bindings to work.
6 The binary mounts a filesystem on the local machine whith the data from the stats segments.
7 The counters can be opened and read as files (e.g. in a Unix shell).
8 Note that the value of a counter is determined when the corresponding file is opened (as for /proc/interrupts).
10 Directories regularly update their contents so that new counters get added to the filesystem.
12 ## Prerequisites (for building)
14 **GoVPP** library (master branch)
20 Here, we add the Go librairies before building the binary
23 go get git.fd.io/govpp.git@master
24 go get git.fd.io/govpp.git/adapter/statsclient@master
25 go get github.com/hanwen/go-fuse/v2
33 sudo ./statfs <MOUNT_POINT> &
36 - debug \<true|false\> (default is false)
37 - socket \<statSocket\> (default is /run/vpp/stats.sock)
39 ## Browsing the filesystem
41 You can browse the filesystem as a regular user.
45 cd /path/to/mountpoint
51 ## Unmounting the file system
53 You can unmount the filesystem with the fusermount command.
55 sudo fusermount -u /path/to/mountpoint
58 To force the unmount even if the resource is busy, add the -z option:
60 sudo fusermount -uz /path/to/mountpoint