Database초보우낙

오라클 엑사 데이터 주요 명령어 총정리 본문

오라클 엑사

오라클 엑사 데이터 주요 명령어 총정리

오운학 2024. 4. 8. 13:43

▣ 1. 전체 시스템 구성도

Service 네트워크와 Management 네트워크는 데이터베이스 서버, 스토리지 서버,

Infiniband Network Switch, CISCO Ethernet Switch, PDU 및 1G와의 네트워크로 아래와 같이 연결되어 있습니다.

모니터링 utill


SQL*Plus
CRSCTL
SRVCTL
DBMCLI

ASMCMD
SQL*Plus

ibstatus

CellCli
Dcli

 2. 구성도 상의 모니터링 툴

데이터베이스 서버: SQL*Plus, CRSCTL, SRVCTL, Dbmcli(Image 12.1.2.1.0 이상)
ASM : ASMCMD , SQL*Plus
스토리지 서버: Cellcli , Dcli

 3. 모니터링 관련 툴 설명

1)     SQL*Plus

스토리지 서버가 데이터베이스 서버에서 가용해 지면 그 외의 동작은 전통적인 Oracle RAC 데이터베이스와 유사합니다. 따라서 기존 데이터베이스에서 쓰던 방식 그대로 SQL*Plus 를 통해서 데이터베이스를 모니터링 및 관리할 수 있습니다.

2)     SRVCTL

Oracle 데이터베이스 11gR2/12c RAC Cluster 를 관리하는 command line interface 툴 입니다. Cluster 리소스에 대한 start/stop 과 상태 체크를 할 수 있습니다.

3)     CRSCTL

Oracle 데이터베이스 11gR2/12c RAC Cluster 를 관리하는 또 다른 툴 입니다.

4)     ASMCMD

Diskgroup 이나 Backup 등과 같은 ASM 자원에 대한 관리를 할 수 있는 command line interface 툴 입니다.

5)    Idstatus

Infiniband 장치에 대한 상태를 점검할 수 있는 툴 입니다.

6)    Cellcli

Exadata 스토리지 서버를 관리하기 위한 command line 툴 입니다. 스토리지 서버와 관련된 명령은 cellcli를 통해서 수행됩니다.

7)    Dbmcli

Exadata 데이터베이스 서버를 관리하기 위한 command line 툴 입니다. 데이터베이스 서버를 관리 및 모니터링 하기 위한 기본적인 명령어들은 dbmcli를 통해서 수행 가능 합니다. 단, Image 12.1.2.1.0 이상부터 지원

 

 4. 오라클 소프트웨어 구성도

 5. 데이터베이스 서버 소프트웨어 설명

1) OS: Solaris 와 Linux 중 선택하여 사용 가능 하나 Solaris 버전의 경우 12.1.1.1.1 버전까지만 지원 합니다.
2) 버전: Oracle 데이터베이스 11gR2/12c 버전을 사용하며 Exadata 만의 특별한 버전은 없습니다.
3) ASM (Automatic Storage Management): 데이터베이스 서버 소프트웨어의 중요 구성요소로 파일 시스템 및 볼륨의 관리 기능을 제공 합니다
4) DBRM (Database Resource Manager): DBRM과 IORM 은 통합되어 자원관리에 사용 되며 시스템 자원에 대한 우선순위에 따라 자원을 할당할 수 있습니다.
5) Livcell : Oracle 데이터베이스가 스토리지 서버와 통신하는데 사용하는 라이브러리입니다.
6) DBmcli : 데이터베이스 서버 관리를 위한 Command Line Interface 입니다.
7) MS(Managment Server) :  DB서버 모니터링 및 Configuration을 관리 합니다.
8) RS(Restart Server) : MS 서비스의 시작, 종료, 모니터링을 제공 합니다.

 

 6-1. Infiniband Network 관련 소프트웨어 설명

1)   iDB  : 스토리지 서버와 데이터베이스 서버간의 통신을 하는데 사용하는 프로토콜 입니다.
2)   RDS(Reliable Datagram Sockets)  : iDB 프로토콜의 근간이 되는 프로토콜로 CPU 사용에 대한 장점을 제공한다.

 

 

6-2. 스토리지 서버 소프트웨어 설명

1) OS: Exadata 스토리지 서버의 운영 시스템은 오라클 리눅스 X86_64 만 제공 합니다.
2) 버전: 12.1.2.1.0 (X5 기본 설치 버전)
3) Cellsrv  : 데이터베이스 서버의 I/O 요청을 처리하는 멀티스레드 프로그램 입니다.
4) Cellcli  : 스토리지 서버 관리를 위한 Command Line Interface 입니다.
5) MS(Management Server) : Cellsrv 와 Cellcli 사이의 인터페이스를 제공하는 관리 프로그램입니다.
6)  RS(Restart Server) : Cellsrv 와 MS 서비스의 시작, 종료, 모니터링을 제공 합니다.
7)  IORM : DBRM 과 통합 되어 관리자가 정의한 우선순위에 따라 I/O 를 할당할 수 있습니다.

 

엑사는 스토리지 서버와 인피니벤드와 데이터베이스 서버 이렇게 3가지로 구성되어있고 스토리지 서버에서 데이터 베이스 서버로 데이터 빠르게 전송하기 위해서 오라클에 자체적으로 만든 "스마트 스캔" 기술을 통해 엑사 데이터 베이스 서버를 최적화했다.

 

 

▣ 7.오라클 소프트웨어 관련 위치정보 및 환경변수 구성 점검

리눅스 시스템의 전반적인 여유공간이 얼마나 있는지 점검

[root@krxa01 ~]# df –h       
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VGExaDb-LVDbSys1
                       30G   23G  5.4G  81% /        à Root 파티션, 리눅스 S/W 설치공간
/dev/sda1             496M   38M  433M   8% /boot    à 리눅스 부팅을 위한 S/W 설치공간
/dev/mapper/VGExaDb-LVDbOra1
                       99G   12G   83G  13% /u01     à 오라클 11gR2 S/W 설치 디렉토리
tmpfs                 252G  3.9M  252G   1% /dev/shm à Swap 영역

df -h 명령어의 결과를 보면, 전반적으로 문제는 없는 것으로 보인다. 각 파일 시스템의 사용률을 보면 사용 가능한 공간이 충분히 남아 있으며, 특히 중요한 루트 파일 시스템(/)의 경우에도 19%의 여유 공간이 남아 있다.

그러나 최적의 성능을 위해, 주기적으로 파일 시스템의 사용량을 모니터링하고 필요에 따라 추가적인 공간을 확보하는 것이 좋다. 특히 / 파일 시스템은 중요한 시스템 파일과 프로그램이 저장되는 곳이므로, 이 공간이 부족하면 시스템 성능에 영향을 미칠 수 있다.

 

8. 오라클 소프트웨어 관련 위치정보 및 환경변수 구성 점검

아래의 예시와 같이 profile에 Grid Infrastructure 및 Oracle Home 이외에 log 발생 위치 등을 alias로 지정하여 운영 시 편리하게 관리 및 접근 가능합니다.

alias adump='cd /u01/app/oracle/diag/asm/+asm/+ASM${NODE}/trace'
alias bdump='cd /u01/app/oracle/diag/rdbms/${DBNAME}/$ORACLE_SID/trace'
alias crsstat='crsctl stat res -t'
alias ll='ls -altr'
alias ob='cd $ORACLE_BASE'
alias oh='cd $ORACLE_HOME'
alias pat='cd /u01/stage/patch'
alias sp='sqlplus / as sysdba'
alias t_asmlog='tail -f $ORACLE_BASE/diag/asm/+asm/+ASM{NODE}/trace/alert_+ASM{NODE}.log'
alias t_crsdlog='tail -f $GRID_HOME/log/`hostname -a`/crsd/crsd.log'
alias t_cssdlog='tail -f $GRID_HOME/log/`hostname -a`/cssd/ocssd.log'
alias t_dblog='tail -f $ORACLE_BASE/diag/rdbms/${DBNAME}/$ORACLE_SID/trace/alert_${ORACLE_SID}.log'
alias v_asmlog='vi $ORACLE_BASE/diag/asm/+asm/+ASM1/trace/alert_+ASM{NODE}.log'
alias v_crsdlog='vi $GRID_HOME/log/`hostname -a`/crsd/crsd.log'
alias v_cssdlog='vi $GRID_HOME/log/`hostname -a`/cssd/ocssd.log'
alias v_dblog='vi -f $ORACLE_BASE/diag/rdbms/${DBNAME}/$ORACLE_SID/trace/alert_${ORACLE_SID}.log'

 

마찬가지로 profile에 필요한 환경변수를 설정하여 운영 시 편리하게 관리 및 접근 가능합니다.

export LANG=ko_KR.euckr
# User specific environment and startup programs
export ORACLE_BASE=/u01/app/oracle
export ORA_CRS_HOME=/u01/app/11.2.0.4/grid
export GRID_HOME=/u01/app/11.2.0.4/grid
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/dbhome_1
export NLS_LANG=American_America.KO16KSC5601
 
export ORACLE_UNQNAME=KRX
export NLS_DATE_FORMAT=yyyymmdd
export ORAENV_ASK=NO
NODE=`hostname -a | awk 'BEGIN { FS="" } { print $NF }'`
export ORACLE_SID=${ORACLE_UNQNAME}${NODE}
 
#. oraenv
DBNAME=`echo $ORACLE_UNQNAME|tr '[A-Z]' '[a-z]'`
 
# Each RAC node must have a unique ORACLE_SID. (i.e. orcl1, orcl2,...)
export EDITOR=vim
export ORAENV_ASK=YES
export CLASSPATH=$ORACLE_HOME/jdbc/lib/ojdbc5.jar:$ORACLE_HOME/jdbc/lib/ojdbc5_g.jar:.
export ORACLE_PATH=/u01/app/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export PATH=$PATH:$GI_HOME/bin:$ORACLE_HOME/jdk/bin:$ORACLE_HOME/bin
 
export PATH=.:${PATH}:/bin:/usr/bin:/sbin:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$GRID_HOME/bin
 
export PATH=${PATH}:/opt/oracle.SupportTools:/opt/oracle.SupportTools/ibdiagtools:/opt/oracle.SupportTools/onecommand
export PATH=${PATH}:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/kerberos/bin
export PATH=${PATH}:$ORACLE_HOME/lib
export PS1='\u@\h:$PWD> '
 
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GRID_HOME/lib:/lib:/usr/lib:/usr/local/lib
 
set -o vi

 

 

9. DBMCLI를 이용한 alert 로그 확인

DB버에서는 기본적으로 ADR, Hardware, Software, Metric 기준으로 지정된 threshold에 따라 alert을 발생시키며, 추가로 생성하거나 threshold 를 상황에 맞게 변경하여 관리할 수 있습니다.

(ADR : 오라클을 진단하는 기본 툴)

 

Alert 은 warning, critical, clear, info 의 4가지 레벨로 분류되어 그 종류와 중요도에 따라 SNMP와 연계한 Notification 구성도 가능합니다. EM(Enterprise Manager) 를 활용해서 Metric 을 모니터링을 하는 경우, 구성 변경이나 모니터링 interval 을 고려하여 undeliver 된 alert 로그를 때때로 확인하고 관리해야 합니다.

(위기, 경고, 해결, 극복...?)

 

DBMCLI를 이용하여 DB서버에서 발생한 모든 alert 로그를 확인합니다.

[root@krxadb01 ~]# dbmcli

DBMCLI: Release  - Production on Sun Feb 01 21:03:40 KST 2015 Copyright (c) 2007, 2014, Oracle.  All rights reserved.DBMCLI> 

DBMCLI> list alerthistory        

  1_1      2015-01-20T12:11:53-08:00     critical "A power supply component is suspected of causing a fault with 
  a 100 certainty.  Component Name : /SYS/PS0  Fault class    : fault.chassis.power.ext-fail  Fault message 
   : http://support.oracle.com/msg/SPX86A-8003-EL"          1_2      2015-01-20T12:12:24-08:00     clear    
   "A power supply component fault has been cleared.  Component Name       : /SYS/PS0  Trap Additional Info : 
   fault.chassis.power.ext-fail"          2_1      2015-01-20T12:16:49-08:00     critical "A power supply 
   component is suspected of causing a fault with a 100 certainty.  Component Name : /SYS/PS1  Fault class   
    : fault.chassis.power.ext-fail  Fault message  : http://support.oracle.com/msg/SPX86A-8003-EL"          
    2_2      2015-01-20T12:16:55-08:00     clear    "A power supply component fault has been cleared. 
     Component Name       : /SYS/PS1  Trap Additional Info : fault.chassis.power.ext-fail"
     
DBMCLI>

 

alert 의 정의와 관련 metric 정보를 조회하여 문제 해결의 참고 정보로 활용할 수 있다

DBMCLI> list alertdefinition attributes name, metricname, alertsource, description where alertshortname='ADR'

         ADRAlert                "Automatic Diagnostic Repository"       "Incident Alert"

"list alertdefinition attributes name, metricname, alertsource, description where alertshortname='ADR'" 명령어는 'ADR'라는 짧은 이름(shortname)을 가진 경고 정의(alertdefinition)의 속성들을 나열하는 역할을 합니다. 이 명령어는 경고 정의의 이름, 메트릭 이름, 경고 소스, 설명 등의 속성을 표시합니다.

 

또한, 중요한 alert 을 조회하기 위해 filtering 할 수 있습니다.

DBMCLI> list alerthistory where severity = 'clear'

          1_2     2015-01-20T12:12:24-08:00 clear   "A power supply component fault has been cleared.  Component Name       : /SYS/PS0  Trap Additional Info : fault.chassis.power.ext-fail"
          2_2     2015-01-20T12:16:55-08:00 clear   "A power supply component fault has been cleared.  Component Name       : /SYS/PS1  Trap Additional Info : fault.chassis.power.ext-fail"

"DBMCLI> list alerthistory where severity = 'clear'" 명령어는 'clear'라는 심각도(severity)를 가진 모든 알림 이력(alerthistory)를 나열하는 역할을 합니다. 이 명령어는 기본적으로 문제가 해결된(clear) 알림 이력만을 표시합니다.

 

문제!!. 데이터 베이스에 경고 메세지를 확인하는데 경고 심각도가 critical인 경고 메세지를 조회하세요

list alerthistory where secerity='critical'

 

 

엑사 데이터 점검표

서버 명령어 점검결과
데이터 베이스 서버 DBMCLI > list alerthistory where secerity='critical' 정상
  DBMCLI > list alerthistory where secerity='warning' 정상
  DBMCLI > list dbserer detail 정상
  DBMCLI> list metriccurrent attributes name, objectType, metricObjectName, metricValue, alertState
정상
  DBMCLI> list metriccurrent attributes name, metricObjectName, metricValue, alertState where alertState!='normal' 정상
  DBMCLI> list physicaldisk
정상
인피니 밴드 DBMCLI> list ibport detail 정상
스토리지 서버 CellCLI> list alerthistory 정상
  CellCLI> list alerthistory 2_1 detail 문제있음
  CellCLI> list cell detail 정상
고객사 담당자 사인    

▣ 10. DBMCLI를 이용한 DB서버 점검

💡   DBMCLI를 이용하여 대상 DB서버의 상태를 확인합니다.

DBMCLI> list dbserver detail

          name:                      krxacel01
          bbuStatus:                 normal
          coreCount:                 2
          cpuCount:                  4
          diagHistoryDays:           7
          fanCount:                  16/16
          fanStatus:                 normal
          id:                        1438NM103T
          interconnectCount:         2
          kernelVersion:             2.6.39-400.246.1.el5uek
          locatorLEDStatus:          off
          makeModel:                 Oracle Corporation ORACLE SERVER X5-2
          metricHistoryDays:         7
          msVersion:                 OSS_12.1.2.1.1_LINUX.X64_150129
          pendingCoreCount:          18
          powerCount:                2/2
          powerStatus:               normal
          releaseImageStatus:       success
          releaseVersion:            12.1.2.1.1.150129
          releaseTrackingBug:       20240049
          status:                    online
          temperatureReading:       29.0
          temperatureStatus:         normal
          upTime:                    2 days, 14:29
          msStatus:                  running
          rsStatus:                  running

 

"list dbserver detail" 명령어는 DB서버의 상세 정보를 조회하는 명령어입니다. 이 명령어의 결과는 다음과 같이 해석할 수 있습니다:

  • name: 서버의 이름입니다.
  • bbuStatus: 배터리 백업 유닛(BBU)의 상태입니다.
  • coreCount: 사용 가능한 코어의 수입니다.
  • cpuCount: 사용 가능한 CPU의 수입니다.
  • diagHistoryDays: 진단 기록이 저장된 일수입니다.
  • fanCount: 팬의 개수와 작동 중인 팬의 수입니다.
  • fanStatus: 팬의 상태입니다.
  • id: 서버의 ID입니다.
  • interconnectCount: 인터커넥트의 수입니다.
  • kernelVersion: 커널 버전입니다.
  • locatorLEDStatus: 위치 지정 LED의 상태입니다.
  • makeModel: 제조사와 모델입니다.
  • metricHistoryDays: 메트릭 기록이 저장된 일수입니다.
  • msVersion: 관리 서버(MS) 버전입니다.
  • pendingCoreCount: 대기 중인 코어의 수입니다.
  • powerCount: 전원 공급 장치의 개수와 작동 중인 장치의 수입니다.
  • powerStatus: 전원의 상태입니다.
  • releaseImageStatus: 릴리즈 이미지의 상태입니다.
  • releaseVersion: 릴리즈 버전입니다.
  • releaseTrackingBug: 릴리즈 추적 버그입니다.
  • status: 서버의 상태입니다.
  • temperatureReading: 온도 읽기 값입니다.
  • temperatureStatus: 온도 상태입니다.
  • upTime: 가동 시간입니다.
  • msStatus: 관리 서버(MS)의 상태입니다.
  • rsStatus: 리소스 관리자(RS)의 상태입니다.

 

 

 

AI에게 질문

-> locatorLEDStatus: off 가 off 되어도 문제가 없는거야 ?

네, locatorLEDStatus: off는 서버의 위치 지정 LED가 꺼져 있는 것을 의미합니다. 이는 서버의 위치를 식별하는 데 사용되는 LED 신호등이 현재 꺼져 있음을 나타내는 것일 뿐, 서버의 성능이나 기능에는 영향을 미치지 않습니다. 따라서, locatorLEDStatus가 off라고 해서 서버 운영에 문제가 생기는 것은 아닙니다.

 

 

💡   DBMCLI를 이용하여 다른 방법으로 서버의 상태 정보를 확인할 수 있다

DBMCLI> list metriccurrent attributes name, objectType, metricObjectName, metricValue, alertState

          DS_BBU_TEMP                DBSERVER                   krxacel01        34.0 C            normal
          DS_CPUT                    DBSERVER                   krxacel01        25.7 %            normal
          DS_CPUT_MS                 DBSERVER                   krxacel01        0.1 %             normal
          DS_FANS                    DBSERVER                   krxacel01        16                normal
          DS_FSUT                    DBSERVER_FILESYSTEM       /                          77 %                  normal
          DS_FSUT                    DBSERVER_FILESYSTEM       /EXAVMIMAGES               7 %                   normal
          DS_FSUT                    DBSERVER_FILESYSTEM       /boot                      13 %                  normal
          DS_FSUT                    DBSERVER_FILESYSTEM       /var/lib/xenstored        1 %                   normal
          DS_MEMUT                   DBSERVER                   krxacel01        88 %              normal
          DS_MEMUT_MS                DBSERVER                   krxacel01        4.9 %             normal
          DS_RUNQ                    DBSERVER                   krxacel01        0.4               normal
          DS_SWAP_IN_BY_SEC          DBSERVER                   krxacel01        0.0 KB/sec        normal
          DS_SWAP_OUT_BY_SEC        DBSERVER                   krxacel01        0.0 KB/sec        normal
          DS_SWAP_USAGE              DBSERVER                   krxacel01        0 %               normal
          DS_TEMP                    DBSERVER                   krxacel01        29.0 C            normal
          DS_VIRTMEM_MS              DBSERVER                   krxacel01        1,168 MB          normal
          N_HCA_MB_RCV_SEC           DBSERVER                   krxacel01        0.017 MB/sec     normal
          N_HCA_MB_TRANS_SEC        DBSERVER                   krxacel01        0.014 MB/sec     normal
          N_IB_MB_RCV_SEC            IBPORT                     HCA-1:1                    0.010 MB/sec         normal
          N_IB_MB_RCV_SEC            IBPORT                     HCA-1:2                    0.007 MB/sec         normal
          N_IB_MB_TRANS_SEC          IBPORT                     HCA-1:1                    0.008 MB/sec         normal
          N_IB_MB_TRANS_SEC          IBPORT                     HCA-1:2                    0.006 MB/sec         normal
          N_IB_UTIL_RCV              IBPORT                     HCA-1:1                    0.0 %                 normal
          N_IB_UTIL_RCV              IBPORT                     HCA-1:2                    0.0 %                 normal
          N_IB_UTIL_TRANS            IBPORT                     HCA-1:1                    0.0 %                 normal
          N_IB_UTIL_TRANS            IBPORT                     HCA-1:2                    0.0 %                 normal
          N_NIC_KB_RCV_SEC           DBSERVER                   krxacel01        3.0 KB/sec        normal
          N_NIC_KB_TRANS_SEC        DBSERVER                   krxacel01        0.2 KB/sec        normal
 
DBMCLI>
DBMCLI> describe metricdefinition
        name
        description
        metricType
        objectType
        persistencePolicy
        unit
 
DBMCLI> list metricdefinition attributes name, metrictype, objecttype, unit, description where name=' DS_SWAP_USAGE'
        DS_SWAP_USAGE   Instantaneous  DBSERVER    %           "Percentage of swap used"
 
DBMCLI>

"list metriccurrent attributes name, objectType, metricObjectName, metricValue, alertState" 명령어는 DB서버의 현재 메트릭 값을 나열하는 역할을 합니다. 이 명령어의 결과는 메트릭의 이름, 객체 유형, 메트릭 객체 이름, 메트릭 값, 경고 상태 등의 정보를 제공합니다.

결과를 확인해보면, 모든 메트릭의 경고 상태가 'normal'로 나타나고 있습니다. 이는 모든 메트릭이 정상 범위 내에 있음을 의미합니다. 즉, 메트릭의 값이 정상 범위를 벗어나 경고 상태가 발생하지 않고 있습니다.

따라서, 이 결과를 바탕으로 볼 때, 현재 DB서버의 상태는 정상이라고 판단할 수 있습니다. 어떠한 문제도 발견되지 않았습니다.

 

서버의 작동 온도는 다양한 요인에 따라 달라질 수 있지만, 일반적으로 서버실의 온도는 20℃ ~ 25℃를 유지하는 것이 권장됩니다. 이보다 높은 온도에서도 서버가 안정적으로 작동할 수 있으나, 40℃를 넘어가면서 서버 부품에 과열이 발생할 가능성이 높아집니다. 따라서, 서버의 온도가 40℃를 초과하게 되면, 적절한 조치를 취해야 합니다. 이는 서버 부품의 수명을 단축시키거나, 최악의 경우 시스템 장애로 이어질 수 있기 때문입니다.

 

💡   alertState 가 ‘normal’ 이 아닌 컴포넌트가 없는 것을 확인하는 명령어

DBMCLI> list metriccurrent attributes name, metricObjectName, metricValue, alertState where  alertState!='normal'

 

위의 결과에 아무것도 안뜨면 정상

 

 

💡 DBMCLI를 실행시켜 physical 디스크 목록을 조회합니다.

DBMCLI>   list physical disk
          252:0   BR2L2S  normal
          252:1   BR31GS  normal
          252:2   BPD1VS  normal
          252:3   BR31BS  normal
 
DBMCLI>

 

💡 특정 physical disk 에 대해서 상세한 내용을 조회합니다.

DBMCLI> list physicaldisk BR2L2S detail
          name:                      252:0
          deviceId:                  8
          diskType:                  HardDisk
          enclosureDeviceId:         252
          errMediaCount:             0
          errOtherCount:             0
          makeModel:                 "HITACHI H109060SESUN600G"
          physicalFirmware:          A690
          physicalInsertTime:       2015-01-08T21:25:15-08:00
          physicalInterface:         sas
          physicalSerial:            BR2L2S
          physicalSize:              558.9120712280273G
          slotNumber:                0
          status:                    normal
 
DBMCLI>

 

 

 


이제부터는 인피니밴드쪽에 문제가 있는지 없는지를 확인

▣ 11. DBMCLI를 이용한 IB Network 에러 점검

IB Network 에러는 ibport 오브젝트를 조회하여 링크업, 포트 상태 및 에러 카운트를 주기적으로 모니터링 하여 linkup 및 active 상태가 아니거나 error 카운트가 급격히 증가하는 경우 IB Network 점검이 필요합니다.

💡 다음과 같이 list ibport detail 명령어로 IB network 상태를 조회 합니다.

DBMCLI> list ibport detail
          name:                      HCA-1:1
          dataRate:                  "40 Gbps"
          hcaFWVersion:              2.11.1280
          id:                        0x0010e00001486d69
          lid:                       14
          linkDowned:                0
          linkIntegrityErrs:         0
          linkRecovers:              0
          physLinkState:             LinkUp
          portNumber:                1
          rcvConstraintErrs:         0
          rcvData:                   833848828
          rcvErrs:                   0
          rcvRemotePhysErrs:         0
          status:                    Active
          symbolErrs:                0
          vl15Dropped:               0
          xmtConstraintErrs:         0
          xmtData:                   673508721
          xmtDiscards:               0
 
          name:                      HCA-1:2
          dataRate:                  "40 Gbps"
          hcaFWVersion:              2.11.1280
          id:                        0x0010e00001486d6a
          lid:                       15
          linkDowned:                0
          linkIntegrityErrs:         0
          linkRecovers:              0
          physLinkState:             LinkUp
          portNumber:                2
          rcvConstraintErrs:         0
          rcvData:                   642645473
          rcvErrs:                   0
          rcvRemotePhysErrs:         0
          status:                    Active
          symbolErrs:                0
          vl15Dropped:               0
          xmtConstraintErrs:         0
          xmtData:                   534204895
          xmtDiscards:               0
 
DBMCLI>

 

 

 

▣ 12.시스템 자원 사용률 모니터링 및 점검

 

top 명령어는 실시간으로 시스템 상태 및 프로세스의 성능을 모니터링하는 도구

top -> 메모리, cpu 사용랴으 실행중인 프로세스 등의 정보


sar 명령어는 시스템 활동 보고서를 생성하는 데 사용된다.
sar.sh -> CPU 사용, 메모리 사용, 디스크 활동 등의 성능 통계를 수집

 

sar와 top 공통점
모두 리눅스 및 유닉스 시스템에서 시스템 리소스 및 프로세스 정보를 모니터링하는 도구라는 것.

 

sar와 top의 주요 차이:
목적:

sar: 시스템의 리소스 사용량을 통계적으로 분석하여 기록합니다. 특정 간격으로 데이터를 수집하고, 그 데이터를 기반으로 성능 튜닝이나 문제 해결에 활용됩니다.

 

top: 현재 실행 중인 프로세스 및 시스템 리소스 사용량을 실시간으로 모니터링합니다. 주로 실시간 상황 파악 및 문제 해결에 사용됩니다.

 

💡시스템에서 메모리와 cpu 사용률이 높은 프로세서 찾기

cpu와 메모리를 90% 넘게 사용하는 프로세서로 인해서 성능이 떨어진다

top으로 그 로세서를 찾아서 kill 시키거나 화면을 캡쳐해서 관련 프로세서의 벤더사에 메일로 알려줘야한다

# top

 

💡디스크 사용량을 확인 <root 계정>

# sar.sh 5 10000

dba들이 이 명령어를 사용하는때는 데이터 이행을 하거나 db에 중요한 작업을 수시간 수행해야할 때 작업이 순조롭게 진행되고 있는지 확인할 때 유용한 명령어.

 

💡시스템 이벤트 로그 확인 명령어

[root@krxacel01 ~]# ipmitool sel list |more  

1 | 09/05/2011 | 02:44:36 | System Boot Initiated | System Restart | Asserted   2 | 09/05/2011 | 02:44:37 | System Boot Initiated | Initiated by hard reset | Asserted   3 | 09/05/2011 | 02:44:37 | System Firmware Progress | Memory initialization | Asserted   4 | 09/05/2011 | 02:44:37 | System Firmware Progress | Primary CPU initialization | Asserted   5 | 09/05/2011 | 02:44:39 | System Boot Initiated | Initiated by warm reset | Asserted   6 | 09/05/2011 | 02:44:40 | System Firmware Progress | Memory initialization | Asserted   7 | 09/05/2011 | 02:44:40 | System Firmware Progress | Primary CPU initialization | Asserted   8 | 09/05/2011 | 02:44:41 | System Boot Initiated | Initiated by warm reset | Asserted   9 | 09/05/2011 | 02:44:41 | System Firmware Progress | Memory initialization | Asserted   a | 09/05/2011 | 02:44:41 | System Firmware Progress | Primary CPU initialization | Asserted   b | 09/05/2011 | 02:44:42 | System ACPI Power State #0x26 | S0/G0: working | Asserted   c | 09/05/2011 | 02:44:42 | System ACPI Power State #0x26 | S5/G2: soft-off | Deasserted   d | 09/05/2011 | 02:44:47 | Entity Presence #0x58 | Device Present   e | 09/05/2011 | 02:44:48 | Entity Presence #0x55 | Device Present   f | 09/05/2011 | 02:44:49 | Entity Presence #0x57 | Device Present  10 | 09/05/2011 | 02:44:51 | Entity Presence #0x54 | Device Present  11 | 09/05/2011 | 02:45:07 | System Firmware Progress | Management controller initialization |Asserted-- 이하 생략 --

[root@krxacel01 ~]# ipmitool sel list | grep ECC | cut -f1 -d : | sort -u
[root@krxacel01 ~]#

 


▣ 13. 스토리지 서버 상태 확인 명령어

💡CellCLI를 이용한 alert 로그 확인 4.6.1 CellCLI 명령어 사용

cellcli 유틸리티는 Exadata의 Cell을 관리하기 위한 command-line 관리 툴로서, 각각의 스토리지 서버에서 MS 프로세스와 통신하여 Cell 의 기동과 정지, Cell 설정 정보 관리 및 Cell 환경 내의 오브젝트 들을 관리할 수 있습니다. 스토리지 서버에서 각각 수행되어야 하며, dcli 유틸리티를 사용하면 원격으로 여러 스토리지 서버에서 동시에 명령을 수행할 수 있습니다.

 

cellcli 유틸리티는 다음과 같은 구조를 가지고 있고, 내용은 다음과 같습니다.

 

 

 

💡 스토리지 서버에 경고 메세지 확인하는 명령어

[root@krxacl01 ~]# cellcliCellCLI:

Release 12.1.2.1.0 - Production on Sun Feb 09 18:42:11 KST 2014 Copyright (c) 2007, 2013, Oracle.  All rights reserved.Cell Efficiency Ratio: 320  CellCLI>

 CellCLI> list  alerthistory 

   1_1     2013-03-15T05:46:49+09:00       critical        "A power supply component is suspected of causing a fault.  Component Name : /SYS/PS1  Fault class    : fault.chassis.power.ext-fail  Fault message  : http://www.sun.com/msg/SPX86-8003-73"         1_2     2013-03-28T18:02:50+09:00       clear           "A power supply component fault has been cleared.   Component Name : /SYS/PS1"         2_1     2013-03-28T17:54:04+09:00       critical        "Cell configuration check discovered the following problems:   Check Exadata configuration via ipconf utility Verifying of Exadata configuration file /opt/oracle.cellos/cell.conf Error. Exadata configuration file not found /opt/oracle.cellos/cell.conf [INFO] The ipconf check may generate a failure for temporary inability to reach NTP or DNS server. You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] As root user run /usr/local/bin/ipconf -verify -semantic to verify consistent network configurations."         2_2     2013-03-28T18:19:23+09:00       clear           "The cell configuration check was successful."         3       2013-03-28T17:59:40+09:00       critical        "RS-7445 [Serv MS hang detected] [It will be restarted] [] [] [] [] [] [] [] [] [] []"         4       2013-03-28T18:14:23+09:00       critical        "RS-7445 [Required IP parameters missing] [Check cellinit.ora] [] [] [] [] [] [] [] [] [] []"         5_1     2013-03-14T13:46:49+09:00       critical        "A power supply component is suspected of causing a fault.  Component Name : /SYS/PS1  Fault class    : fault.chassis.power.ext-fail  Fault message  : http://www.sun.com/msg/SPX86-8003-73"         6_1     2013-04-02T10:39:26+09:00       critical        "Cell configuration check discovered the following problems:   Check Exadata configuration via ipconf utility Verifying of Exadata configuration file /opt/oracle.cellos/cell.conf Checking NTP server on 10.10.10.22                                                              : FAILED Error. Overall status of verification of Exadata configuration file: FAILED [INFO] The ipconf check may generate a failure for temporary inability to reach NTP or DNS server. You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] As root user run /usr/local/bin/ipconf -verify -semantic to verify consistent network configurations."         6_2     2013-04-03T15:56:11+09:00       clear           "The cell configuration check was successful." CellCLI>

 

더보기

위의 코드는 Oracle Exadata의 CellCLI(Command Line Interface)를 사용하여 알림 히스토리를 나열하는 명령입니다. 여기에는 여러 알림 이벤트가 포함되어 있습니다. 각 이벤트에는 이벤트 번호, 발생 일시, 상태 및 메시지가 포함되어 있습니다.

- 첫 번째 이벤트:
  - 이벤트 번호: 1_1
  - 발생 일시: 2013년 3월 15일 05시 46분 49초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "A power supply component is suspected of causing a fault. Component Name: /SYS/PS1 Fault class: fault.chassis.power.ext-fail Fault message: http://www.sun.com/msg/SPX86-8003-73"

- 두 번째 이벤트:
  - 이벤트 번호: 1_2
  - 발생 일시: 2013년 3월 28일 18시 02분 50초 (한국 표준시, +09:00)
  - 상태: clear
  - 메시지: "A power supply component fault has been cleared. Component Name: /SYS/PS1"

- 세 번째 이벤트:
  - 이벤트 번호: 2_1
  - 발생 일시: 2013년 3월 28일 17시 54분 04초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "Cell configuration check discovered the following problems: Check Exadata configuration via ipconf utility Verifying of Exadata configuration file /opt/oracle.cellos/cell.conf Error. Exadata configuration file not found /opt/oracle.cellos/cell.conf [INFO] The ipconf check may generate a failure for temporary inability to reach NTP or DNS server. You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] As root user run /usr/local/bin/ipconf -verify -semantic to verify consistent network configurations."

- 네 번째 이벤트:
  - 이벤트 번호: 2_2
  - 발생 일시: 2013년 3월 28일 18시 19분 23초 (한국 표준시, +09:00)
  - 상태: clear
  - 메시지: "The cell configuration check was successful."

- 다섯 번째 이벤트:
  - 이벤트 번호: 3
  - 발생 일시: 2013년 3월 28일 17시 59분 40초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "RS-7445 [Serv MS hang detected] [It will be restarted]"

- 여섯 번째 이벤트:
  - 이벤트 번호: 4
  - 발생 일시: 2013년 3월 28일 18시 14분 23초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "RS-7445 [Required IP parameters missing] [Check cellinit.ora]"

- 일곱 번째 이벤트:
  - 이벤트 번호: 5_1
  - 발생 일시: 2013년 3월 14일 13시 46분 49초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "A power supply component is suspected of causing a fault. Component Name: /SYS/PS1 Fault class: fault.chassis.power.ext-fail Fault message: http://www.sun.com/msg/SPX86-8003-73"

- 여덟 번째 이벤트:
  - 이벤트 번호: 6_1
  - 발생 일시: 2013년 4월 2일 10시 39분 26초 (한국 표준시, +09:00)
  - 상태: critical
  - 메시지: "Cell configuration check discovered the following problems: Check Exadata configuration via ipconf utility Verifying of Exadata configuration file /opt/oracle.cellos/cell.conf Checking NTP server on 10.10.10.22 : FAILED Error. Overall status of verification of Exadata configuration file: FAILED [INFO] The ipconf check may generate a failure for temporary inability to reach NTP or DNS server. You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] As root user run /usr/local/bin/ipconf -verify -semantic to verify consistent network configurations."

- 아홉 번째 이벤트:
  - 이벤트 번호: 6_2
  - 발생 일시: 2013년 4월 3일 15시 56분 11초 (한국 표준시, +09:00)
  - 상태: clear
  - 메시지: "The cell configuration check was successful."

이 정보는 시스템의 알림 이력을 통해 전원 공급 장치(Power Supply), Exadata 구성 및 서버 문제 등 여러 가지 문제가 감지되었고, 이에 대한 조치가 취해졌음을 나타냅니다.

💡alert 로그의 상세 정보 확인 (2_1은 로그 ID)하기 위해 다음과 같이 실행합니다.

CellCLI> list alerthistory 2_1 detail     

name:                   2_1         alertMessage:           "Cell configuration check discovered the following problems:   Check Exadata configuration via ipconf utility Verifying of Exadata configuration file /opt/oracle.cellos/cell.conf Error. Exadata configuration file not found /opt/oracle.cellos/cell.conf [INFO] The ipconf check may generate a failure for temporary inability to reach NTP or DNS server. You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] You may ignore this alert, if the NTP or DNS servers are valid and available. [INFO] As root user run /usr/local/bin/ipconf -verify -semantic to verify consistent network configurations."         alertSequenceID:        2         alertShortName:         Software         alertType:              Stateful         beginTime:              2013-03-28T17:54:04+09:00         endTime:                2013-03-28T18:19:23+09:00         examinedBy:         metricObjectName:       checkconfig         notificationState:      0         sequenceBeginTime:      2013-03-28T17:54:04+09:00         severity:               critical       
  alertAction:            "Correct the configuration problems. Then run cellcli command:   ALTER CELL VALIDATE CONFIGURATION   Verify that the new configuration is correct." CellCLI>

list alerthistory 2_1 detail 명령어의 결과는 다음과 같은 정보를 제공합니다:

  • name: 2_1 : 이는 알림의 고유 식별자를 나타냅니다.
  • alertMessage: : 이 메시지는 Exadata 구성 파일 /opt/oracle.cellos/cell.conf을 찾을 수 없다는 문제를 나타냅니다. 또한, NTP 또는 DNS 서버에 일시적으로 연결할 수 없는 경우가 있음을 알려주는 메시지가 있습니다.
  • alertSequenceID: 2 : 이는 알림의 시퀀스 ID를 나타냅니다.
  • alertShortName: Software : 이는 알림의 간략한 이름을 나타냅니다.
  • alertType: Stateful : 이는 알림의 유형을 나타냅니다.
  • beginTime: 2013-03-28T17:54:04+09:00 : 이는 알림이 시작된 시간을 나타냅니다.
  • endTime: 2013-03-28T18:19:23+09:00 : 이는 알림이 종료된 시간을 나타냅니다.
  • examinedBy: : 이는 알림을 검토한 사람이나 프로세스를 나타냅니다.
  • metricObjectName: checkconfig : 이는 알림이 참조하는 메트릭 개체의 이름을 나타냅니다.
  • notificationState: 0 : 이는 알림의 통보 상태를 나타냅니다.
  • sequenceBeginTime: 2013-03-28T17:54:04+09:00 : 이는 알림 시퀀스가 시작된 시간을 나타냅니다.
  • severity: critical : 이는 알림의 심각도를 나타냅니다.
  • alertAction: : 이는 문제를 해결하기 위한 권장 조치를 나타냅니다. 이 경우, 구성 문제를 수정하고 셀 구성을 검증하라는 조치가 제안되고 있습니다.

즉, 이 알림은 Exadata 구성 파일을 찾을 수 없는 문제와, NTP 또는 DNS 서버에 일시적으로 연결할 수 없는 문제에 대해 경고하고 있습니다. 이 문제를 해결하기 위해, 구성 문제를 수정하고 셀 구성을 검증해야 합니다.

 

 

로그 상세에 따르면 스토리지 서버 환경 설정 검증 중 오류가 발견되었고, 그에 따른 조치 권고사항을 제시하고 있습니다.

alert 의 정의와 관련 metric 정보를 조회하여 문제 해결의 참고 정보로 활용할 수 있습니다.

CellCLI> list alertdefinition attributes name, metricname, alertsource, description where alertshortname='ADR'
         ADRAlert                "Automatic Diagnostic Repository"       "Incident Alert"

또한, 중요한 alert 을 조회하기 위해 filtering 할 수 있습니다.

 

💡스토리지 서버에서 발생했던 문제들중 해결된 문제들 확인하는 방법

CellCLI>  list alerthistory where serverity='clear'
         1_2     2013-03-28T18:02:50+09:00       clear   "A power supply component fault has been cleared.   Component Name : /SYS/PS1"
         2_2     2013-03-28T18:19:23+09:00       clear   "The cell configuration check was successful."
         6_2     2013-04-03T15:56:11+09:00       clear   "The cell configuration check was successful."

 

 

💡 스토리지 서버의 상태를 확인하는 명령어

CellCLI> list  cell  detail
          name:                      krxacel01
          bbuStatus:                 normal     # For equal to or earlier than X4-2
          cellVersion:               OSS_12.1.2.1.0_LINUX.X64_141206.1
          cpuCount:                  24
          diagHistoryDays:           7
          fanCount:                  8/8
          fanStatus:                 normal
          flashCacheMode:            WriteBack
          id:                        1233FM5057
          interconnectCount:         3
          interconnect1:             ib0
          interconnect2:             ib1                 # For Active bonding
          iormBoost:                 0.0
          ipaddress1:                192.168.10.11/22
          ipaddress2:                192.168.10.12/22    # For Active bonding
          kernelVersion:             2.6.39-400.243.1.el6uek.x86_64
          locatorLEDStatus:          off
          makeModel:                 Oracle Corporation SUN FIRE X4270 M3 High Performance
          memoryGB:                  63
          metricHistoryDays:         7
          offloadGroupEvents:
          offloadEfficiency:         1,000.0
          powerCount:                2/2
          powerStatus:               normal
          releaseImageStatus:       success
          releaseVersion:            12.1.2.1.0.141206.1
          releaseTrackingBug:       17885582
          status:                    online
          temperatureReading:       27.0
          temperatureStatus:         normal
          upTime:                    3 days, 2:18
          usbStatus:                 normal
          cellsrvStatus:             running
          msStatus:                  running
          rsStatus:                  running

 

밑의 3줄(cellsrvStatus , msStatus, rsStatus) 이 전부 running으로 조회되면 해당 스토리지 서버가 정상적으로 운영중임을 확인 할 수 있다