mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
14 lines
300 B
Bash
14 lines
300 B
Bash
![]() |
#!/bin/sh
|
||
|
|
||
|
set -o errexit
|
||
|
|
||
|
TRACE_ACTIVE=$(cat /sys/kernel/debug/tracing/tracing_on)
|
||
|
|
||
|
if [ "$TRACE_ACTIVE" -ne "1" ]; then
|
||
|
echo "Kernel tracing disabled, enabling"
|
||
|
echo 1 > /sys/kernel/debug/tracing/tracing_on
|
||
|
fi
|
||
|
|
||
|
echo "Reading trace pipe, ^C to exit"
|
||
|
cat /sys/kernel/debug/tracing/trace_pipe
|