ebpf bcc

Posted by     "lxg" on Tuesday, June 4, 2024
apt install python3-bcc
#!/bin/python3
from bcc import BPF

bpf_code = '''
int kprobe__sys_clone(void *ctx) {
    bpf_trace_printk("Hello world!\\n");
    return 0;
}
'''

b = BPF(text=bpf_code)
b.trace_print() 

「真诚赞赏,手留余香」

Little Star Blog

真诚赞赏,手留余香

使用微信扫描二维码完成支付