Chapter 39. OProfile
opcontrol --separate=<choice>
<choice> can be one of the following:
• none — do not separate the profiles (default)
• library — generate per-application profiles for libraries
• kernel — generate per-application profiles for the kernel and kernel modules
• all — generate per-application profiles for libraries and per-application profiles for the kernel and
kernel modules
If --separate=library is used, the sample file name includes the name of the executable as well
as the name of the library.
Note
These configuration changes will take effect when oprofile is restarted.
39.3. Starting and Stopping OProfile
To start monitoring the system with OProfile, execute the following command as root:
opcontrol --start
Output similar to the following is displayed:
Using log file /var/lib/oprofile/oprofiled.log Daemon started. Profiler running.
The settings in /root/.oprofile/daemonrc are used.
The OProfile daemon, oprofiled, is started; it periodically writes the sample data to the /var/lib/
oprofile/samples/ directory. The log file for the daemon is located at /var/lib/oprofile/
oprofiled.log.
To stop the profiler, execute the following command as root:
opcontrol --shutdown
39.4. Saving Data
Sometimes it is useful to save samples at a specific time. For example, when profiling an executable,
it may be useful to gather different samples based on different input data sets. If the number of events
to be monitored exceeds the number of counters available for the processor, multiple runs of OProfile
can be used to collect data, saving the sample data to different files each time.
540
Need help?
Do you have a question about the ENTERPRISE LINUX 5 - DEPLOYMENT and is the answer not in the manual?
Questions and answers