• 【转】ORATOP工具使用说明


    文章转自:http://lintzyuan.blogspot.jp/2014/07/oratop.html

    ORATOP

     
    前言:
    隨著PC Server的規格及速度愈來愈快,大多數的公司摒棄大型主機,進而選擇PC Server的趨勢愈來愈盛,雖然在可靠度上仍然是大型主機占優勢,但是大型主機的維護費用高昂,這也是讓一般公司望之卻步的主要因素。
    在目前PC Server的可靠度尚待提升的當下,其實,Virtual Machine的選擇可以彌補PC Server可靠度的不足,目前三大虛擬平台逐漸成形,分別是Vmware、Hyper-V以及Oracle VM。
    如果各位使用PC Server,將Oracle Database安裝在PC Server上,大概就只有Linux可以選擇了。Linux上面要即時監控系統狀況,"top" 指令是系統管理員常用的,但是我們使用 "top" 找到了 Top Process之後,往往還需要將Process ID轉換成Database SID,才能找出關鍵性的Session,進而解決效能問題,不過,Oracle最近有一項工具叫做 "oratop",可以及時監控Linux上的Database Process狀況,讓系統管理員省去不少時間,找出 Top Session。

    目的:
    oratop是類似 top 的工具,可以針對Oracle Database Performance做全面性的檢視,如果搭配 top 使用,會得到更完整的系統效能資訊。

    適用版本:
    Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.4 [Release 11.2]
    Oracle Database - Enterprise Edition - Version 12.1.0.1 and later
    Linux x86-64
    Linux x86

    使用方式:
    1. 使用oracle 使用者將下載的oratop.RDBMS_11.2_LINUX_X64  ftp 到資料庫主機上,如果是RAC環境,選定其中一個node上傳即可。
    2. cd 到 oratop 程式所在目錄
    3. 更名oratop程式
    1. $ mv oratop* oratop
    4. 更改oratop權限
    1. $ chmod 755 oratop
    5. 在.bash_profile 環境變數檔中,設定環境變數(如果尚未設定的話)
    1. $ 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
    6. 執行oratop (每10秒更新一次)
    1. $ ./oratop -i 10 / as sysdba
    7. 針對遠端資料庫執行oratop (每10秒更新一次)
    1. $ ./oratop -i 10 system/manager@tns_alias
       
    8. 結束oratop
        按下 "q",或是 CTRL-C

    參考畫面:

    指令介紹:
    1. 語法
    1. $ oratop [Options] [Logon]
    2. Options
        a) Help,Displays usage or output information.
            預設: N/A
    1. $ oratop -h[elp]  # runtime mode 按下h
        b) Top 5 Wait Events
            預設: 累計
            選項: 即時呈現
    1. $ oratop -d  # runtime mode 按下d
        c) 等待物件
            預設: Event/Latch
            選項: File#:Block#
    1. $ oratop -k  # runtime mode 按下k
        d) session行為
            預設: 是Username/Program
            選項: 是Module/Action
    1. $ oratop -m  # runtime mode 按下m
        e) SQL mode
            預設: Process mode
            選項: SQL display
    1. $ oratop -s  # runtime mode 按下s
        f) Database Service centric mode
            預設: Connection mode
            選項: N/A
    1. $ oratop -c  # runtime mode:N/A
        g) Long format, (132 columns)
            預設:  short (80 columns)
            選項:  long format for header & process section.
    1. $ oratop -f  # runtime mode: 按下f
        h) Database Process mode
            預設:  Process mode
            選項: process display
    1. $ oratop -p  # runtime mode: 按下p
        i) Batch mode operation
            預設: Text-based user interface
            選項: N/A
    1. $ oratop -b  # runtime mode: N/A
        j) Maximum Number of iterations.   (requires a number)
            預設: infinite
            選項: the maximum number of iterations, or frames
    1. $ oratop -n  # runtime mode: N/A
       k)  Displays tablespace information
            預設: N/A
            選項: tablespace information
    1. # runtime mode: 按下t
        l) Displays  ASM diskgroup information.  (no op for non-ASM)
            預設: N/A
            選項: ASM diskgroup information
    1. # runtime mode: 按下a
        l) Displays SQL execution plan table. Requires input of the active SQL sql_id value
            預設: 5 seconds
            選項: the delay between update refresh
    1. $ oratop -c  # runtime mode: 按下
        m) Interval delay time. ( requires value in seconds)
             預設: Connection mode
             選項: N/A
    1. $ oratop -v  # runtime mode: N/A

    參考文件:
    oratop - Utility for Near Real-time Monitoring of Databases, RAC and Single Instance (Doc ID 1500864.1)
  • 相关阅读:
    【BSP视频教程】STM32H7视频教程第13期:系统讲解CortexM7内核MPU和Cache,理解通透(20220417)
    H7TOOL发布固件V2.15, 脱机烧录增加瑞萨,合泰以及IS25WP全系列SPI FLASH等(20220414)
    【DSP视频教程】DSP视频教程第6期:Matlab和VSCode联调,使用贼舒服,大大方便测试验证,全程无需打开Matlab(20220409)
    【STM32H7教程】第94章 STM32H7的SPI总线应用之双机通信(DMA方式)
    《安富莱嵌入式周报》第261期:2022.04.112022.04.17
    大文件上传
    【virtualBox】【vagrant】网络地址问题ssh工具连接不上/主机ping虚拟机ping不通
    oracle获取表结构
    k8s部署velero去备份etcd
    1 k8s组件介绍以及kubeasz二进制安装
  • 原文地址:https://www.cnblogs.com/david-zhang-index/p/5209976.html
Copyright © 2020-2023  润新知