mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add trace_pipe utility
This commit is contained in:
9
pythonbpf/utils.py
Normal file
9
pythonbpf/utils.py
Normal file
@ -0,0 +1,9 @@
|
||||
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.")
|
||||
Reference in New Issue
Block a user