1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 21:22:09 +02:00
tldr/pages.zh/linux/bpftrace.md
千玄子 48b9a13502
aurvote, b*: add Chinese translation (#6413)
* aurvote: add Chinese translation

* balooctl: add Chinese translation

* beep: add Chinese translation

* betterlockscreen: add Chinese translation

* binwalk: add Chinese translation

* binwise: add Chinese translation

* blkdiscard: add Chinese translation

* blkid: add Chinese translation

* bluetoothctl: add Chinese translation

* bluetoothd: add Chinese translation

* bmon: add Chinese translation

* bpftrace: add Chinese translation

* bpytop: add Chinese translation

* brctl: add Chinese translation

* brew: add Chinese translation

* commit suggestion
2021-08-27 11:38:39 +08:00

28 lines
633 B
Markdown

# bpftrace
> Linux eBPF 的高级跟踪语言。
> 更多信息:<https://github.com/iovisor/bpftrace>.
- 显示 bpftrace 版本:
`bpftrace -V`
- 列出所有可用的探针:
`sudo bpftrace -l`
- 运行单行程序(例如按程序进行系统调用计数):
`sudo bpftrace -e '{{tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }}}'`
- 从文件运行程序:
`sudo bpftrace {{文件}}`
- 通过 PID 跟踪程序:
`sudo bpftrace -e '{{tracepoint:raw_syscalls:sys_enter /pid == 123/ { @[comm] = count(); }}}'`
- 进行试运行并以 eBPF 格式显示输出:
`sudo bpftrace -d -e '{{单行程序}}'`