Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ebpf lost event counter. Issue #38 #48

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Add ebpf lost event counter. Issue #38 #48

merged 1 commit into from
Jul 3, 2024

Conversation

haesbaert
Copy link
Collaborator

This commit includes the pending PR: elastic/ebpf#198 Once that is merged I'll rebase this, so ignore the elastic-ebpf/* bits.

Pretty straighforward, contrary to kprobes which we get the counter on the data path, with ebpf we have to actually read it, so add a new ops for updating the counter, we should caution users to not hammer the reading, as it's real syscall.

Tested by hacking quark-mon away.

@haesbaert haesbaert marked this pull request as ready for review July 2, 2024 08:54
return (-1);

for (i = 0; i < libbpf_num_possible_cpus(); i++)
qq->stats.lost = pcpu_ees[i].lost;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't care about the sent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment no, I don't have the statistics for sent yet, I just wanted to get it on the same stage as the kprobes for now.

Pretty straighforward, contrary to kprobes which we get the counter on the data
path, with ebpf we have to actually read it, so add a new ops for updating the
counter, we should caution users to not hammer the reading, as it's real
syscall.

Tested by hacking quark-mon away.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants