blob: 5a78aa6bedf011b675ee2947ef5c90d3629ed1ee [file] [log] [blame]
Mike Dodd8cfa7022010-11-17 11:12:26 -08001.TH OPCONTROL 1 "@DATE@" "oprofile @VERSION@"
2.UC 4
3.SH NAME
4opcontrol \- control OProfile profiling
5.SH SYNOPSIS
6.br
7.B opcontrol
8[
9.I options
10]
11.SH DESCRIPTION
12.B opcontrol
13can be used to start profiling, end a profiling session,
14dump profile data, and set up the profiling parameters.
15
16.SH OPTIONS
17.TP
18.BI "--help"
19Show help message.
20.br
21.TP
22.BI "--version"
23Show version.
24.br
25.TP
26.BI "--list-events"
27Shows the monitorable events.
28.br
29.TP
30.BI "--init"
31Load the OProfile module if required and make the OProfile driver
32interface available.
33.br
34.TP
35.BI "--setup"
36Followed by list options for profiling setup. Store setup
37in ~root/.oprofile/daemonrc. Optional.
38.br
39.TP
40.BI "--status"
41Show configuration information.
42.br
43.TP
44.BI "--start-daemon"
45Start the oprofile daemon without starting profiling. Not available
46in 2.2/2.4 kernels.
47.br
48.TP
49.BI "--start"
50Start data collection with either arguments provided by --setup
51or with information saved in ~root/.oprofile/daemonrc.
52.br
53.TP
54.BI "--dump"
55Force a flush of the collected profiling data to the daemon.
56.br
57.TP
58.BI "--stop"
59Stop data collection. Not available in 2.2/2.4 kernels.
60.br
61.TP
62.BI "--shutdown"
63Stop data collection and kill the daemon.
64.br
65.TP
66.BI "--reset"
67Clear out data from current session, but leaves saved sessions.
68.br
69.TP
70.BI "--save="sessionname
71Save data from current session to sessionname.
72.br
73.TP
74.BI "--deinit"
75Shut down daemon. Unload the oprofile module and oprofilefs.
76.br
77.TP
78.BI "--session-dir="dir_path
79Use sample database out of directory dir_path instead of the default location (/var/lib/oprofile).
80.br
81.TP
82.BI "--buffer-size="num
Jeff Brown7a33c862011-02-02 14:00:44 -080083Set kernel buffer to num samples. When using a 2.6 kernel, buffer watershed needs
Mike Dodd8cfa7022010-11-17 11:12:26 -080084to be tweaked when changing this value.
Jeff Brown7a33c862011-02-02 14:00:44 -080085Rules: A non-zero value goes into effect after a '--shutdown/start' sequence.
86A value of zero sets this parameter back to default value, but does not go into
87effect until after '--deinit/init' sequence.
Mike Dodd8cfa7022010-11-17 11:12:26 -080088.br
89.TP
90.BI "--buffer-watershed="num
Jeff Brown7a33c862011-02-02 14:00:44 -080091Set kernel buffer watershed to num samples (2.6 only). When
92buffer-size - buffer-watershed free entries remain in the kernel buffer, data will be
93flushed to the daemon. Most useful values are in the range [0.25 - 0.5] * buffer-size.
94Same rules as defined for buffer-size.
Mike Dodd8cfa7022010-11-17 11:12:26 -080095.br
96.TP
97.BI "--cpu-buffer-size="num
98Set kernel per cpu buffer to num samples (2.6 only). If you profile at high
99rate it can help to increase this if the log file show excessive count of
Jeff Brown7a33c862011-02-02 14:00:44 -0800100sample lost cpu buffer overflow. Same rules as defined for buffer-size.
Mike Dodd8cfa7022010-11-17 11:12:26 -0800101.br
102.TP
103.BI "--event="[event|"default"]
104Specify an event to measure for the hardware performance counters,
105or "default" for the default event. The event is of the form
106"CPU_CLK_UNHALTED:30000:0:1:1" where the numeric values are
107count, unit mask, kernel-space counting, user-space counting,
108respectively. Note that this over-rides all previous events selected;
109if you want two or more counters used simultaneously, you must specify
110them on the same opcontrol invocation.
111.br
112.TP
113.BI "--separate="[none,lib,kernel,thread,cpu,all]
114Separate samples based on the given separator. 'lib' separates
115dynamically linked library samples per application. 'kernel' separates
116kernel and kernel module samples per application; 'kernel'
117implies 'library'. 'thread' gives separation for each thread and
118task. 'cpu' separates for each CPU. 'all' implies all of the above
119options and 'none' turns off separation.
120.br
121.TP
122.BI "--callgraph=#depth"
123Enable callgraph sample collection with a maximum depth. Use 0 to disable
124callgraph profiling. This option is available on x86 using a
1252.6+ kernel with callgraph support enabled. It is also available on PowerPC using a 2.6.17+ kernel.
126.br
127.TP
128.BI "--image="[name,name...|"all"]
129Only profile the given absolute paths to binaries, or "all" to profile
130everything (the default).
131.br
132.TP
133.BI "--vmlinux="file
134vmlinux kernel image.
135.br
136.TP
137.BI "--no-vmlinux"
138Use this when you don't have a kernel vmlinux file, and you don't want to
139profile the kernel.
140.br
141.TP
142.BI "--verbose"
143Be verbose in the daemon log. This has a high overhead.
144.br
145.TP
146.BI "--kernel-range="start,end
147Set kernel range vma address in hexadecimal.
148
149.SH OPTIONS (specific to Xen)
150.TP
151.BI "--xen="file
152Xen image
153.br
154.TP
155.BI "--active-domains="<list>
156List of domain ids participating in a multi-domain profiling session. If
157more than one domain is specified in <list> they should be separated using
158commas. This option can only be used in domain 0 which is the only domain
159that can coordinate a multi-domain profiling session. Including domain 0 in
160the list of active domains is optional. (e.g. --active-domains=2,5,6 and
161--active-domains=0,2,5,6 are equivalent)
162.br
163
164.SH ENVIRONMENT
165No special environment variables are recognised by opcontrol.
166
167.SH FILES
168.TP
169.I /root/.oprofile/daemonrc
170Configuration file for opcontrol
171.TP
172.I /var/lib/oprofile/samples/
173The location of the generated sample files.
174
175.SH VERSION
176.TP
177This man page is current for @PACKAGE@-@VERSION@.
178
179.SH SEE ALSO
180.BR @OP_DOCDIR@,
181.BR oprofile(1)