从此SQLPLUS有了Top命令

Jagjeet Singh为我们提供了这样一个sqlplus下的RAC dashboard,实时的性能工具,看上去和top或者nmon命令的界面很相似,借助于这个工具我们将可以实时监控RAC的性能指标而不依赖于图形界面。

 

点击这里下载Jagjeet Singh的sqlplus dashboard for rac工具

 

具体的安装方法如下:

 

 

解压zip包 

[oracle@vrh1 ~]$ unzip Pck.zip 
Archive:  Pck.zip
   creating: Pck/
  inflating: Pck/1_grants.sql        
  inflating: Pck/2_Types.sql         
  inflating: Pck/3_pkg.sql           
  inflating: Pck/drop.sql            
  inflating: Pck/howtoinstall.sql    
  inflating: Pck/outputexplained.pdf  
  inflating: Pck/sampleoutput.png    

[oracle@vrh1 ~]$ cd Pck

[oracle@vrh1 Pck]$ sqlplus  / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Wed Aug 8 02:08:49 2012

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

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

1.  执行授权文件1_grants.sql        

SQL> start 1_grants.sql
Enter value for _usr: maclean

需要指定安装在哪个schema下

2. 登录上面指定的schema,并执行 2_Types.sql 创建type

SQL> conn maclean/maclean
Connected.
SQL> 
SQL> 
SQL> start 2_Types.sql

Type created.

Type created.

Type created.

Type created.

Type created.

Type created.

Type created.

Type created.

Type created.

Type created.

3. 执行3_pkg.sql 创建包体

SQL> start 3_pkg.sql

Package created.

No errors.

Package body created.

 若想删除该工具吗,卸载的方法 

SQL> connect maclean/maclean
SQL> start drop.sql

 

 

 

具体使用的方法如下:

 

 

 SQL>set lines 190 pages 0 arraysize 50
 SQL>select * from table(jss.gtop(50,10)) ;

50代表 arraysize 一般不用修改
10代表 10s采样一次,采样间隔

 

示例输出:

 

这很酷,仿佛文字版的spotlight  FOR RAC


Posted

in

by

Tags:

Comments

9 responses to “从此SQLPLUS有了Top命令”

  1. 不了峰 Avatar

    酷~~~~~~~~~~~~~~~~~~~~

  2. 不了峰 Avatar

    酷针对11G
    如果可以采集10g的RAC,那就更酷~~~~~~~~~~

  3. quan Avatar
    quan

    你好 请问这款工具支持11g一下的版本吗?

  4. arong Avatar
    arong

    这个工具在Oracle 9.2和10.1版本安装Package Body报错了

  5. HANK Avatar
    HANK

    请问这个在ORACLE10G能运行吗?我运行的时候报错
    ERROR at line 1:
    ORA-00904: “JSS”.”GTOP”: invalid identifier

  6. HANK Avatar
    HANK

    能不能改编一下,发一版10G的啊,现在中国主流行业生产库都是9I,10G颇多非常感谢

  7. 刘家驹 Avatar

    这个会使空间迅速增加吗

  8. 我要找干爹 Avatar

    看后感悟了点,收下了

Leave a Reply

Your email address will not be published. Required fields are marked *