- 最后登录
- 2015-5-20
- 在线时间
- 13 小时
- 威望
- 3
- 金钱
- 101
- 注册时间
- 2012-7-5
- 阅读权限
- 10
- 帖子
- 47
- 精华
- 0
- 积分
- 3
- UID
- 558
|
61#
发表于 2015-3-10 09:01:29
本帖最后由 枕霜卧雪 于 2015-3-10 09:02 编辑
Quick Start Guide
Note: For detailed instructions on how to run oratop please download and review the latest oratop Users Guide.
Running oratop from within TFA Collector
Use the tfactl CLI to set the database context for oratop, ie., the target database that oratop should connect to, eg.,
$ $TFA_HOME/bin/tfactl db orcl <== set the target database context in TFA for oratop to use
$ $TFA_HOME/bin/tfactl oratop <== oratop will connect to the orcl database, no need to worry about any of the oratop pre-reqs, TFA takes care of all that
OR
Use the tfactl shell to set the database context for oratop, ie., the target database that oratop should connect to, eg.,
$ $TFA_HOME/bin/tfactl <== invoke the tfactl shell prompt
tfactl> db orcl <== set the target database context in TFA for oratop to use
Set db to orcl
orcl tfactl> oratop
To run oratop in "batch mode" for a spoecific number os snapshots
$ $TFA_HOME/bin/tfactl
tfactl> db orcl
Set db to orcl
orcl tfactl> oratop -bn10 <== this example would run 10 snapshots at the default 5 second interval unless the interval had been changed eg. oratop -i 10 -bn10
Once oratop is invoked and running within the TFA framework its operation is exactly the same as if run standalone. One thing to be aware of is that when oratop is run from within the TFA framework in batch mode
as in the above example the ouput is automatically redirected to the oratop specific directory in the TFA repository location $TFA_REPOSITORY/supptools/oratop for automatic collection by TFA Collector. In standalone mode
you would need to use the redirection symbol ">" and specify the path and file name for re-direction and TFA would not necessarily know where to collect the resultant file unless it is redirected to one of the know diagnostic directories.
Running oratop standalone
1.Log in to the system as the Oracle RDBMS software installation owner
2.Stage the oratop executable on the server on which the tool will be executed. On a RAC system it is only necessary to stage the executable on one node as it is RAC aware.
3.Change the name of the executable, eg.
4.
$ mv oratop* oratop
5.Validate the permissions for oratop are 755 (-rwxr-xr-x). If the permissions are not currently set to 755, set the permissions on oratop as follows:
$ chmod 755 oratop
6.Configure the execution environment as follows (if not already set accordingly)
7.
$ export TERM=xterm #or vt100
$ export ORACLE_HOME=<11.2 database home>
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
$ export PATH=$ORACLE_HOME/bin:$PATH
$ export ORACLE_SID=<local 11.2 database SID to be monitored> #only needed if connecting to a local database
8.Invoke the tool to monitor a local database as follows (interval can be any interval in seconds):
$ ./oratop -i 10 / as sysdba
9.Non-dba privileged user requires specific grants to use the tool. See User Guide for grants required.
10.Databases can be monitored remotely using a tns alias as described in the oratop Users Guide.
11.
$ ./oratop -i 10 username/password@tns_alias
$ ./oratop -i 10 system/manager@tns_alias
12.To exit the program simply press the keyboard key "q". To abort, CTRL-C.
Troubleshooting:
If you receive an error similar to
./oratop: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
that is an indication that libclntsh.so.11.1 was not found in the path defined in LD_LIBRARY_PATH similar to
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib (ie., the location of libclntsh.so.11.1) |
|