5.3 Android BCC环境搭建(eadb版 下)

四,BCC使用示例 

这里以tcplife为例,来显示TCP会话的生命周期和吞吐量统计。

4.1 进入/bcc/tools目录

root@localhost:/bcc# cd tools/
root@localhost:/bcc/tools# ls
CMakeLists.txt      javacalls.sh           rubystat_example.txt
argdist.py          javacalls_example.txt  runqlat.py
argdist_example.txt javaflow.sh            runglat_example.txt
bashreadline.py     javaflow_example.txt   runqlen.py

4.2 执行tcplife

root@localhost:/bcc/tools# tcplife
PID  COMM       LADD          RLPORT  RADDRR        PORT TX  KB RX_KB MS
2895 DevMonitor 172.18.178.96 34700   153.3.237.202 80   18  0  152.09
2895 DevMonitor 172.18.178.96 58942   153.3.237.202 80   18  0  139.38
1414 Thread-619 ::ffff:172.18.178.96 57214 ::ffff:106.13.248.47 80  0  0 
 68.19
1046 Thread-594 ::ffff:172.16.5.13   34246 ::ffff:172.16.5.1 7  0 1000.26

五,FAQ

5.1 No module named 'setuptools'

5.1

你可能感兴趣的:(Android,eBPF,Book,android,ebpf,linux)