Small PID oneliner

Here is a small dtrace oneliner which I believe good to start to investigate what is doing your oracle session:

 

dtrace -n ‘profile-497/pid == $target/ { @u[ustack(40, 2000)] = count(); } tick-5s {printa ( @u);} tick-60s { exit(0); }’ -p PID

it’s just print user stack (sampled 497 times per second) each 5 second and exit after 1 minute.

One more oneliner: count calls for all Oracle internal functions by pattern “kgl*”

dtrace -n ‘pid$target::kgl*:entry { @u[probefunc] = count(); } tick-5s {printa ( @u);} tick-60s { exit(0); }’ -p PID