Open v-thakkar opened 2 years ago
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?
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?
Agreed, definitely, both are important and useful!
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.
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.
Yep, sounds good. If you want to handle that, please go ahead. Otherwise, I can handle it.
Sure, I can take care of it.
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.