eBPFをDocker使えるようにする
2023/03/25
code:memo
$ execsnoop-bpfcc -UTx
bash: execsnoop-bpfcc: command not found
$ execsnoop-bpfcc -UTx
sh: 1: modprobe: not found
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module) or installing the kernel development package for your running kernel version.
chdir(/lib/modules/5.15.49-linuxkit/build): No such file or directory
Traceback (most recent call last):
File "/usr/sbin/execsnoop-bpfcc", line 227, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 364, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
modprobeがないので入れる。なんか調べていくとkmodを入れるとよかった。 $ apt-get install kmod
以下を入れてみる
bcc-tools
libbcc-examples
linux-headers-$(uname -r)
code:memo
No package matching 'linux-headers-5.15.49-linuxkit' is available
code:memo
$ uname -r
5.15.49-linuxkit
$ depmod
depmod: ERROR: could not open directory /lib/modules/5.15.49-linuxkit: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
2023/04/01
確認用
Q. eBPFを使えるようにする
参考
関連