Http://d.hatena.ne.jp/yohei-a/20100515/1273954199dtraceでoracle databaseのサーバー?プロセスをトレースしてみた
Oracle, Mac
2010-03-22-Future のいつか/hyoshiokの Day
102th back カーネル Reading book will occupies line ってきて, Dtraceを make ってみようと think ってもう2ケ month near くすぎた.
やっと makes ってみた.
sqlplusでログインして,
$ sqlplus/as Sysdbasql*plus:releaseTen.2. 0.4. 0-production on Sun: 2010Copyright (c) 1982, Oracle. All rights reserved.connected to:oracle Database 10g Enterprise Edition Release . 2.0. 4.0-productionwith The partitioning, OLAP, Data Mining and Real application testing Optionssql>
Dtraceでトレースを started 前転して開脚座り,
$ Su-# Ps-ef|grep [O]RACLEORCL40S475 474 0 0:00. 02?? 0:00. ORACLEORCL (description= Span class= "Synidentifier" >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を Natsumi Sato Line してみると,
Select count (fromall_users; COUNT (1)----------
お尻, なんか out ちょっとたいま.
# Ps-ef|grep [O]RACLEORCL50247547400:00.02??0:00.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' Matched269 PROBESCPU FUNCTION0-> qergsfetch 0-> QerhjFetch 0-> qerhjfetch 0-> qertbfetch 0 <-qertbFetch 0-> qertbfetch 0 <-qertbfetch 0 <-qerhjfetch 0-> qertbfetch 0 <- Qertbfetch 0 <-qerhjfetch 0 Span class= "synstatement" ><-qergsfetch
The environment は the following moistened.
# Sw_versproductname:mac OS xproductversion:10.6.3buildversion:10d578# Uname-adarwin Yoheia-no-macbook10.3.0 Darwin Kernel Version10.3.0:fri Feb2611:58:The PST2010; Root:xnu-1504.3.12~1/release_i386 i386# su-oracle$ Sqlplus/as sysdbasql*plus:release10.2.0.4.0-production on Sun May1605:08:112010Copyright(c)1982,Oracle. All rights reserved.connected to:oracle Database 10g Enterprise Edition Release10.2.0.4.0-productionwith the partitioning, OLAP, Data Mining and Real application testing Optionssql>SELECT * FROM V$version; BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release10.2.0. 4.0-prodpl/sql Release 10. 2.0. 4.0-productioncore10. 2.0. 4.0productiontns for MacOS X server:version 10. 2.0. 4.0-productionnlsrtl Version 10. 2.0. 4.0-production
DTrace Oracle Database