crypto crypto-openssl: support hashing operations
[vpp.git] / extras / vpp_stats_fs / README.md
1 # VPP stats segment FUSE filesystem
2
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.
5
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).
9
10 Directories regularly update their contents so that new counters get added to the filesystem.
11
12 ## Prerequisites (for building)
13
14 **GoVPP** library (master branch)
15 **Go-FUSE** library
16 vpp, vppapi
17
18 ## Building
19
20 Here, we add the Go librairies before building the binary
21 ```bash
22 go mod init stats_fs
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
26 go build
27 ```
28
29 ## Usage
30
31 The basic usage is:
32 ```bash
33 sudo ./statfs <MOUNT_POINT> &
34 ```
35 **Options:**
36  - debug \<true|false\> (default is false)
37  - socket \<statSocket\> (default is /run/vpp/stats.sock)
38
39 ## Browsing the filesystem
40
41 You can browse the filesystem as a regular user.
42 Example:
43
44 ```bash
45 cd /path/to/mountpoint
46 cd sys/node
47 ls -al
48 cat names
49 ```
50
51 ## Unmounting the file system
52
53 You can unmount the filesystem with the fusermount command.
54 ```bash
55 sudo fusermount -u /path/to/mountpoint
56 ```
57
58 To force the unmount even if the resource  is busy, add the -z option:
59 ```bash
60 sudo fusermount -uz /path/to/mountpoint
61 ```