Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Home
Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients

 

Free Oracle Tips


 
HTML Text AOL

Free Oracle App Server Tips


 
HTML Text

Oracle support

Oracle training

Oracle tuning

Rednecks!

Remote Oracle

Custom Oracle Training

Donald K. Burleson

Oracle Tips

Correlating UNIX processes with Oracle sessions

If we want to move outside of Oracle and see details for the session at the UNIX level, we must correlate the Oracle PIS with the UNIX PID. To see details of these processes you can write an Oracle script to filter the UNIX ps output to only include these processes:                 

#/bin/ksh
sqlplus system/oracle@prodlive<<!
set pages 999
set feedback off
set echo off
set heading off

spool /tmp/run_pid.ksh

select
   'ps -ef|grep '||spid||’grep –v grep’
from
   v\$process
where
   spid is not NULL
;

spool off;
!

# Execute the UNIX commands . . . .
chmod +x /tmp/*.ksh


Here is the output from this script.  As we see, the SQL*Plus script builds the UNIX ps command for the Oracle PIDs and then executes the command.

root> /tmp/run_pid.ksh

jjahn         3231    3129   0    08:12:17    ?         0:00 oraclePA

bbeckero  2482    2377   0    07:59:26    ?         0:00 oraclePA

scarf         2376      785   0    07:59:03    ttyp9     0:00 telnetd

brobins     2377   2376    0    07:59:04    ttyp9     0:01 runmenu50 pamenu

monte       1372         1    0     Sep 21     ?         5:58 /opt/hpnp/bin/hpnpd

imels        1886    1878    0     Sep 21     ttyp1     0:00 tee -a

This script allows us to see the start time for the UNIX connection and also see the cumulative CPU consumption for each task.

If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The DefinitiveReference” by Rampant TechPress. (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link:

http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm

 

 

 
 
 

Oracle performance tuning book

 

 

Oracle performance tuning software

 
Oracle performance tuning software
 
Oracle performance Tuning 10g reference poster
 
Oracle training in Linux commands
 
Oracle training Excel
 
 
 
 
 
email BC:


Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.