Before installing an ORACLE PMDA, please read this book or the README file in /var/pcp/pmdas/oracle. To fix problems you might have to run the Install and Remove scripts in that directory, so it would be a good idea to review the documentation to refresh your memory before continuing.
There is one complete subtree of ORACLE metrics in the PCP namespace for each ORACLE database instance for which you have installed an ORACLE PMDA.
The log files for ORACLE PMDAs are /var/adm/pcplog/oracle-*.log, where the star is replaced by the ORACLE instance name assigned to the PMDA at install time. Thus, the log file for the ORACLE PMDA instance named “xyz” is /var/adm/pcplog/oracle-xyz.log. Take care to check the date and time in the log files to ensure that you are not using an old log file to diagnose problems.
For more information, see the pmdaoracle(1) and pmdaoraping(1) reference pages.
Symptom: | The ORACLE PMDA's log has errors of the form:
| ||||||
Cause: | This can be caused by a number of things, ranging from ORACLE being unavailable or misconfigured to incorrect parameters being specified when using the Install script to configure the PMDA. | ||||||
Resolution: | Make sure that the ORACLE database instance that the problematic PMDA utilizes is available. Connect to it using the command:
and try to fetch some data using a database user other than that of the PMDA. A demonstration user such as scott/tiger is ideal here. If that works, connect to the database using the same ORACLE user that the PMDA does. Before doing so, make absolutely certain that the values of ORACLE_HOME and ORACLE_SID that appear in the PMDA's log file are correct, then set both these variables in the environment. The ORACLE user and password for the PMDA appear on the command line for the PMDA in /etc/pmcd.conf as the argument to the -c option. For example, if the flag -c pcp/pcp appears on the command line, enter this command:
If there is no -c option, the PMDA is using an ops$... login name and /var/pcp/pmdas/pmdaoracle will be setuid. In this case, become the user who owns the pmdaoracle binary (using su or equivalent command) and use a default login to sqlplus:
Before doing this, remember to check that ORACLE_HOME and ORACLE_SID are correct. If sqlplus indicates that the login is not permitted because the username or password is invalid, see the section titled “PMDA Cannot Connect to ORACLE”. If sqlplus refuses to let you in, there may be a problem with your ORACLE database configuration. In particular, ORACLE does not handle NFS-mounted ORACLE_HOME directories well, because write permission is required to update control and log files located in $ORACLE_HOME/dbs. Once you are in sqlplus, enter this command:
A description of the v$sysstat view should appear. If it does not, rerun the script to grant the PMDA access to the performance data from the database (see the section titled “PMDA Cannot Connect to ORACLE”). Restart PMCD by becoming superuser or root and entering:
Inspect the log file for the PMDA. If it started successfully this time, you may need to alter your database startup routine. See the section “Cannot Find ORACLE Metrics” for details. |
Symptom: | After a system is rebooted, or after the ORACLE database is shut down and then restarted, it is not possible to get any ORACLE metrics. | |
Cause: | If a PMDA is unable to connect to its ORACLE database instance, it cannot retrieve any performance metrics but will try to connect to the database again later. If the PMDA has a connection to the database and the database is shut down, the PMDA does not notice until the next request for ORACLE metrics arrives. This is because a PMDA accesses the ORACLE database only when a request is made. Thus, if a PMDA is idle while its database is shut down and then brought back up again, the next request to it fails because it is trying to use an old connection to the database. | |
Resolution: | The ORACLE PMDA periodically attempts to reconnect to the database in response to requests for metrics. The pmdaoracle(1) reference page describes how you can customize reconnection behavior. |
Symptom: | The ORACLE PMDA pmdaoracle is installed and started by pmcd, but later requests to retrieve ORACLE performance metrics produce errors such as these:
or
| |||
Cause: | Typically this means that the pmdaoracle agent has been terminated by pmcd when the agent did not respond quickly enough to a request for performance metrics. This can sometimes happen when either the system is very heavily loaded, or when the ORACLE DBMS is very busy (for example, during a checkpoint). To verify that this is really the cause of the problem, scan the tail of the /var/adm/pcplog/pmcd.log file, looking for lines of this form:
In the PMDA's log file (/var/adm/pcplog/oracle-*.log) should be some messages indicating an orderly termination, such as these:
| |||
Resolution: | The short-term solution is to restart the ORACLE PMDA by sending pmcd a SIGHUP signal:
This tells pmcd to restart any deceased PMDAs, restarting pmdaoracle with a fresh connection to the database. If the problem persists, consider changing the pmcd timeout to be longer than 5 seconds in /etc/config/pmcd.options. For example, add this line to change the default reconnect timeout to 10 seconds:
|