mysql oratop_oratop – 搜索结果 – 提供7*24专业数据库(Oracle,SQL Server,MySQL等)恢复和Oracle技术服务@Tel:+86 13429648788...

oracle 也推出来了数据库的top命令,叫做oratap,是使用c语言写的,目前只支持linux x86与x64的11gR2与12cR1

使用说明

[oracle@xifenfei tmp]$ ./oratap -h

oratop: Release 13.2.4

Usage:

oratop [ [Options] [Logon] ]

Logon:

{username[/password][@connect_identifier] | / }

[AS {SYSDBA|SYSOPER}]

Options:

-i : Interval Delay (requires value in seconds, default: 3s)

-f : Long format for header & section 4 (default: 80 column)

-r : IORL mode for Section 2 (default is IOPS)

-d : Real-Time Top 5 Wait Events (default: Cumulative)

-m : MODULE/ACTION mode for Section 4 (default: USER/PROGRAM_NAME)

-b : Batch mode

-n : maximum number of iterations (requires number)

-h : Help

使用说明

1. Log in to the system as the Oracle RDBMS software installation owner

2. Stage the oratop executable on the server on which the tool will be executed. On a RAC system it is only necessary to stage the executable on one node as it is RAC aware.

3. Change the name of the executable, eg.

$ mv oratop* oratop

4. Validate the permissions for oratop are 755 (-rwxr-xr-x). If the permissions are not currently set to 755, set the permissions on oratop as follows:

$ chmod 755 oratop

5. Configure the execution environment as follows (if not already set accordingly)

$ 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= #only needed if connecting to a local database

6. Invoke the tool to monitor a local database as follows (interval can be any interval in seconds):

$ ./oratop -i 10 / as sysdba

7. Non-dba privileged user requires specific grants to use the tool. See User Guide for grants required.

8. Databases can be monitored remotely using a tns alias as described in the oratop Users Guide .

$ ./oratop -i 10 username/password@tns_alias

$ ./oratop -i 10 system/manager@tns_alias

9. To exit the program simply press the keyboard key “q”. To abort, CTRL-C.

Troubleshooting:

If you receive an error similar to

./oratop: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory that is an indication that libclntsh.so.11.1 was not found in the path defined in LD_LIBRARY_PATH similar to

$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib (ie., the location of libclntsh.so.11.1)

使用效果

[oracle@xifenfei tmp]$ ./oratap -i 10 chf/xifenfei@ora11g_p

oratop: Release 13.2.4 Production on Mon Aug 26 03:10:17 2013

Copyright (c) 2011, Oracle. All rights reserved.

Processing ...

oratop 1: 148 ora1 03:10:13 up 3.3m, 1 ins, 301M mt, 3 sn, 1 us, 6% db

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

1 0 0 0 1 5 133M 1 0 0 0 0.1 3 0 2 0u 0 0

EVENT (Cumulative) TOT WAITS TIME(s) AVG_MS PCT WAIT_CLASS

DB CPU 218 68

control file parallel write 5535 30 5.5 9 System I/O

db file sequential read 10080 27 2.7 8 User I/O

os thread startup 198 25 124.9 8 Concurrency

db file async I/O submit 2575 21 8.0 7 System I/O

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

1 148 8254 CHF DEDI 2M SEL 4agz3g5aajkdc 0 ACTIVE CPU wa for cpu 0u

参考文档:

oratop – utility for near real-time monitoring of databases, RAC and Single Instance (Doc ID 1500864.1)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值