parca-agent icon indicating copy to clipboard operation
parca-agent copied to clipboard

docs: Add documentation about eBPF and BTF support

Open v-thakkar opened this issue 3 years ago • 7 comments

eBPF was introduced in one of the 3.x kernel and BTF support was added in one of the 5.x version. Although a lot of these features have been backported in different mainline stable kernels as well as in distro-specific kernels. We should add documentation with some commands so that it's easier for users to identify if their host kernel has BPF and BTF support or not.

v-thakkar avatar Apr 11 '22 08:04 v-thakkar

Could we maybe even have the Parca Agent do a few tests on startup to identify whether the features it needs are available and error out with that exact feature if it isn't available?

brancz avatar Apr 11 '22 12:04 brancz

Yes, good idea. We should do that. Probably a separate issue for that? I think having this somewhere under system requirements will still be beneficial for the new users. Wdyt?

v-thakkar avatar Apr 11 '22 12:04 v-thakkar

Agreed, definitely, both are important and useful!

brancz avatar Apr 11 '22 15:04 brancz

FWIW I had this in our stack unwinding PR, I can extract it out as another PR. https://github.com/parca-dev/parca-agent/blob/8e02f0acd9b8c5969c066a4ed3ca66ea2509b955/pkg/agent/profile.go#L285-L348

It's a little rudimentary, it's just checking for the underlying Linux version of the host. We can improve the logic.

kakkoyun avatar Apr 12 '22 08:04 kakkoyun

Ah, nice. This looks almost perfect. Just to be more accurate, instead of checking it via OS version we should probably check it via config options of the running kernel. My idea was to check with 'cat /boot/config-$(uname -r) | grep BTF' or something similar.

v-thakkar avatar Apr 12 '22 08:04 v-thakkar

Yep, sounds good. If you want to handle that, please go ahead. Otherwise, I can handle it.

kakkoyun avatar Apr 12 '22 11:04 kakkoyun

Sure, I can take care of it.

v-thakkar avatar Apr 12 '22 12:04 v-thakkar