среда, 4 апреля 2018 г.

TFA Collector

 

 TFA Collector - инструмент для расширенного сбора диагностических данных (Doc ID 1513912.1 )


Root / Daemon Install:
 
1. Download from 1513912.1
2. Copy to one required machine and unzip
3. Run ./installTFA< platform > 
 
 

 Деинсталлируем TFA Collector, который по умолчанию был установлен, при инсталляции Grid Infrastructure.

 
На каждой из нод (пример нля ноды 2)запускаем: 
 
[root@rac12c02 ~]# export GRID_HOME=/u01/app/grid/product/12.2.0.1
[root@rac12c02 ~]# $GRID_HOME/bin/tfactl  uninstall
 
TFA will be uninstalled on node rac12c02 : 

Removing TFA from rac12c02...

Stopping TFA Support Tools...

Stopping TFA in rac12c02...

Shutting down TFA
Removed symlink /etc/systemd/system/multi-user.target.wants/oracle-tfa.service.
Removed symlink /etc/systemd/system/graphical.target.wants/oracle-tfa.service.
. . . . . 
. . . 
Successfully shutdown TFA..

Deleting TFA support files on rac12c02:
Removing /u01/app/oracle/tfa/rac12c02/database...
Removing /u01/app/oracle/tfa/rac12c02/log...
Removing /u01/app/oracle/tfa/rac12c02/output...
Removing /u01/app/oracle/tfa/rac12c02...
Removing /u01/app/oracle/tfa...
Removing /etc/rc.d/rc0.d/K17init.tfa
Removing /etc/rc.d/rc1.d/K17init.tfa
Removing /etc/rc.d/rc2.d/K17init.tfa
Removing /etc/rc.d/rc4.d/K17init.tfa
Removing /etc/rc.d/rc6.d/K17init.tfa
Removing /etc/init.d/init.tfa...
Removing /u01/app/grid/product/12.2.0.1/bin/tfactl...
Removing /u01/app/grid/product/12.2.0.1/tfa/bin...
Removing /u01/app/grid/product/12.2.0.1/tfa/rac12c02...
Removing /u01/app/grid/product/12.2.0.1/tfa...

[root@rac12c02 ~]# 
 
 

Устанавливаем новый TFA Collector:

(Установка с одной ноды)
 
 
[root@rac12c01 ~]# cd /home/oracle/Downloads/

[root@rac12c01 ~]# unzip TFA-LINUX_v18.1.1.zip

[root@rac12c01 Downloads]# ls -l
total 351592
-rwxr-xr-x 1 root   root     180549652 Feb  1 13:11 installTFA-LINUX
-rw-r--r-- 1 oracle oinstall 179401036 Apr  4 17:59 TFA-LINUX_v18.1.1.zip

[root@rac12c01 Downloads]# ./installTFA-LINUX
 
TFA Installation Log will be written to File : /tmp/tfa_install_15962_2018_04_04-18_37_37.log

Starting TFA installation

TFA Version: 181100 Build Date: 201802010159

Enter a location for installing TFA (/tfa will be appended if not supplied) [/home/oracle/Downloads/tfa]:
/u01/app/oracle/tfa

Running Auto Setup for TFA as user root...

Would you like to do a [L]ocal only or [C]lusterwide installation ? [L|l|C|c] [C] : C

The following installation requires temporary use of SSH.
If SSH is not configured already then we will remove SSH 
when complete.
  Do you wish to Continue ? [Y|y|N|n] [Y] Y
Installing TFA now...

Discovering Nodes and Oracle resources

Starting Discovery...


Getting list of nodes in cluster . . . . .

List of nodes in cluster:
rac12c01
rac12c02


Checking ssh user equivalency settings on all nodes in cluster

Node rac12c02 is not configured for ssh user equivalency and  the script uses ssh to install TFA on remote nodes.

Without this facility the script cannot install TFA on the remote nodes. 

Do you want to configure SSH for user root on rac12c02 [y/n] y
Generating keys on rac12c01...

Copying keys to rac12c02...

/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@rac12c02's password: 

CRS_HOME=/u01/app/grid/product/12.2.0.1

Searching for running databases...
1. TESTDB_OMEGA


Searching out ORACLE_HOME for selected databases...


Getting Oracle Inventory...

ORACLE INVENTORY: /u01/app/oraInventory


Discovery Complete...



TFA Will be Installed on the Following Nodes:
++++++++++++++++++++++++++++++++++++++++++++

Install Nodes
=============
rac12c01
rac12c02

Do you wish to make changes to the Node List ? [Y/y/N/n] [N] N

TFA will scan the following Directories
++++++++++++++++++++++++++++++++++++++++++++

.-------------------------------------------------------------------------.
|                                 rac12c01                                |
+--------------------------------------------------------------+----------+
| Trace Directory                                              | Resource |
+--------------------------------------------------------------+----------+
| /u01/app/grid/product/12.2.0.1/cfgtoollogs                   | CFGTOOLS |
| /u01/app/grid/product/12.2.0.1/crf/db/rac12c01               | CRS      |
| /u01/app/grid/product/12.2.0.1/crs/log                       | CRS      |
| /u01/app/grid/product/12.2.0.1/css/log                       | CRS      |
| /u01/app/grid/product/12.2.0.1/cv/log                        | CRS      |
| /u01/app/grid/product/12.2.0.1/evm/admin/log                 | CRS      |
| /u01/app/grid/product/12.2.0.1/evm/admin/logger              | CRS      |
| /u01/app/grid/product/12.2.0.1/evm/log                       | CRS      |
| /u01/app/grid/product/12.2.0.1/install                       | INSTALL  |
| /u01/app/grid/product/12.2.0.1/inventory/ContentsXML         | INSTALL  |
| /u01/app/grid/product/12.2.0.1/log                           | CRS      |
| /u01/app/grid/product/12.2.0.1/network/log                   | CRS      |
| /u01/app/grid/product/12.2.0.1/opmn/logs                     | CRS      |
| /u01/app/grid/product/12.2.0.1/racg/log                      | CRS      |
| /u01/app/grid/product/12.2.0.1/rdbms/log                     | ASM      |
| /u01/app/grid/product/12.2.0.1/scheduler/log                 | CRS      |
| /u01/app/grid/product/12.2.0.1/srvm/log                      | CRS      |
| /u01/app/oraInventory/ContentsXML                            | INSTALL  |
| /u01/app/oraInventory/logs                                   | INSTALL  |
| /u01/app/oracle/cfgtoollogs                                  | CFGTOOLS |
| /u01/app/oracle/crsdata/rac12c01/acfs                        | ACFS     |
| /u01/app/oracle/crsdata/rac12c01/afd                         | ASM      |
| /u01/app/oracle/crsdata/rac12c01/chad                        | CRS      |
| /u01/app/oracle/crsdata/rac12c01/core                        | CRS      |
| /u01/app/oracle/crsdata/rac12c01/crsconfig                   | CRS      |
| /u01/app/oracle/crsdata/rac12c01/crsdiag                     | CRS      |
| /u01/app/oracle/crsdata/rac12c01/cvu                         | CRS      |
| /u01/app/oracle/crsdata/rac12c01/evm                         | CRS      |
| /u01/app/oracle/crsdata/rac12c01/output                      | CRS      |
| /u01/app/oracle/crsdata/rac12c01/trace                       | CRS      |
| /u01/app/oracle/diag/asm/+asm/+ASM1/cdump                    | ASM      |
| /u01/app/oracle/diag/asmtool/user_oracle/host_2836368897_107 | ASMTOOL  |
| /u01/app/oracle/diag/asmtool/user_oracle/host_2836368897_107 | ASMTOOL  |
| /u01/app/oracle/diag/asmtool/user_root/host_2836368897_107/c | ASMTOOL  |
| /u01/app/oracle/diag/asmtool/user_root/host_2836368897_107/t | ASMTOOL  |
| /u01/app/oracle/diag/clients/user_oracle/host_2836368897_107 | DBCLIENT |
| /u01/app/oracle/diag/clients/user_oracle/host_2836368897_107 | DBCLIENT |
| /u01/app/oracle/diag/crs/rac12c01/crs/cdump                  | CRS      |
| /u01/app/oracle/diag/crs/rac12c01/crs/trace                  | CRS      |
| /u01/app/oracle/diag/rdbms/_mgmtdb/-MGMTDB/cdump             | RDBMS    |
| /u01/app/oracle/diag/rdbms/_mgmtdb/-MGMTDB/trace             | RDBMS    |
| /u01/app/oracle/diag/rdbms/testdb_omega/TESTDB1/cdump        | RDBMS    |
| /u01/app/oracle/diag/rdbms/testdb_omega/TESTDB1/trace        | RDBMS    |
| /u01/app/oracle/diag/tnslsnr                                 | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac12c01/listener/cdump         | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac12c01/listener/trace         | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac12c01/listener_scan1/cdump   | TNS      |
| /u01/app/oracle/diag/tnslsnr/rac12c01/listener_scan1/trace   | TNS      |
| /u01/app/oracle/product/12.2.0.1/cfgtoollogs                 | CFGTOOLS |
| /u01/app/oracle/product/12.2.0.1/install                     | INSTALL  |
| /u01/app/oracle/product/12.2.0.1/rdbms/log                   | RDBMS    |
'--------------------------------------------------------------+----------'


Installing TFA on rac12c01:
HOST: rac12c01 TFA_HOME: /u01/app/oracle/tfa/rac12c01/tfa_home

Installing TFA on rac12c02:
HOST: rac12c02 TFA_HOME: /u01/app/oracle/tfa/rac12c02/tfa_home

.-----------------------------------------------------------------------------.
| Host     | Status of TFA | PID   | Port | Version    | Build ID             |
+----------+---------------+-------+------+------------+----------------------+
| rac12c01 | RUNNING       | 16738 | 5000 | 18.1.1.0.0 | 18110020180201015951 |
| rac12c02 | RUNNING       |   717 | 5000 | 18.1.1.0.0 | 18110020180201015951 |
'----------+---------------+-------+------+------------+----------------------'


Running Inventory in All Nodes...

Enabling Access for Non-root Users on rac12c01...

Adding default users to TFA Access list...

Summary of TFA Installation:
.-------------------------------------------------------------.
|                           rac12c01                          |
+---------------------+---------------------------------------+
| Parameter           | Value                                 |
+---------------------+---------------------------------------+
| Install location    | /u01/app/oracle/tfa/rac12c01/tfa_home |
| Repository location | /u01/app/oracle/tfa/repository        |
| Repository usage    | 0 MB out of 6683 MB                   |
'---------------------+---------------------------------------'

.-------------------------------------------------------------.
|                           rac12c02                          |
+---------------------+---------------------------------------+
| Parameter           | Value                                 |
+---------------------+---------------------------------------+
| Install location    | /u01/app/oracle/tfa/rac12c02/tfa_home |
| Repository location | /u01/app/oracle/tfa/repository        |
| Repository usage    | 0 MB out of 6683 MB                   |
'---------------------+---------------------------------------'

TFA is successfully installed...

Usage : /u01/app/grid/product/12.2.0.1/bin/tfactl  [options]
    commands:diagcollect|collection|analyze|ips|run|start|stop|enable|disable|status|print|access|purge|directory|host|receiver|set|toolstatus|uninstall|diagnosetfa|syncnodes|setupmos|upload
For detailed help on each command use:
  /u01/app/grid/product/12.2.0.1/bin/tfactl  -help


Moving Install log file to /u01/app/oracle/tfa/rac12c01/tfa_home/log
 
[root@rac12c01 Downloads]# 
 
  

Настройка SUDO для запуска утилиты tfactl с правами Рута для учётной записи oracle  

 
На каждой ноде:
 
$ su – root

# vi /etc/sudoers


oracle  ALL=NOPASSWD:/u01/app/oracle/tfa/bin/tfactl
 
 
Проверяем: 
 
[oracle@rac12c01 ~]$ sudo /u01/app/oracle/tfa/bin/tfactl -h
 
  

Настройка автозапуска:

 
[oracle@rac12c01 ~]$ sudo /u01/app/oracle/tfa/bin/tfactl status

.------------------------------------------------------------------------------------------------.
| Host     | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+----------+---------------+-------+------+------------+----------------------+------------------+
| rac12c02 | RUNNING       |   717 | 5000 | 18.1.1.0.0 | 18110020180201015951 | RUNNING          |
| rac12c01 | RUNNING       | 16738 | 5000 | 18.1.1.0.0 | 18110020180201015951 | RUNNING          |
'----------+---------------+-------+------+------------+----------------------+------------------'
 
Разрешить auto-start для TFA Collector на каждой ноде: 
 
[oracle@rac12c01 ~]$ sudo /u01/app/oracle/tfa/bin/tfactl enable
[oracle@rac12c02 ~]$ sudo /u01/app/oracle/tfa/bin/tfactl enable
 
 
Проверка:

[oracle@rac12c01 ~]$ sudo /u01/app/oracle/tfa/bin/tfactl status

.------------------------------------------------------------------------------------------------.
| Host     | Status of TFA | PID   | Port | Version    | Build ID             | Inventory Status |
+----------+---------------+-------+------+------------+----------------------+------------------+
| rac12c02 | RUNNING       |   717 | 5000 | 18.1.1.0.0 | 18110020180201015951 | COMPLETE         |
| rac12c01 | RUNNING       | 16738 | 5000 | 18.1.1.0.0 | 18110020180201015951 | COMPLETE         |
'----------+---------------+-------+------+------------+----------------------+------------------' 
 
[oracle@rac12c01 ~]$