Ebpf btrfs (#11348)
thiagoftsm committed
Jul 21, 2021 at 12:34 UTC
c14d9d325583227d9b987680d8e0cb853bce6340
6 files changed
+29
-4
collectors/ebpf.plugin/README.md
+1
@@ -326,6 +326,7 @@ filesystems are monitored.
326
327
```conf
328
[filesystem]
329
+ btrfsdist = yes
330
ext4dist = yes
331
nfsdist = yes
332
xfsdist = yes
collectors/ebpf.plugin/ebpf.d/filesystem.conf
+1
@@ -13,6 +13,7 @@
13
14
# All filesystems are named as 'NAMEdist' where NAME is the filesystem name while 'dist' is a reference for distribution.
15
[filesystem]
16
+ btrfsdist = yes
17
ext4dist = yes
18
nfsdist = yes
19
xfsdist = yes
collectors/ebpf.plugin/ebpf_filesystem.c
+8
@@ -41,6 +41,14 @@ ebpf_filesystem_partitions_t localfs[] =
41
.flags = NETDATA_FILESYSTEM_FLAG_NO_PARTITION,
42
.enabled = CONFIG_BOOLEAN_YES,
43
.addresses = {.function = NULL, .addr = 0}},
44
+ {.filesystem = "btrfs",
45
+ .optional_filesystem = NULL,
46
+ .family = "BTRFS",
47
+ .objects = NULL,
48
+ .probe_links = NULL,
49
+ .flags = NETDATA_FILESYSTEM_FILL_ADDRESS_TABLE,
50
+ .enabled = CONFIG_BOOLEAN_YES,
51
+ .addresses = {.function = "btrfs_file_operations", .addr = 0}},
52
{.filesystem = NULL,
53
.optional_filesystem = NULL,
54
.family = NULL,
packaging/ebpf.checksums
+3
-3
@@ -1,3 +1,3 @@
1
-d450f288dcbbc29e75ff8b6c300d4a08d7a270c44221772e2710058159bdf87a netdata-kernel-collector-glibc-v0.7.4.tar.xz
2
-e505c80e7e5a5d37814bd477904f2adbd188860ce8897dba214b7f250095dc1b netdata-kernel-collector-musl-v0.7.4.tar.xz
3
-af1a5d56cca6a88f23acfb6ee66feb8ac895dc1920c746696256fbde432a26cd netdata-kernel-collector-static-v0.7.4.tar.xz
1
+9144ec509b1d8dc43bfb5275935cfb9329d0da7a90bfefa5f1c2796d60991dd1 netdata-kernel-collector-glibc-v0.7.5.tar.xz
2
+a2c901e7f67472108c015a66b0c2dedf0cc3a791bbd8f75145c9c066aa7e0567 netdata-kernel-collector-musl-v0.7.5.tar.xz
3
+04231b6a5997c6f3330eeffa1897a4b331e70a21cb46278e4346c006824d7cb1 netdata-kernel-collector-static-v0.7.5.tar.xz
packaging/ebpf.version
+1
-1
@@ -1 +1 @@
1
-v0.7.4
1
+v0.7.5
web/gui/dashboard_info.js
+15
@@ -3547,6 +3547,21 @@ netdataDashboard.context = {
3547
info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function <code>zpl_fsync</code> is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF <a href="https://github.com/iovisor/bcc/blob/master/tools/zfsdist_example.txt" target="_blank">zfsdist</a> from BCC tools.'
3548
},
3549
3550
+ 'filesystem.btrfs_read_latency': {
3551
+ info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function <code>btrfs_file_read_iter</code> (kernel newer than 5.9.16) or the function <code>generic_file_read_iter</code> (old kernels) is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF <a href="https://github.com/iovisor/bcc/blob/master/tools/btrfsdist_example.txt" target="_blank">btrfsdist</a> from BCC tools.'
3552
+ },
3553
+
3554
+ 'filesystem.btrfs_write_latency': {
3555
+ info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function <code>btrfs_file_write_iter</code> is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF <a href="https://github.com/iovisor/bcc/blob/master/tools/btrfsdist_example.txt" target="_blank">btrfsdist</a> from BCC tools.'
3556
+ },
3557
+
3558
+ 'filesystem.btrfs_open_latency': {
3559
+ info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function <code>btrfs_file_open</code> is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF <a href="https://github.com/iovisor/bcc/blob/master/tools/btrfsdist_example.txt" target="_blank">btrfsdist</a> from BCC tools.'
3560
+ },
3561
+
3562
+ 'filesystem.btrfs_sync_latency': {
3563
+ info: 'Latency is the time it takes for an event to be completed. Netdata is attaching a kprobe for when the function <code>btrfs_sync_file</code> is called and another for when it finishes the execution. We calculate the difference between the calling and return times, we get the logarithmic for the final result and we sum one value to the respective bin. Based on the eBPF <a href="https://github.com/iovisor/bcc/blob/master/tools/btrfsdist_example.txt" target="_blank">btrfsdist</a> from BCC tools.'
3564
+ },
3565
3566
// ------------------------------------------------------------------------
3567
// eBPF