0

According to the README file in /sys/kernel/debug/tracing/README, doing echo 1 > tracing_on should be a quick way to enable tracing. No matter how many times I execute this (as root), the value in tracing_on still remains 0. Why is that? How can I debug this further? There is no output in dmesg

tracing mini-HOWTO:

# echo 0 > tracing_on : quick way to disable tracing
# echo 1 > tracing_on : quick way to re-enable tracing

 Important files:
  trace         - The static contents of the buffer
              To clear the buffer write into this file: echo > trace
  trace_pipe        - A consuming read to see the contents of the buffer
  current_tracer    - function and latency tracers
0

To get this working I first had to say what to trace! To trace function calls I did this:

sudo -s # need to be root to be able to look inside /sys/kernel/debug
cd /sys/kernel/debug/tracing
echo function > current_tracer   #  trace function calls
echo SyS_inotify_add_watch > set_ftrace_filter # limit what to trace

Doing that, implicitly set the tracing flag to on, as

cat tracing_on 
1

Now you can also disable it

echo 0 > tracing_on

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.