Salesforce

Script for gathering database information on Unix.

« Go Back

Information

 
TitleScript for gathering database information on Unix.
URL Name000010526
Article Number000127599
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: UNIX
Question/Problem Description
How to gather database information when database is hung or encounters a problem situation?
How to gather system performance analysis?
Improved Gather Script for UNIX.
What is the gather script?
What is the PROMON gather script for UNIX?
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The attached "gather.sh" script can be used to gather database shared-memory information in the case of a hang or problem situation or for performance analysis data gathering.
./gather.sh <explicit path to db> <parameters>
This version of the gather script should only be used with a Enterprise database license installed. Otherwise refer to Articles:
  • 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.  Root permissions are needed because there are several Operating System commands that need to be executed : sar, iostat, vmstat to collect system performance metrics.
  • When using this script for troubleshooting performance problems with the perf parameter, the script should be executed twice, once when the database performance is ideal and again when the performance is perceived as not acceptable. The output from each execution can then be used for comparison. 
./gather.sh <explicit path to db> perf
  • When the gather script is run without the perf option, it is typically being run to debug a hang situation.  In this mode, the PROMON gather script requires root access so that the commands used to attach to or signal a process to dump PROTRACE files 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 needs to be modified first 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.
1.   When running as non-root account, remove the following lines from the gather.sh script:
  
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
2.  In the various Operating System sections of the script, comment out or remove sections of the script dealing with sar, iostat and vmstat commands.
Example commenting out sections dealing with sar, iostat, and vmstat:  
if [ $ostype = "Linux" ]
 then  
  {
  #if [ -x `which iostat` ] 
  # then
  # {
  #   echo "found iostat"
  #   iostat -dktx ${sleep_interval} ${os_repeats} >>iostat-dktx.out&  
  #  }
  #fi

  #if [ -x `which vmstat` ] 
  # then  
  # {
  #   echo "found vmstat"
  #   vmstat ${sleep_interval} ${os_repeats} >>vmstat.out&  
  #  }
  #fi

  #if [ -x `which sar` ] 
  # then    
  #  {
  #   echo "found sar"
  #   sar -q  ${sleep_interval} ${os_repeats} >>sar-q.out& 
  #  }
  #fi

 
  • 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 against a non-hanging scenario, then Ideally separate the "Activity: Latch Counts" with very short sampling intervals.

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
    

This gather script is provided 'as is'. It is essentially for trouble-shooting online situations when they're happening. Typically hang situations.

Beginning in 11.7.1 the scripts to perform gather are shipped and available within the DLC/bin directory and are named:
Unix:
gather-script-enterprise
gather-script-wrkgrp

Windows:
gather-script-enterprise.bat
gather-script-wrkgrp.bat
Workaround
Notes
Keyword Phrase
Last Modified Date7/28/2025 2:44 PM

Powered by