mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add permission error handling in trace_pipe
This commit is contained in:
@ -7,6 +7,8 @@ def trace_pipe():
|
||||
subprocess.run(["cat", "/sys/kernel/tracing/trace_pipe"])
|
||||
except KeyboardInterrupt:
|
||||
print("Tracing stopped.")
|
||||
except (FileNotFoundError, PermissionError) as e:
|
||||
print(f"Error accessing trace_pipe: {e}. Try running as root.")
|
||||
|
||||
|
||||
def trace_fields():
|
||||
|
||||
Reference in New Issue
Block a user