κeenです。以前の記事の続きで、 /proc を監視するのではなくeBPFで取得してみます。ついでにRustのコードをeBPFで動かせるライブラリのayaも使ってみます。 以前の記事では /proc 以下の監視をビジーループで回すという力技で新しく作られたプロセスを補足していました。これだとCPU使用率が上がって美しくありませんし、何より原理的には見逃しもありえてしまいます。そこでカーネルの機能を使って全てのプロセスの作成を監視して低CPU使用率かつ捕捉率100%の実装を目指します。 eBPFとは? なんかLinuxカーネルでユーザの書いたコード動かせるやつです。私は説明できるほど詳しくないので適当にググって下さい。 1つやっかいな点として、独自のバイナリを動かすのでカーネル内で動かすコードはコンパイラがeBPFに対応したものでないといけません。また、カーネル内で動かすコードをユーザラン
はじめに LKML(Linux Kernel Mailing List)に Rust support パッチシリーズ v2 が最近流れましたね。Linux カーネルを Rust で直接触れるようになる日ももうすぐかなと、クリスマス以上に待ち遠しい限りです。その前に、Linux カーネルの勉強をし直さなくちゃ。 もうひとつ、カーネル向けの Rust の営みとして以前から注目していたのが、Rust で eBPF を操ることができる Aya というプロジェクトです。良い機会なので、ちょっとだけ触ってみました。 eBPF とは eBPF の元となった BPF は、その名前の由来である The BSD Packet Filter(Berkley Packet Filter とも呼ばれる)が示す通り、BSD 版 Unix に実装されたレジスタベースの仮想マシンによるパケットフィルタ機構です。安全かつ効
With libbpf-rs, bindings to libbpf (canonical C BPF library), building BPF applications in Rust is easy. However, libbpf-rs doesn't work with async/await. Say, to send information from kernel with BPF over protocols like gRPC, you have to implement lots instead of using the existing async libraries. To address the above problem, I implemented libbpf-async, complementary to libbpf-rs, providing API
Today I am very excited to announce the first release of aya, a brand new eBPF library for the Rust programming language! Aya differs from the existing eBPF libraries in two important ways: It doesn't have "bpf" in its name - I'm really entering uncharted waters here! ⛵️ It doesn't use the [libbpf] library nor the [bcc] toolchain. It's a new, pure Rust implementation which uses the libc crate dire
At InfinyOn we are seeing an increasing amount of traffic in Infinyon Cloud. Given our current projections we anticipate over 1 million edges to connect our platform in the next 12-18 months. One of bottlenecks is the compute resources needed to process ingress traffic. We have a couple of places in our cloud offering where we needed to intercept TCP network traffic, perform some analysis on the f
はじめに eBPFがLinuxカーネル内で実行されるプログラムの仕組みであることは知っている。 けれどそれ以上の情報をよく知らないので実際に動かしてみて解った振りをしたい。 いろいろeBPFプログラムを書いて試したいので実行方法をまずは確認することにした。 その前に eBPFプログラムの実行方法に関するサンプルは既にLinuxカーネルのリポジトリに大量に提供されている。 Linux 5.7.7 の samples/bpf なのでC言語で遊びたい人はそこを読んで、manでリファレンス引けば特に苦労せずにeBPFプログラムを実行することができるはず。 つまりここから先は読む必要ないので読まなくても良いと思う。 問題: eBPFプログラムを実行する小さいプログラムが欲しい eBPFプログラムを実行するにはどうすればよいのだろうか。 といってもHello Worldを印字するプログラムを作って実行
February 5, 2018 tl;dr: I made an experimental Rust repository that lets you write BPF tracing tools from Rust! It’s at https://github.com/jvns/rust-bcc or https://crates.io/crates/bcc, and has a couple of hopefully easy to understand examples. It turns out that writing BPF-based tracing tools in Rust is really easy (in some ways easier than doing the same things in Python). In this post I’ll expl
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く