首页 > 代码库 > DTrace Oracle Database
DTrace Oracle Database
http://d.hatena.ne.jp/yohei-a/20100515/1273954199
DTrace で Oracle Database のサーバー?プロセスをトレースしてみた
Oracle, Mac
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
DTrace Oracle Database
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。