Skip to content

libbpf-tools/syscount,memleak: Add metric output support #5281

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ekyooo
Copy link
Contributor

@ekyooo ekyooo commented Apr 14, 2025

This patch series adds support for metric output to syscount, memleak and biotop starting with the Line Protocol format to enable time-series visualization using tools like InfluxDB and Grafana.

To support future extensibility, the output logic is abstracted via a shared utility in trace_helpers. The design encourages adding other formats down the line.

Why time-series metrics?

  • syscount: observe syscall activity trends or spikes
  • memleak: monitor allocation growth and potential leaks over time
  • biotop: track I/O activity trends and latency spikes over time

Why Line Protocol first?
It's widely adopted in time-series systems, easy to parse, and integrates seamlessly with common stacks like Telegraf + InfluxDB.

This version is intended to share the concept and direction. Feedback is welcome before final polishing.
Thank you.

@ekyooo
Copy link
Contributor Author

ekyooo commented Apr 24, 2025

Changes:

Thank you.

ekyooo added 5 commits May 21, 2025 12:17
Allow callers to handle errors via return value instead of parsing the buffer.
Add --output option to syscount to print system call metrics in Line Protocol
format for time-series analysis.
Update syscount_example.txt with usage, examples, and a visualization guide for
InfluxDB/Grafana. Add images for basic, process, latency, and combined
dashboard modes.
Add --output option to memleak to print outstanding allocation metrics in Line
Protocol format.
Update memleak_example.txt with usage, examples, and a visualization guide for
InfluxDB/Grafana. Add images for allocation size, count, and combined dashboard.
Add print_metric() to trace_helpers to streamline metric output.
- Print metrics in Line Protocol format for time-series compatibility.
- Design the utility to support extensible formats.
- Apply the API usage to syscount and memleak to remove duplicates.
Add --output option to biotop to print system call metrics in Line Protocol
format for time-series analysis.
Include biotop_example.txt with usage, examples, and visualization guide for
tools like InfluxDB and Grafana. Add images for I/O and Latency modes.
@ekyooo ekyooo force-pushed the syscount_metric branch from be683a5 to 41f813f Compare May 21, 2025 05:52
@ekyooo
Copy link
Contributor Author

ekyooo commented May 21, 2025

Changes:

  • The biotop improvement patches are excluded from this PR's commit list as they have already been merged into the master branch.
  • syscall_helpers: libbpf-tools/syscall_helpers: Modify syscall_name to return error code #5314
    • This patch will be excluded from the commit list of this PR once they are merged into the master branch.
  • syscount: Added image to illustrate combined dashboard visualization for syscall counts and latencies, enabling a comprehensive view of syscall activity and performance.
  • memleak: Added image to illustrate combined dashboard visualization for allocation size and count, facilitating a unified overview of memory leak activity for real-time monitoring and trend analysis, surpassing standalone metrics views.

Thank you.

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.

1 participant