zoukankan      html  css  js  c++  java
  • DTrace Oracle Database

    http://d.hatena.ne.jp/yohei-a/20100515/1273954199

    DTrace で Oracle Database のサーバー・プロセスをトレースしてみたAdd Starhapps

    2010-03-22 - 未来のいつか/hyoshiokの日記

    第102回カーネル読書会 に行ってきて、DTrace を使ってみようと思ってもう 2 ケ月近くすぎた。

    やっと使ってみた。

    sqlplus でログインして、

    $ sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.4.0 - Production on Sun May 16 04:59:23 2010
    
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> 
    

    DTrace でトレースを開始して、

    $ su -
    # ps -ef|grep [o]racleorcl
      502   475   474   0   0:00.02 ??         0:00.03 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    # dtrace -p 475 -Fn 'pid$target:oracle:qer*Fetch*:entry pid$target:oracle:qer*Fetch*:return'
    dtrace: description 'pid$target:oracle:qer*Fetch*:entry pid$target:oracle:qer*Fetch*:return' matched 269 probes
    

    SQL を実行してみると、

    SQL> select count(1) from all_users;
    
      COUNT(1)
    ----------
    	27
    
    SQL> 
    

    お、なんか出た。

    # ps -ef|grep [o]racleorcl
      502   475   474   0   0:00.02 ??         0:00.03 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    # dtrace -p 475 -Fn 'pid$target:oracle:qer*Fetch*:entry pid$target:oracle:qer*Fetch*:return'
    dtrace: description 'pid$target:oracle:qer*Fetch*:entry pid$target:oracle:qer*Fetch*:return' matched 269 probes
    CPU FUNCTION                                 
      0  -> qergsFetch                            
      0    -> qerhjFetch                          
      0      -> qerhjFetch                        
      0        -> qertbFetch                      
      0        <- qertbFetch                      
      0        -> qertbFetch                      
      0        <- qertbFetch                      
      0      <- qerhjFetch                        
      0      -> qertbFetch                        
      0      <- qertbFetch                        
      0    <- qerhjFetch                          
      0  <- qergsFetch                      
    

    環境は以下の通り。

    # sw_vers
    ProductName:	Mac OS X
    ProductVersion:	10.6.3
    BuildVersion:	10D578
    # uname -a
    Darwin yoheia-no-macbook 10.3.0 Darwin Kernel Version 10.3.0: Fri Feb 26 11:58:09 PST 2010; root:xnu-1504.3.12~1/RELEASE_I386 i386
    # su - oracle
    $ sqlplus / as sysdba
    
    SQL*Plus: Release 10.2.0.4.0 - Production on Sun May 16 05:08:11 2010
    
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    
    
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
    PL/SQL Release 10.2.0.4.0 - Production
    CORE	10.2.0.4.0	Production
    TNS for MacOS X Server: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
  • 相关阅读:
    C# 遍历Hashtable
    asp.net 处理超链接中文参数编码问题
    electronvue开发问题总结
    vue全局使用样式文件vueclipluginstyleresourcesloader
    win10使用VMware安装macOS11.1镜像系统教程
    LVM从CentOS7默认安装的/home中转移空间到根目录/(转载)
    Nginx引用多配置文件
    ssh_exchange_identification: read: Connection reset by peer
    linux修改时区
    修改键盘Tab键为四个空格
  • 原文地址:https://www.cnblogs.com/zengkefu/p/6665117.html
Copyright © 2011-2022 走看看