Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pages.zh/linux/bpftool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# bpftool

> 以简单的方式检查和操作 eBPF 程序和映射。
> 某些子命令(如 `prog`)有各自的用法文档。
> 更多信息:<https://manned.org/bpftool>.

- 列出已加载的 `eBPF` 程序信息:

`bpftool prog list`

- 列出内核网络子系统中的 `eBPF` 程序附件:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 列出内核网络子系统中的 eBPF 程序附加点:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the button next to "Preview" to add suggestions


`bpftool net list`

- 列出所有活动链接:

`bpftool link list`

- 列出系统中所有的 `raw_tracepoint`、`tracepoint`、`kprobe` 附件:

`bpftool perf list`

- 列出 BPF 类型格式(BTF)数据:

`bpftool btf list`

- 列出已加载映射的信息:

`bpftool map list`

- 探测网络设备 "eth0" 支持的 eBPF 功能:

`bpftool feature probe dev {{eth0}}`

- 从文件以批处理模式运行命令:

`bpftool batch file {{文件}}`