1# Example config for a long trace periodically flushed into the 2# target file. See docs/long-traces.md for more. 3 4# Enable periodic flushing of the trace buffer into the output file. 5write_into_file: true 6 7# Max duration: 30 mins. 8duration_ms: 1800000 9 10# Writes the userspace buffer into the file every 2.5 seconds. 11file_write_period_ms: 2500 12 13 14# The trace buffers needs to be big enough to hold |file_write_period_ms| of 15# trace data. The trace buffer sizing depends on the number of trace categories 16# enabled and the device activity. A good rule of thumb is ~10-20 MB per second, 17# so if |file_write_period_ms| ~ 3s -> 30 MB. 18buffers { 19 size_kb: 32768 20 fill_policy: RING_BUFFER 21} 22 23# Enable various data sources as usual. 24data_sources { 25 config { 26 name: "linux.ftrace" 27 target_buffer: 0 28 ftrace_config { 29 # These parameters affect only the kernel trace buffer size and how 30 # frequently it gets moved into the userspace buffer defined above. 31 buffer_size_kb: 16384 32 drain_period_ms: 250 33 ftrace_events: "cpu_frequency" 34 ftrace_events: "cpu_idle" 35 ftrace_events: "sched_process_exec" 36 ftrace_events: "sched_process_exit" 37 ftrace_events: "sched_process_fork" 38 ftrace_events: "sched_process_free" 39 ftrace_events: "sched_process_hang" 40 ftrace_events: "sched_process_wait" 41 ftrace_events: "sched_switch" 42 ftrace_events: "sched_wakeup_new" 43 ftrace_events: "sched_wakeup" 44 ftrace_events: "sched_waking" 45 ftrace_events: "task_newtask" 46 ftrace_events: "task_rename" 47 ftrace_events: "tracing_mark_write" 48 } 49 } 50} 51 52data_sources { 53 config { 54 name: "linux.process_stats" 55 target_buffer: 0 56 } 57} 58