• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

bpftool Command Examples in Linux

by admin

bpftool is a command-line utility in Linux that is used to manage and manipulate BPF (Berkeley Packet Filter) programs and maps. BPF is a powerful and flexible feature in the Linux kernel that allows you to apply custom filters to network traffic and perform various actions based on the contents of the packets.

Once bpftool is installed, you can use it to manage and manipulate BPF programs and maps on your system. To list all the BPF programs and maps on your system, you can use the following command:

# bpftool prog list
# bpftool map list

These commands will display a list of all the BPF programs and maps on your system, respectively.

bpftool Command Examples

1. List information about loaded `eBPF` programs:

# bpftool prog list

2. List `eBPF` program attachments in the kernel networking subsystem:

# bpftool net list

3. List all active links:

# bpftool link list

4. List all `raw_tracepoint`, `tracepoint`, `kprobe` attachments in the system:

# bpftool perf list

5. List `BPF Type Format (BTF)` data:

# bpftool btf list

6. List information about loaded maps:

# bpftool map list

7. Probe a network device “eth0” for supported `eBPF` features:

# bpftool feature probe dev eth0

8. Run commands in batch mode from a file:

# bpftool batch file myfile

Filed Under: Linux

Some more articles you might also be interested in …

  1. pluma: command not found
  2. aspell Command Examples in Linux
  3. grub-mkconfig Command Examples in Linux
  4. kwrite: command not found
  5. “BAD PASSWD : is too simple” – error during password change in CentOS/RHEL 7 and 8
  6. apache2ctl: command not found
  7. “Authorization not available. Check if polkit service is running or see debug message for more information” – CentOS/RHEL 7 ssh service error
  8. Shell/Bash Script to Find Prime Numbers in Linux
  9. How to enable Debug Option For CIFS Module in CentOS/RHEL 7 and 8
  10. How to find which specific ethernet device corresponds to a specific port on a multi-interface network card in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright