Forum Administrator
Joined: 09 Jul 2004 Posts: 45 Location: Lake Oswego, OR
|
Posted: Fri Feb 01, 2013 12:15 pm Post subject: Troubleshooting pgcollect with OProfile on Linux |
|
|
OProfile can be used to collect performance data for PGPROF by using certain command-line options (-hwtime, -dcache, etc) with pgcollect.
Because of the differences in linux86-64 operating systems and the differences in versions of OProfile, sometimes extra configuration steps are necessary to get things working.
This posting provides information on what to do if you see results like the following:
| Code: | $ pgcollect -hwtime a.out
ATTENTION: Use of opcontrol is discouraged. Please see the man page for operf.
Error: counter 0 not available |
The warning is the result of using the latest version of OProfile (0.98), and it can be safely ignored. We will be working on eliminating that warning in a future release, along with other improvements.
The error is due to a change in the management of the PMU (performance monitoring unit) by newer versions of Linux. There is a workaround, and again we are working on providing a better solution.
The workaround is:
- make sure that no 'perf' commands are running (see man perf(1))
- check to see that a file in /proc/sys/kernel named "nmi_watchdog"
or "watchdog" exists
If /proc/sys/kernel/nmi_watchdog exists, then disable the NMI watchdogtimer by running, as root:
| Code: | opcontrol --deinit
echo 0 > /proc/sys/kernel/nmi_watchdog |
Otherwise if /proc/sys/kernel/watchdog exists, then disable the NMI watchdog timer by running, as root:
| Code: | opcontrol --deinit
echo 0 > /proc/sys/kernel/watchdog |
Then retry your pgcollect command. |
|