Product SiteDocumentation Site

20.4. Starting and Stopping OProfile Using Legacy Mode

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.

Disable the nmi_watchdog registers

On a Fedora 25 system, the nmi_watchdog registers with the perf subsystem. Due to this, the perf subsystem grabs control of the performance counter registers at boot time, blocking OProfile from working.
To resolve this, either boot with the nmi_watchdog=0 kernel parameter set, or run the following command as root to disable nmi_watchdog at run time:
~]# echo 0 > /proc/sys/kernel/nmi_watchdog
To re-enable nmi_watchdog, use the following command as root:
~]# echo 1 > /proc/sys/kernel/nmi_watchdog
To stop the profiler, execute the following command as root:
~]# opcontrol --shutdown