Files
python-bpf/pythonbpf/utils.py
Pragyansh Chaturvedi edc33733d9 Add trace_pipe utility
2025-10-14 03:51:43 +05:30

10 lines
221 B
Python

import subprocess
def trace_pipe():
"""Util to read from the trace pipe."""
try:
subprocess.run(["cat", "/sys/kernel/tracing/trace_pipe"])
except KeyboardInterrupt:
print("Tracing stopped.")