1832962 Members
2909 Online
110048 Solutions
New Discussion

Re: lsof, IPC and oracle

 
LE_1
Advisor

lsof, IPC and oracle

Hi,

Here's my problem:
On a HPUX 11i box :

I have several X process with the same name TOTO ; they connect (dedicated server) to a oracle database via IPC (not SQL*Net)
Now there are X process oracleORACLE_SID
How can I do the link between the PID of one process TOTO with the PID of the oracle shadow
process associated ?

I tried different options with lsof but with
a IPC connection, I didn't success

(You can try with several TOTO=sqlplus for example)

Thanks


6 REPLIES 6
Graham Cameron_1
Honored Contributor

Re: lsof, IPC and oracle

From SQLPLUS

select s.sid, s.serial#, s.audsid, s.username, s.osuser, s.machine, s.terminal, s.process, p.spid, s.program
from v$process p,v$session s
where p.addr = s.paddr


The SPID col is the client, the PROCESS col is the shadow.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Massimo Bianchi
Honored Contributor

Re: lsof, IPC and oracle

Graham, the process column is the PID of the shadow process, not the PID of the client connecting to the shadow.

Massimo (still thinking to the answer..)
Massimo Bianchi
Honored Contributor

Re: lsof, IPC and oracle

SORRY, SORRY, SORRY !!

Graham is perfectly correct, I read the wrong column :)

SORRY, SORRY, SORRY !!

Massimo
LE_1
Advisor

Re: lsof, IPC and oracle

Thanks for your answers
Your sql select is ok
but I would like to find a
way with OS commands.
Michael Schulte zur Sur
Honored Contributor

Re: lsof, IPC and oracle

Hi,

try to see, if the Oracle process and the application process dont have a father/son relationship. The Oracle process should be the son of the application process, it it is a local connect.

greetings,

Michael
Graham Cameron_1
Honored Contributor

Re: lsof, IPC and oracle

Is it not simply that the Shadow process has the TOTO process as its parent, so you can get it from ps.

For example, the command:
UNIX95= ps -efH
will give all processes by hierarchy and you can grep or awk out the ones you want.
(NB ps -H is expensive - see "man ps")

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.