1# Example config for a trace that polls system counters.
2
3duration_ms: 2000
4
5buffers {
6  size_kb: 16384
7  fill_policy: RING_BUFFER
8}
9
10buffers {
11  size_kb: 16384
12  fill_policy: RING_BUFFER
13}
14
15# Enable various data sources as usual.
16data_sources {
17  config {
18    name: "linux.ftrace"
19    target_buffer: 0
20    ftrace_config {
21      # These parameters affect only the kernel trace buffer size and how
22      # frequently it gets moved into the userspace buffer defined above.
23      buffer_size_kb: 16384
24      drain_period_ms: 250
25      ftrace_events: "cpu_frequency"
26      ftrace_events: "cpu_idle"
27      ftrace_events: "sched_switch"
28      ftrace_events: "tracing_mark_write"
29    }
30  }
31}
32
33data_sources {
34  config {
35    name: "linux.process_stats"
36    target_buffer: 0
37    process_stats_config {
38      proc_stats_poll_ms: 10
39    }
40  }
41}
42
43data_sources {
44  config {
45    name: "linux.sys_stats"
46    target_buffer: 1
47    sys_stats_config {
48      meminfo_period_ms: 100
49      meminfo_counters: MEMINFO_MEM_AVAILABLE
50      meminfo_counters: MEMINFO_BUFFERS
51      meminfo_counters: MEMINFO_CACHED
52      meminfo_counters: MEMINFO_SWAP_CACHED
53      meminfo_counters: MEMINFO_ACTIVE
54      meminfo_counters: MEMINFO_INACTIVE
55      meminfo_counters: MEMINFO_ACTIVE_ANON
56      meminfo_counters: MEMINFO_INACTIVE_ANON
57      meminfo_counters: MEMINFO_ACTIVE_FILE
58      meminfo_counters: MEMINFO_INACTIVE_FILE
59      meminfo_counters: MEMINFO_UNEVICTABLE
60
61      vmstat_period_ms: 100
62      vmstat_counters: VMSTAT_NR_FREE_PAGES
63      vmstat_counters: VMSTAT_NR_ALLOC_BATCH
64      vmstat_counters: VMSTAT_NR_INACTIVE_ANON
65      vmstat_counters: VMSTAT_NR_ACTIVE_ANON
66      vmstat_counters: VMSTAT_NR_INACTIVE_FILE
67      vmstat_counters: VMSTAT_NR_ACTIVE_FILE
68      vmstat_counters: VMSTAT_NR_UNEVICTABLE
69      vmstat_counters: VMSTAT_NR_MLOCK
70      vmstat_counters: VMSTAT_NR_ANON_PAGES
71      vmstat_counters: VMSTAT_NR_MAPPED
72      vmstat_counters: VMSTAT_NR_FILE_PAGES
73      vmstat_counters: VMSTAT_NR_DIRTY
74      vmstat_counters: VMSTAT_NR_WRITEBACK
75      vmstat_counters: VMSTAT_NR_SLAB_RECLAIMABLE
76      vmstat_counters: VMSTAT_NR_SLAB_UNRECLAIMABLE
77      vmstat_counters: VMSTAT_NR_PAGE_TABLE_PAGES
78      vmstat_counters: VMSTAT_NR_KERNEL_STACK
79      vmstat_counters: VMSTAT_NR_OVERHEAD
80      vmstat_counters: VMSTAT_NR_UNSTABLE
81      vmstat_counters: VMSTAT_NR_BOUNCE
82      vmstat_counters: VMSTAT_NR_VMSCAN_WRITE
83      vmstat_counters: VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM
84      vmstat_counters: VMSTAT_NR_WRITEBACK_TEMP
85
86      stat_period_ms: 100
87      stat_counters: STAT_CPU_TIMES
88      stat_counters: STAT_IRQ_COUNTS
89      stat_counters: STAT_FORK_COUNT
90    }
91  }
92}