BPF Tools 参考链接

链接1:http://www.brendangregg.com/bpf-performance-tools-book.html
链接2:https://github.com/iovisor/bcchttps://github.com/iovisor/bpftrace
链接3:https://github.com/torvalds/linux/blob/master/include/uapi/linux/bpf.h
链接4:https://github.com/iovisor/bcc
链接5:https://github.com/iovisor/bpftrace
链接6:https://getvector.io/https://pcp.io/
链接7:https://github.com/Netflix-Skunkworks/grafana-pcp-live/
链接8:https://github.com/performancecopilot/grafana-pcp-redis/
链接9:https://grafana.com/https://github.com/prometheus/prometheus
链接10:

  • https://github.com/cloudflare/ebpf_exporter
  • https://blog.cloudflare.com/introducing-ebpf_exporter/

链接11:https://github.com/iovisor/kubectl-trace
链接12:https://github.com/iovisor/kubectl-trace
链接13:https://github.com/iovisor/bcc/issues/2367
链接14:https://github.com/iovisor/bcc/issues/1033
链接15:http://www.brendangregg.com/bpf-performance-tools-book.html

BPF and related observability tools give software professionals unprecedented visibility into software, helping them analyze operating system and application performance, troubleshoot code, and strengthen security. BPF Performance Tools: Linux System and Application Observability is the industry’s most comprehensive guide to using these tools for observability. Brendan Gregg, author of the industry’s definitive guide to system performance, introduces powerful new methods and tools for doing analysis that leads to more robust, reliable, and safer code. This authoritative guide: Explores a wide spectrum of software and hardware targets Thoroughly covers open source BPF tools from the Linux Foundation iovisor project’s bcc and bpftrace repositories Summarizes performance engineering and kernel internals you need to understand Provides and discusses 150+ bpftrace tools, including 80 written specifically for this book: tools you can run as-is, without programming — or customize and develop further, using diverse interfaces and the bpftrace front-end You’ll learn how to use BPF (eBPF) tracing tools to analyze CPUs, memory, disks, file systems, networking, languages, applications, containers, hypervisors, security, and the Linux kernel. You’ll move from basic to advanced tools and techniques, producing new metrics, stack traces, custom latency histograms, and more. It’s like having a superpower: with Gregg’s guidance and tools, you can analyze virtually everything that impacts system performance, so you can improve virtually any Linux operating system or application.
### BPF 工具用于性能监测和分析 BPF(Berkeley Packet Filter)技术近年来被广泛应用于 Linux 系统的性能监测和分析领域。通过扩展其功能,现代 BPF 实现允许开发人员创建高效的工具来捕获系统行为并提供实时反馈。 #### 书籍推荐 对于希望深入了解 BPF 性能工具的人来说,《BPF Performance Tools: Linux System and Application Observability》是一本非常有价值的参考资料[^1]。该书不仅总结了传统的 Linux 性能工具(如 `iostat` 和 `perf`),还深入探讨了基于 BPF 的新工具及其应用案例。此外,这本书涵盖了超过 800 页的内容,专注于 BPF 技术的基础以及在跟踪层面的实际操作[^2]。 #### 开源项目和技术资源 除了阅读相关书籍外,还可以利用一些开源项目和技术文档进一步学习和实践: - **bcc**: bcc 是一组构建于 eBPF 上的高级工具集合,旨在简化性能分析工作流程。它提供了许多预定义脚本来帮助诊断各种问题,例如 CPU 使用率、磁盘 I/O 统计等[^4]。 - **tracepoints & kprobes/uprobes**: 这些机制使得能够动态插入探针到内核函数或者用户空间应用程序调用路径上而无需修改任何代码。它们通常配合 BPF 来完成复杂的追踪任务。 - **Linux Kernel Documentation on BPF**: 官方内核文档包含了关于如何编写自定义程序以及部署这些解决方案的具体指导说明。 #### 设计原则 当涉及到实际开发过程中需要注意的是,在软件分析与调试期间保持数据精度的同时也要兼顾采集过程中的开销成本。因此,设计此类工具有必要权衡这两者之间的关系以便更有效地监控整个软件生态系统运行状况[^3]。 ```bash # Example of using bpftrace to monitor disk reads/writes by process name. sudo bpftrace -e 'io /dname/ { @bytes[$comm] = sum(bytes); }' ``` 上述命令展示了如何借助 `bpftrace` 脚本记录按进程名称分类的读写字节数量情况。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值