oratop

 1.下载:

目前,Oratop是在MOS上免费下载。每个db 版本和 os 版本都有对应的程序:The tool is a compiled c program. 不需要编译,直接运行。   (下载文档 ID 1500864.1)

支持版本:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.4 [Release 11.2]

 

支持操作系统:

IBM AIX on POWER Systems (64-bit)
HP-UX PA-RISC (64-bit)
HP-UX Itanium
Linux x86-64
Linux x86
Oracle Solaris on x86-64 (64-bit)
Oracle Solaris on SPARC (64-bit)

 

2.使用:

 

#######
chown -R oracle11g:oinstall /db/scripts
mv oratop.RDBMS_11.2_LINUX_X64 oratop
chmod 755 oratop
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=ora11g #only needed if connecting to a local database


-> for local:
cd /db/scripts/oratop
./oratop -i 10 / as sysdba

 

 ->for remote:
cd /db/scripts/oratop
./oratop -i 10 dbmgr/db1234DBA@aa

Interactive Keys: [default]
d : toggle between [Cumulative (C)] & Real-Time (RT) (section 3)                   -》 event 显示 累计的 还是 实时的 ..(常用)
k : toggle between [EVENT/LATCH] & object FILE#:BLOCK# (proc section 4)      -》  process 模式 显示event 还是 file,
m : Toggle between [USERNAME/PROGRAM] & MODULE/ACTION (proc section 4)   -》process 模式 显示user 还是 module
s : switch to SQL mode (section 4)                                                                          -》process 模式 切换到 SQL模式
f : toggle between [standard] & detailed format (long)                                  -》process 切换标准模式 还是 详细模式   .(常用)
p : switch to [process] mode (section 4)                                             -》process 模式 切换到 process模式
t : tablespace information
x : basic SQL plan table (requires sql_id input)
i : refresh interval, requires value in seconds [5s]                                   -》更新频率,默认是10s 更新一次
q : quit/ exit program (also, { Q | Esc | function keys })

Abbreviations:
[N/B]: count(N)/ Byte(B) - (k)illo, (M)ega, (G)iga, (T)erra, [PEZY]
[T] : Time - (u)micro, (m)illi, (s)econd, (h)our, (d)ay, (y)ear
[m/s]: stats interval size, (m) 1 minute, (s) 15s, else, Real Time
[c] : database service centric

Acronym Help Menu:
Section 1 - DATABASE .. [1]
Section 2 - INSTANCE .. [2]
Section 3 - DB WAIT EVENTS .. [3]
Section 4 - PROCESS .. [4]
Quit Help .. (q|Q)

 

 

3、初识Oratop

 

从字符界面上看,oratop结果集合分为四个部分,分别为:Header SectionDatabase SectionDB Events SectionProcesses Section

 

 

 

 

Header Section中,包括了连接数据库的总体信息,包括运行多长时间、实例个数(for RAC)、内存大小和数据库占据CPU时间的比例。

 

Database Section中,包括了各个实例(for RAC)下,每个实例的基本参数和复杂信息。如每个实例活动会话个数、每秒的事务数量和内存使用情况等。

 

DB Events Section是从Wait Event角度进行评估。评估排在头几位的等待事件信息,默认情况下,这个度量是累计的,也就是从启动数据库到当前时间。我们可以切换到当前时间模式下。

 

Processes Section是记录下处在BlockContention状态的连接会话信息。当数据库出现有会话被阻塞的情况,就会记录在这个Section里面。

 

4、丰富的帮助系统

 

Oratop结果显示中,大量使用的简写和缩写,这在一定程度上阻碍我们阅读结果。为此,Oratop开发人员设计了完备功能的帮助体系。

 

在使用-h参数,或者运行过程中按下键盘h,就可以切换到帮助界面。

 

使用h按键

 

 

oratop: Release 13.2.1

------------------------------------------------------------------------------

Dynamic Keys

        d : Toggle Top 5 Wait Events between Real-Time and Cumulative

        f : Toggle between short & long format (for header & Process sections)

        i : Interval Delay time (requires value in seconds)

 

Nomenclature:

        [M] : Signify 1 minute averaged value, else, Real Time

        [F] : denote a Forground (FG) value, else, Background (BG)

------------------------------------------------------------------------------

Acronym Help Menu:

 

HEADER Section    .. [1]

DATABASE Section  .. [2]

DB EVENTS Section .. [3]

PROCESSES Section .. [4]

Quit Help         .. (Q|q)

 

Enter selection Number:

 

 

动态按键(Dynamic Keys)实际上就是在运行过程中,可以动态实时点击,查看不同维度结果的案件。

 

笔者比较喜欢d按键,这样可以从累计Event信息到实时Event信息,把握最新的数据库等待时间状态。

 

 

 

(d) –使用了d动态按键

oratop 1:  376 NBST 14:31:22 up  5.1d,  1 ins,   2G mt, 135 sn,  7 us,   4% db

ID %CU HLD MBPS IORL %FR PGAU ASC ASI ASW ASP   AAS USN  TPS UCPS SSRT DBC DBW

 1   2   0    0   0m  17 394M   1   0   0   0   0.0 135    4   71 297u  85  15

                                                                              

EVENT     (Real-Time)       AVG: TOT WAITS  TIME(s)  AVG_MS PCT  WAIT_CLASS  

DB CPU                                         1867         100              

                                                                              

ID   SID  SPID USR PROG  PGA OPN SQLID/BLOCKER  E/T STATUS STE WAIT_EVENT  W/T

 

 

 

转 :

http://www.itpub.net/thread-1887211-1-1.html

http://blog.itpub.net/17203031/viewspace-765228/

 

转载于:https://www.cnblogs.com/feiyun8616/p/7843136.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值