Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install bpf tools for linux

Shulou Source: shulou.com Published: 2022-06-03 04:58:56 09月21日 Update

This article is to share with you the linux installation of bpf tools tutorials, I believe that most people do not know how to install, in order to let you learn, to give you a summary of the following content, without saying much, let's read on.

Note: BPF relies on a higher version of the linux kernel.

Recommended OS kernel version > = 4.1 (kernel version 4.9 or later is recommended)

You also need to enable some kernel configuration options. These options are now enabled by default in many distributions, so you don't usually need to change them. They are:

CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_HAVE_EBPF_JIT=y, CONFIG_BPF_EVENTS=y.

Take CentOS7.6 as an example to demonstrate the steps for installing executable files (for the installation of ubuntu, please refer to the url below. The steps are basically the same)

Bcc

Github address: after https://github.com/iovisor/bccyum install bcc-tools is installed, the binaries are in / usr/share/bcc/tools/ related documents in / usr/share/bcc/tools/doc/ Note: you need to import the path in / etc/profile, otherwise you will not find the series tools of bcc-tools by default.

Bpftrace

Github address: https://github.com/iovisor/bpftrace installation method curl https://repos.baslab.org/bpftools.repo-- output / etc/yum.repos.d/bpftools.repoyum install bpftrace bpftrace-tools.bt file path: / usr/share/bpftrace/tools document path is at: / usr/share/bpftrace/tools/doc

Bptool

Installation method yum install bpftool

After the above three steps, we can begin the journey of bpf debugging.

This is the end of the tutorial on installing bpf tools in linux. I hope the above content can be of some help to you and learn more. If you like this article, you might as well share it for more people to see.

Tags: Kernel tools files versions paths contents addresses suggestions tutorials documentation methods more steps articles trips binaries in general most ways see Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Apple Shulou Information Xiaomi Huawei