summaryrefslogtreecommitdiffstats
path: root/rootdir/init.trace.rc
blob: 1d114f53873fbe7cf1278d503b696848ac943744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Permissions to allow system-wide tracing to the kernel trace buffer.
##
on boot

# Allow writing to the kernel trace log.
    chmod 0222 /sys/kernel/debug/tracing/trace_marker

# Allow the shell group to enable (some) kernel tracing.
    chown root shell /sys/kernel/debug/tracing/trace_clock
    chown root shell /sys/kernel/debug/tracing/buffer_size_kb
    chown root shell /sys/kernel/debug/tracing/options/overwrite
    chown root shell /sys/kernel/debug/tracing/events/sched/sched_switch/enable
    chown root shell /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
    chown root shell /sys/kernel/debug/tracing/events/power/cpu_frequency/enable
    chown root shell /sys/kernel/debug/tracing/events/power/cpu_idle/enable
    chown root shell /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
    chown root shell /sys/kernel/debug/tracing/tracing_on

    chmod 0664 /sys/kernel/debug/tracing/trace_clock
    chmod 0664 /sys/kernel/debug/tracing/buffer_size_kb
    chmod 0664 /sys/kernel/debug/tracing/options/overwrite
    chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_switch/enable
    chmod 0664 /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable
    chmod 0664 /sys/kernel/debug/tracing/events/power/cpu_frequency/enable
    chmod 0664 /sys/kernel/debug/tracing/events/power/cpu_idle/enable
    chmod 0664 /sys/kernel/debug/tracing/events/cpufreq_interactive/enable
    chmod 0664 /sys/kernel/debug/tracing/tracing_on

# Allow only the shell group to read and truncate the kernel trace.
    chown root shell /sys/kernel/debug/tracing/trace
    chmod 0660 /sys/kernel/debug/tracing/trace