Installing LTOM for RAC Hanganalyze
By Martin | December 17th, 2008 | Category: 10g, 11g, 9iR2, MetaLink, Oracle Database, Real Application Clusters | No Comments »I have recently written a short installation instruction for a customer to use LTOM for RAC hanganalyze.
- Download von MetaLink Note 352363.1:
https://metalink2.oracle.com/cgi-bin/cr/getfile.cgi?p_attid=352363.1:ltom
- unzip as User Oracle in directory with sufficient space. subdir ltom will be created
tar xfv ltom411.tar
- Install statspack
- Installation: db account ltom/ltom will be created
Java Binary in path
which javaif not, place java in path in ~/.bash_profile:
als User oracle: add $ORACLE_HOME/jre/1.4.2/bin to PATH Variablee.g.:
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/jre/1.4.2/binPut TOM_HOME in .~/.bash_profile:
export TOM_HOME=/home/oracle/ltom/tom_base/install/../tomSourcen of TOM_HOME
cd /home/oracle/ltom/tom_base/install
./autoinstall.shSample Output:
[oracle@ora-vm1 install]$ ./autoinstall.sh
TOM_HOME=/home/oracle/ltom/tom_base/install/../tom
rm: cannot remove `autoinstall.log’: No such file or directoryPreparing to install LTOM v4.0.0…
Checking your Oracle Environment…
ORACLE_HOME=/u01/app/oracle/product/10.2.0
ORACLE_SID=ORA102
TNS_ADMIN=
TOM_HOME=/home/oracle/ltom/tom_base/install/../tomIs this the correct Oracle environment you wish to use for installing LTOM?
Hit Return to Accept Default:
============================> \cContinuing the install with this environment
Checking for Java…
Java found.
Checking for top utility…
Found top utility.Checking for vmstat utility…
Found vmstat utility.Need to run some sql now to create TOM user
it Return to allow setup to do this for you, enter other to do this manually:
============================> \cTom user created successfully.
Warning…Please change tom password immediately!Grant user Tom successful.
Create package dbmssupp successful.
Grant execute on dbmssupp successful.Checking for statspack…
Cannot verify statspack is installed on your system.
LTOM requires statspack to be installed to work properly.Enter your email id to get notification of hangs via email…
Hit Return to ignore hang notification via email:
============================> \cConfiguring tom_deploy.properties file…
TOM/LTOM successfully installed.
Please review any messages you received above.
REMEMBER: You must have TOM_HOME defined and java in your PATH
before you can run TOM/LTOM.
- Configuration
Change ltom/tom_base/tom/init/hangDetect.properties
from:
#RAC_AWARE=TRUE
HANGANALYZE=A
SYSTEMSTATE=266
DELAY=30
HANGANALYZE=A
SYSTEMSTATE=266to:
RAW_AWARE=TRUE
HANGANALYZE=A
SYSTEMSTATE=266
DELAY=30
HANGANALYZE=A
SYSTEMSTATE=266Change tom db passwort:
SQL> alter user tom identified by secret;
Add credentials to config file:
vi tom_deploy.properties
DB_USERID=tom
:q!./startltom.sh -p
Enter same password as in sqlplus. Password will be saved encrypted in tom_deploy.properties
- edit tom_deploy.properties to decide which of the 3 modules should be running during background operations: hangdetect, profiler, session recorder
- Start/Stop Scripts
vi start_ltom.sh
#!/bin/bash
. ~/.bash_profile
nohup $TOM_HOME/startltom.sh -s &vi stop_ltom.sh
#!/bin/bash
touch $TOM_HOME/tmp/hang.stop
touch $TOM_HOME/tmp/profile.stop
touch $TOM_HOME/tmp/session.stopchmod u+x start_ltom.sh
chmod u+x stop_ltom.sh
- If you want to run ltom during a specific timeframe, use cron (as user oracle)
crontab -e
45 01 * * * /home/oracle/ltom/start_ltom.sh >/dev/null 2>/dev/null </dev/null
00 05 * * * /home/oracle/ltom/start_ltom.sh >/dev/null 2>/dev/null </dev/null