Linux: eBPF: bcc-tools:tcpdrop使用需要注意的问题

最近使用bcc-tools的时候注意到,bcc-tools(eBPF相关软件)的使用版本和内核的版本紧密程度非常高。因为要使用内核的函数或者结构体,所以就必须版本一致是必须的,不然会出现下面的警告或者错误:
WARNING: tcp_drop() kernel function not found or traceable.
The kernel might be too old or the the function has been inlined.

tcpdrop脚本的例子;

if b.get_kprobe_functions(b"tcp_drop"):
    b.attach_kprobe(event="tcp_drop", fn_name=

你可能感兴趣的:(云平台运维,网络,kernel,linux,网络,服务器,eBPF,bcc)