quinta-feira, 2 de junho de 2016

Conhecendo o mundo do tal do ODA - OAKCLI I

Olá jovens!!

Como estão? Espero que estejam bem.

A algum tempo comecei a administrar um ambiente ODA (X4-2). Ambiente bacana de se trabalhar.

Com o tempo, fui anotando algumas verificações feitas no ODA através do OAKCLI.

Seguindo o que eu acho (e se eu acho, é um achismo meu.. então pode estar errado ahahahahah) o Oracle cada vez mais quer fornecer ferramentas para facilitar o dia a dia de quem gosta de uma linha de comando. 

Assim como o ADRCI, essa é uma ferramenta de linha de comando que auxilia na realização de várias tarefas no ODA.

Hoje vou passar aqui algumas opções de verificação e validações de componentes.

Vocês verão no help que ainda podemos fazer deploy, upgrade, update, etc. Mas esse não é o foco.

Então, chega de embromation e vamos lá ao que interessa.

O OAKCLI deve ser executado como usuário root.

su -
cd /opt/oracle/oak/bin/

Claro, vamos dar uma olhada no Help primeiro:


     [root@zema02 bin]# ./oakcli -h
Usage:  oakcli show       - show disk, diskgroup, expander, controller, 
                                    server, processor,  memory, power, cooling, 
                                    network, enclosure, storage, version,
                                    dbhomes, databases, db_config_params, 
                                    core_config_key, env_hw, asr
oakcli apply      - applies the core_config_key
oakcli locate     - locates a disk
oakcli deploy     - deploys the Database Appliance
oakcli update     - updates the Database Appliance
oakcli validate   - validates the Database Appliance
oakcli manage     - manages the oak repository, diagcollect e.t.c
  oakcli unpack     - unpack the given package to oak repository
oakcli copy       - copies the deployment config file
oakcli upgrade    - upgrades database
oakcli stordiag   - run storage diagnostic tool on both node
oakcli test       - test asr
oakcli orachk     - performs configuration settings check on ODA
oakcli configure  - configures the network or asr
oakcli create     - creates database,dbhome,db_config_params file
oakcli delete     - deletes database,dbhome,db_config_params file

Podemos também verificar o help por hierarquia.


      [root@zema02 bin]# oakcli show -h
Usage:
    oakcli show {disk|diskgroup|expander|controller|server|processor|
                 memory|power|cooling|network|enclosure|storage|
                 core_config_key|version|dbhomes|databases|
                 db_config_params|asr|env_hw} []
where:
disk                    - About the disk
diskgroup               - Asm disk group
expander                - Expander
controller              - Controller
storage                 - All storage components
version                 - Running software version
dbhomes                 - Installed oracle database homes
databases               - Database names
db_config_params        - db_config_params file
asr                     - Asr configuration
env_hw                  - Environment and Hardware 
                                                  information
server                  - Details of server sub-system
processor               - Details of processor sub-system
memory                  - Details of memory sub-system
power                   - Details of power supply 
                                                  sub-system
cooling                 - Details of cooling sub-system
network                 - Details of network sub-system
enclosure               - Details of enclosure sub-system
core_config_key         - Core configuration

Agora é só brincar com as opções. Aqui uma lista dos discos disponíveis
  • Informações dos discos

      [root@zema02 bin]# oakcli show disk

NAME            PATH            TYPE            STATE           STATE_DETAILS
e0_pd_00        /dev/sda        HDD             ONLINE          Good
e0_pd_01        /dev/sdb        HDD             ONLINE          Good
e0_pd_02        /dev/sdaa       HDD             ONLINE          Good
e0_pd_03        /dev/sdab       HDD             ONLINE          Good
e0_pd_04        /dev/sdac       HDD             ONLINE          Good
e0_pd_05        /dev/sdad       HDD             ONLINE          Good
e0_pd_06        /dev/sdae       HDD             ONLINE          Good
e0_pd_07        /dev/sdaf       HDD             ONLINE          Good
e0_pd_08        /dev/sdag       HDD             ONLINE          Good
e0_pd_09        /dev/sdah       HDD             ONLINE          Good
e0_pd_10        /dev/sdai       HDD             ONLINE          Good
e0_pd_11        /dev/sdaj       HDD             ONLINE          Good
e0_pd_12        /dev/sdak       HDD             ONLINE          Good
e0_pd_13        /dev/sdal       HDD             ONLINE          Good
e0_pd_14        /dev/sdam       HDD             ONLINE          Good
e0_pd_15        /dev/sdan       HDD             ONLINE          Good
e0_pd_16        /dev/sdao       HDD             ONLINE          Good
e0_pd_17        /dev/sdap       HDD             ONLINE          Good
e0_pd_18        /dev/sdaq       HDD             ONLINE          Good
e0_pd_19        /dev/sdar       HDD             ONLINE          Good
e0_pd_20        /dev/sdas       SSD             ONLINE          Good
e0_pd_21        /dev/sdat       SSD             ONLINE          Good
e0_pd_22        /dev/sdau       SSD             ONLINE          Good
e0_pd_23        /dev/sdav       SSD             ONLINE          Good

  • Informações dos diskgroups criados

     [root@zema02 bin]# oakcli show diskgroup

DiskGroups
----------
DATA
RECO
REDO

  • Informações dos servidores

      [root@zema02 bin]# ./oakcli show server
Power State              : On
Open Problems            : 0
Model                    : ODA X4-2
Type                     : Rack Mount
Part Number              : 33144597+1+1
Serial Number            : 1446NMP00E
Primary OS               : Not Available
ILOM Address             : XXX.XX.XX.XX
ILOM MAC Address         : 00:00:X0:00:X0:X0
Description              : Oracle Database Appliance X4-2 1446NMP00E
Locator Light            : Off
Actual Power Consumption : 244 watts
Ambient Temperature      : 20.000 degree C
Open Problems Report     : System is healthy


  • Informações da versão

     [root@zema02 bin]# oakcli show version
Version
     -------
     2.10.0.0.0

  • Informações dos processadores e quantidade de core's habilitados

      [root@zema02 bin]# oakcli show processor

NAME  HEALTH HEALTH_DETAILS PART_NO. LOCATION   MODEL                         MAX_CLK_SPEED TOTAL_CORES ENABLED_CORES

CPU_0 OK     -              060E     P0 (CPU 0) Intel(R) Xeon(R) CPU E5-2697  2.700 GHZ       12          12

CPU_1 OK     -              060E     P1 (CPU 1) Intel(R) Xeon(R) CPU E5-2697  2.700 GHZ       12          12

  • Informações de energia, temperatura, etc

      [root@zema02 bin]# oakcli show power

NAME        HEALTH HEALTH_DETAILS PART_NO. SERIAL_NO.         LOCATION INPUT_POWER OUTPUT_POWER INLET_TEMP      EXHAUST_TEMP

Power_Supply_0  OK     -              7079395  000000X+0000XX00X0 PS0      Present     110 watts    30.500 degree C 35.312 degree C

Power_Supply_1  OK     -              7079395  000000X+0000XX00X0 PS1      Present     108 watts    35.750 degree C 39.375 degree C

  • Se está com a core_config_key implantada. 

     [root@zema02 bin]# oakcli show core_config_key
Optional core_config_key is not applied on this machine yet !


Importante: Se houvesse uma chave, seria mais ou menos isso:
 Host's serialnumber = 00000XX00X7 
     Configured Cores = 16


  • Informações das bases que lá estão:

     [root@zema02 bin]#  oakcli show databases

Database Name    Database Type  Database HomeName   
Database HomeLocation                       Database Version        
---------------- -------------  ----------------    
-----------------------------------------   ---------------------  
orcl              RAC            OraDb11204_home1    
/u01/app/oracle/product/11.2.0.4/dbhome_1   11.2.0.4.2(18031668,18031740)

tttt              RAC            OraDb11204_home1   
/u01/app/oracle/product/11.2.0.4/dbhome_1   11.2.0.4.2(18031668,18031740)

xxxx              RAC            OraDb11204_home1   
 /u01/app/oracle/product/11.2.0.4/dbhome_1   11.2.0.4.2(18031668,18031740)

É isso. É tranquilo. Só olhar o help e mandar bala.

O validate segue o mesmo ponto...
Vamos ver o help.

[root@zema02 ~]# oakcli validate -h

Usage:
oakcli  validate [-V | -l | -h]
oakcli  validate [-v] [-f absolute output_file_name] 
                         [-a | -d | -c check1[,check2]]

ARGUMENTS:
-v      verbose output
-f      output_file_name.The output is sent to the file 
                        instead of standard output
-a      run all checks
-d      run only default checks.
-c      check1[,check2] run specific checks
-l      list the checks and description
-V      Print the Version
-h      print help
EXAMPLES:
oakcli validate -l
oakcli validate -a
oakcli validate -c DiskCalibration
oakcli validate -c SystemComponents,NetworkComponents,asr

Uma lista com descrição do que é validado em cada teste também está lá.

[root@zema02 ~]# oakcli validate -l

Checkname -- Description
=========    ===========
*SystemComponents  -- Validate system components based on ilom sensor 
                              data readings
*OSDiskStorage     -- Validate OS disks and filesystem information
*SharedStorage     -- Validate Shared storage and multipathing 
                              information
DiskCalibration    -- Check disk performance with orion
*NetworkComponents -- Validate public and private network components
*StorageTopology   -- Validate external JBOD connectivity
asr                -- Validate asr components based on asr config 
                              file and ilom sensor data readings

* -- These checks are also performed as part of default checks

  • Podemos, por exemplo, validar a topologia do Storage

     [root@zema02 ~]# oakcli validate -c StorageTopology

It may take a while. Please wait...
INFO    : ODA Topology Verification
INFO    : Running on Node1
INFO    : Check hardware type
SUCCESS : Type of hardware found : X4-2
INFO    : Check for Environment(Bare Metal or Virtual Machine)
SUCCESS : Type of environment found : Bare Metal
INFO    : Check number of Controllers
SUCCESS : Number of Internal LSI SAS controller found : 1
SUCCESS : Number of External LSI SAS controller found : 2
INFO    : Check for Controllers correct PCIe slot address
SUCCESS : Internal LSI SAS controller   : 50:00.0
SUCCESS : External LSI SAS controller 0 : 30:00.0
SUCCESS : External LSI SAS controller 1 : 40:00.0
INFO    : Check if JBOD powered on
SUCCESS : 1JBOD : Powered-on
INFO    : Check for correct number of EBODS(2 or 4)
SUCCESS : EBOD found : 2
INFO    : Check for External Controller 0
SUCCESS : Controller connected to correct ebod number
SUCCESS : Controller port connected to correct ebod port
SUCCESS : Overall Cable check for controller 0
INFO    : Check for External Controller 1
SUCCESS : Controller connected to correct ebod number
SUCCESS : Controller port connected to correct ebod port
SUCCESS : Overall Cable check for controller 1
INFO    : Check for overall status of cable validation on Node1
SUCCESS : Overall Cable Validation on Node1
INFO    : Check Node Identification status
SUCCESS : Node Identification
SUCCESS : Node name based on cable configuration found : NODE1
INFO    : Check JBOD Nickname
SUCCESS : JBOD Nickname set correctly : Oracle Database Appliance - E0
INFO    : The details for Storage Topology Validation can also 
                  be found in log 

file=/opt/oracle/oak/log/zema02/storagetopology/StorageTopology-2015-05-14-11:13:59_59781_137.log

  • Ou as informações de network 

     [root@zema02 ~]# oakcli validate -c NetworkComponents

INFO: Doing oak network checks
RESULT:  Detected active link for interface eth0 with link speed 
                 10000Mb/s and cable type as Twinax
RESULT:  Detected active link for interface eth1 with link speed 
                 10000Mb/s and cable type as Twinax
RESULT:  Detected active link for interface eth2 with link speed 
                 1000Mb/s and cable type as Twisted Pair
RESULT:  Detected active link for interface eth3 with link speed 
                 1000Mb/s and cable type as Twisted Pair
WARNING: No Link detected for interface eth4 with cable type 
                 as Twisted Pair
WARNING: No Link detected for interface eth5 with cable type as 
                 Twisted Pair

INFO: Checking bonding interface status

RESULT:  Bond interface bond0 is up configured in mode:load 
                 balancing (round-robin) with current active interface as
 Slave1 interface is eth2 with status:up Link fail count=0 
                 Maccaddr:00:10:e0:62:a5:c2
 
                 Slave2 interface is eth3 with status:up Link fail count=0 
                 Maccaddr:00:10:e0:62:a5:c3

WARNING: Bond interface bond1 has the following current status:down

RESULT:  Bond interface bond1 is down configured in mode:
                 fault-tolerance (active-backup) with current active 
                 interface as None
     Slave1 interface is eth4 with status:down Link fail count=0 
                 Maccaddr:00:10:e0:62:a5:c4

 Slave2 interface is eth5 with status:down Link fail count=0 
                 Maccaddr:00:10:e0:62:a5:c5

SUCCESS: eth0 is running 192.168.16.25
SUCCESS: eth1 is running 192.168.17.25

E assim podemos validar várias informações.

É isso jovens. Espero ter ajudado quem, como eu, está começando com o ODA.

That's it my friends...

Mario

Nenhum comentário:

Postar um comentário

Isso te ajudou? Comente...

Postagem em destaque

[ORACLE] Batch change EDITIONABLE property.

Hello everyone. Hope you're doing well! Today, I have a simple case.   A test database had many database objects with the EDITIONABLE pr...