1OPCONTROL(1) General Commands Manual OPCONTROL(1)
2
3
4
6 opcontrol - control OProfile profiling
7
9 opcontrol [ options ]
10
12 opcontrol can be used to start profiling, end a profiling session, dump
13 profile data, and set up the profiling parameters.
14
15
17 --help / -?
18 Show help message.
19
20 --version / -v
21 Show version.
22
23 --list-events / -l
24 Shows the monitorable events.
25
26 --init Load the OProfile module if required and make the OProfile
27 driver interface available.
28
29 --setup
30 Followed by list options for profiling setup. Store setup in
31 ~root/.oprofile/daemonrc. Optional.
32
33 --status
34 Show configuration information.
35
36 --start-daemon
37 Start the oprofile daemon without starting profiling.
38
39 --start / -s
40 Start data collection with either arguments provided by --setup
41 or with information saved in ~root/.oprofile/daemonrc.
42
43 --dump / -d
44 Force a flush of the collected profiling data to the daemon.
45
46 --stop / -t
47 Stop data collection.
48
49 --shutdown / -h
50 Stop data collection and kill the daemon.
51
52 --reset
53 Clear out data from current session, but leaves saved sessions.
54
55 --save=sessionname
56 Save data from current session to sessionname.
57
58 --deinit
59 Shut down daemon. Unload the oprofile module and oprofilefs.
60
61 --session-dir=dir_path
62 Use sample database out of directory dir_path instead of the
63 default location (/var/lib/oprofile).
64
65 --buffer-size=num
66 Set kernel buffer to num samples. The buffer watershed needs to
67 be tweaked when changing this value. Rules: A non-zero value
68 goes into effect after a '--shutdown/start' sequence. A value
69 of zero sets this parameter back to default value, but does not
70 go into effect until after '--deinit/init' sequence.
71
72 --buffer-watershed=num
73 Set kernel buffer watershed to num samples. When buffer-size -
74 buffer-watershed free entries remain in the kernel buffer, data
75 will be flushed to the daemon. Most useful values are in the
76 range [0.25 - 0.5] * buffer-size. Same rules as defined for
77 buffer-size.
78
79 --cpu-buffer-size=num
80 Set kernel per-cpu buffer to num samples. If you profile at high
81 rate it can help to increase this if the log file show excessive
82 count of sample lost cpu buffer overflow. Same rules as defined
83 for buffer-size.
84
85 --event / -e [event|"default"]
86 Specify an event to measure for the hardware performance coun‐
87 ters, or "default" for the default event. The event is of the
88 form "CPU_CLK_UNHALTED:30000:0:1:1" where the numeric values are
89 count, unit mask, kernel-space counting, user-space counting,
90 respectively. Note that this over-rides all previous events
91 selected; if you want to profile with two or more events simul‐
92 taneously, you must specify them on the same opcontrol invoca‐
93 tion. You can specify unit mask values using either a numerical
94 value (hex values must begin with "0x") or a symbolic name (if
95 the name=<um_name> field is shown in the ophelp output). For
96 some named unit masks, the hex value is not unique; thus, OPro‐
97 file tools enforce specifying such unit masks value by name.
98
99 --separate / -p [none,lib,kernel,thread,cpu,all]
100 Separate samples based on the given separator. 'lib' separates
101 dynamically linked library samples per application. 'kernel'
102 separates kernel and kernel module samples per application;
103 'kernel' implies 'library'. 'thread' gives separation for each
104 thread and task. 'cpu' separates for each CPU. 'all' implies
105 all of the above options and 'none' turns off separation.
106
107 --callgraph / -c [#depth]
108 Enable callgraph sample collection with a maximum depth. Use 0
109 to disable callgraph profiling. This option is available on x86
110 using a 2.6+ kernel with callgraph support enabled. It is also
111 available on PowerPC using a 2.6.17+ kernel.
112
113 --image / -i [name,name...|"all"]
114 Only profile the given absolute paths to binaries, or "all" to
115 profile everything (the default).
116
117 --vmlinux=file
118 vmlinux kernel image.
119
120 --no-vmlinux
121 Use this when you don't have a kernel vmlinux file, and you
122 don't want to profile the kernel.
123
124 --verbose / -V [options]
125 Be verbose in the daemon log. This has a high overhead.
126
127 --kernel-range=start,end
128 Set kernel range vma address in hexadecimal.
129
130
132 --xen=file
133 Xen image
134
135 --active-domains=<list>
136 List of domain ids participating in a multi-domain profiling
137 session. Each of the specified domains must run an instance of
138 oprofile. The sequence of opcontrol commands in each domain must
139 follow a given order which is specified in the oprofile user
140 manual. If more than one domain is specified in <list> they
141 should be separated using commas. This option can only be used
142 in domain 0 which is the only domain that can coordinate a
143 multi-domain profiling session. Including domain 0 in the list
144 of active domains is optional. (e.g. --active-domains=2,5,6 and
145 --active-domains=0,2,5,6 are equivalent). This option can only
146 be specified if --start-daemon is also specified and it is only
147 valid for the current run of the oprofile daemon; e.g. the list
148 of active domains is not persistent.
149
150 --passive-domains=<list>or--domains=<list>
151 List of domain ids to be profiled, separated by commas. As
152 opposed to the --active-domains option, the domains specified
153 with this option do not need to run oprofile. This makes profil‐
154 ing multiple domains easier. However, with the passive-domains
155 option, samples in user level processes and kernel modules can‐
156 not be mapped to specific symbols and are aggregated under a
157 generic class. Both --active-domains and --passive-domains
158 options can be specified in the same command, but the same
159 domain cannot be specified in both options. This option can only
160 be specified if either --start or --start-daemon is specified on
161 the same command and it is only valid for the current run of the
162 oprofile daemon; e.g. the list of passive domains is not persis‐
163 tent.
164
165 --passive-images=<list>or--domains-images=<list>
166 List of kernel images associated with the domains specified in
167 the --passive-domains option, also separated by commas. The
168 association between the images and domains is based on the order
169 they are specified in both options.
170
172 --s390hwsampbufsize=num
173 Number of 2MB areas used per CPU for storing sample data. The
174 best size for the sample memory depends on the particular system
175 and the workload to be measured. Providing the sampler with too
176 little memory results in lost samples. Reserving too much system
177 memory for the sampler impacts the overall performance and,
178 hence, also the workload to be measured.
179
180
182 No special environment variables are recognised by opcontrol.
183
184
186 /root/.oprofile/daemonrc
187 Configuration file for opcontrol
188
189 /var/lib/oprofile/samples/
190 The location of the generated sample files.
191
192
194 This man page is current for oprofile-0.9.9.
195
196
198 /usr/share/doc/oprofile-0.9.9/, oprofile(1)
199
200
201
2024th Berkeley Distribution Tue 21 March 2017 OPCONTROL(1)