The attached script can be used to gather database information in the case of a hang or problem situation or for performance analysis data gathering.
- Before running the script set the DLC variable or execute the script in a proenv environment which sets DLC automatically.
- The promon gather script needs to be run as root. This is because there are several Operating System commands that need to be executed as root. ie. sar, iostat, vmstat etc..
- When the promon gather script is run without the perf option, it is being run to debug a hang situation. In this mode, the promon gather script requires root access so the commands used to attach to or signal a process to dump a protrace file will require root access if you are not the owner of the process.
- If the machine being used has an account that can be used via sudo to perform these functions (pstack or kill -s USR1), then the promon gather script can be modified to remove the following lines that would require the root account. Keeping in mind that the pstack or kill commands will still need to be able to execute successfully against processes not owned by the user/sudo account running the modified gather script.
If not logged in as a root user, 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
In the various Operating System sections of the script, comment out or remove sections of the script dealing with sar, iostat and vmstat commands.
This gather script is provided 'as is', but is essentially for trouble-shooting online situations when they're happening. Typically hang situations.