0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

eBPFのサンプルを動かしてみる

Posted at

環境設定

BCCのリポジトリをGitクローンする

cd /usr/local/src
git clone git clone https://github.com/iovisor/bcc.git

tracing

tcpv4connect.py

プログラムを起動する

python3 /usr/local/src/eBPF/bcc/examples/tracing/tcpv4connect.py

別画面からcurl https://google.comを実行する

PID    COMM         SADDR            DADDR            DPORT
1843   curl         172.31.xx.xx     172.253.xx.xx   443

別画面からcurl http://localhostを実行する

PID    COMM         SADDR            DADDR            DPORT
1847   curl         127.0.0.1        127.0.0.1        80

Networking

http_filter

python3 /usr/local/src/eBPF/bcc/examples/networking/http_filter/http-parse-simple.py

別画面からcurl http://google.comを実行する

GET / HTTP/1.1
HTTP/1.1 301 Moved Permanently
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?