The attached script can be used to gather database information for performance analysis data gathering. Without the OS performance data collection the information from the gather output will not be sufficient to identify performance problems cause by the OS or hardware.
- This script should only be used with a Enterprise database license installed.
- Before running the script set the DLC variable or execute the script in a proenv environment which sets DLC automatically.
- This script is not intended to be used to collect stack trace information. The lines which would normally collect stack trace information have been removed as has any command which would normally collect OS performance metric information.
When running as non-root account, remove the following lines:
me=`whoami`
if [ $me != "root" ]
then
{
echo "You are not logged in as root."
echo "Root permissions are needed to run "
echo "some of the utilities in this script."
exit
}
fi
This gather script is provided 'as is', but is essentially for trouble-shooting online situations when they're happening. Typically hang situations.
Running running latch statistics in production can be harmful to database performance and stability, something you need to be aware of.
If you really need this information, then Ideally you want to seperate the "Activity: Latch Counts" with very short sampling interval.
The Latch Statistics applies to : (line 303 - 328)
echo 4 >>gatherin.txt #Administrative Functions
echo 4 >>gatherin.txt #Adjust Latch Options
echo 2 >>gatherin.txt #Enable latch activity collection
echo 3 >>gatherin.txt #Enable latch timing collection
.... <inclusive>
echo 4 >>gatherin.txt #Administrative Functions
echo 4 >>gatherin.txt #Adjust Latch Options
echo 2 >>gatherin.txt #Disable latch activity collection
echo 3 >>gatherin.txt #Disable latch timing collection