MaeBPF.Telemetry (maebpf v0.1.0)

Copy Markdown View Source

Live kernel BPF introspection and BPF_STATS_RUN_TIME telemetry controls.

Summary

Functions

Explicitly closes a runtime stats guard resource.

Enables kernel BPF_STATS_RUN_TIME collection and returns an RAII guard resource. Stats automatically disable when the guard is disabled or garbage collected.

Returns link metadata (id, type, type_id, prog_id) for a link resource.

Returns link metadata by kernel link ID.

Lists all active kernel BPF link IDs via bpf_link_get_next_id.

Lists all active kernel BPF map IDs via bpf_map_get_next_id.

Lists all active kernel BPF program IDs via bpf_prog_get_next_id.

Dumps the kernel-translated eBPF instructions (xlated) and native JIT machine code (jited) for a loaded program via bpf_prog_get_info_by_fd.

Dumps xlated and jited program binaries by kernel program ID.

Returns bpftool-parity program metadata (id, tag, name, type, run_cnt, run_time_ns, verified_insns, xlated_prog_len, jited_prog_len, btf_id, map_ids, etc.) for a loaded program.

Returns program metadata by kernel program ID.

Executes a loaded eBPF program directly via BPF_PROG_TEST_RUN.

Functions

disable_runtime_stats(guard)

Explicitly closes a runtime stats guard resource.

enable_runtime_stats()

Enables kernel BPF_STATS_RUN_TIME collection and returns an RAII guard resource. Stats automatically disable when the guard is disabled or garbage collected.

list_map_ids()

Lists all active kernel BPF map IDs via bpf_map_get_next_id.

list_prog_ids()

Lists all active kernel BPF program IDs via bpf_prog_get_next_id.

prog_dump(object, prog_name)

Dumps the kernel-translated eBPF instructions (xlated) and native JIT machine code (jited) for a loaded program via bpf_prog_get_info_by_fd.

prog_dump_by_id(id)

Dumps xlated and jited program binaries by kernel program ID.

prog_info(object, prog_name)

Returns bpftool-parity program metadata (id, tag, name, type, run_cnt, run_time_ns, verified_insns, xlated_prog_len, jited_prog_len, btf_id, map_ids, etc.) for a loaded program.

prog_info_by_id(id)

Returns program metadata by kernel program ID.

prog_test_run(object, prog_name, data_in, opts \\ [])

Executes a loaded eBPF program directly via BPF_PROG_TEST_RUN.

Delegates to MaeBPF.TestRun.run/4.