当前位置:网站首页>BCC tool tool usage
BCC tool tool usage
2022-06-11 20:53:00 【Three kills, little schoolboy】
1. summary
BCC Is a tool set for tracking the kernel and operating programs , The software package contains some useful tools and examples , It expands BPF(Berkeley Packet Filters), Usually called eBPF , stay Linux3.15 For the first time , But most BCC The function needs to be Libux4.1 And above .
BCC Use C Language for kernel detection , And use Python and lua As a front end, it simplifies BPF Programming , It is suitable for many tasks , Such as performance analysis and network traffic control .
BCC The supported analysis tools are as follows :

1.1 List of common tools :
execsnoop
opensnoop
ext4slower (or btrfs, xfs, zfs*)
biolatency
biosnoop
cachestat
cachetop
tcpconnect
tcpaccept
tcpretrans
runqlat
profile
2. Compilation and installation
1). Download address :Releases · iovisor/bcc (github.com)
https://github.com/iovisor/bcc/releases2). file :bcc-src-with-submodule.tar.gz

3). decompression :tar xvzf bcc-src-with-submodule.tar.gz

2.1 Linux X86
2.1.1 Installation and compilation environment
sudo apt-get -y install bison build-essential cmake flex git libedit-dev \
libllvm6.0 llvm-6.0-dev libclang-6.0-dev python zlib1g-dev libelf-dev
sudo apt-get install python3-distutils
sudo apt-get install python3-pip
sudo apt-get install python3-setuptools

The above error requires installation :
sudo apt-get install iperf3 iperf netperf
2.1.2 compile
1). Create build directory
$ mkdir -p bcc/build
$ cd bcc/build
2). Compilation and installation
Steps are as follows :
cmake ..
make
sudo make install
cmake -DPYTHON_CMD=python3 ..
pushd src/python/
make
sudo make install
popd
3). Problem solving during installation :
- cmake encounter libbpf update problem


- Run encountered BPF abnormal

The above problems need to be modified python edition

Steps are as follows :
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3 /usr/bin/python

After modification , Execution instruction :

2.2 NDK Cross compilation
3. Use
3.1 Linux Use
3.2 Android/QNX Use
边栏推荐
- 浅谈UGUI中Canvas RectTransform的Scale
- Solution to the problem of PHP strtotime obtaining natural monthly error
- Wechat applet | rotation chart
- The input value "18-20000hz" is incorrect. The setting information is incomplete. Please select a company
- MySQL add adds multiple new fields and specifies the field location
- [computer exemption] the Internet of things and ubiquitous intelligence research center of Harbin Institute of technology recruits 2023 graduate students (Master, doctoral and direct doctoral) from un
- 13 r basic exercises
- IDEA中,运行yarn命令,显示无法加载文件,因为在此系统上禁用运行脚本
- 第二部分 数据链路层
- Technical exchange | why should network security equipment use bypass function
猜你喜欢

The input value "18-20000hz" is incorrect. The setting information is incomplete. Please select a company
Recompile kubeadm to solve the problem of certificate expiration in one year

What are striplines and microstrip lines? Reference planes and transmission lines

MySQL installation free configuration tutorial under Windows mysql-5.6.51-winx64 Zip version

unity package manager starting server stuck(Unity启动卡在starting server,然后报错)

应用场景:现场直播节目制作NDI技术中PoE网卡的广泛应用

sql优化之DATE_FORMAT()函数

Date of SQL optimization_ Format() function

输入值“18-20000hz”错误,设置信息不完整,请选择单位

Teach you how to grab ZigBee packets through cc2531 and parse encrypted ZigBee packets
随机推荐
Role of RESNET residual block
Docker installation redis
Docker installing MySQL
[data visualization] use Apache superset to visualize Clickhouse data
How to add text on the border in bar code software
moderlarts第一次培训
【指标体系】最新数仓指标体系建模方法
黑圆圈显示实现
Current situation and future development trend of tropical forage seed market in the world and China from 2022 to 2028
[index system] the latest modeling method of data warehouse index system
What is the essence and process of SCM development? Chengdu Automation Development Undertaking
2022-2028 global and Chinese thermopile infrared sensor market status and future development trend
[computer exemption] the Internet of things and ubiquitous intelligence research center of Harbin Institute of technology recruits 2023 graduate students (Master, doctoral and direct doctoral) from un
修改本地微信小程序的AppID
What is the meaning of holding shares of financial products?
Redis第四话 -- redis高性能原理(多路复用)和高可用分析(备份、主从)
Calculation of Zeno paradox
26. timer
php pcntl_fork 创建多个子进程解析
2022-2028 global and Chinese thermal power generation (TEG) module market status and future development trend