-
I was wondering how to track the oracle process inside the database if you knwo the OS process ID using "top" or "ps -ef" command.
We have one session eating up 60% of CPU resources and trying to track down it's path in the database and its activities inside the database.
TIA
-
server_pid of....
Code:
set pages 50
col kill_by for a12
col username for a12
col program for a40
col "MACHINE/PID" for a20
set linesize 132
set pages 100
select '''' || s.sid ||','||s.serial# || '''' kill_by,
p.spid server_pid, s.username, s.program,
decode(s.process, NULL, s.machine, s.machine || ' PID: ' || s.process) "MACHINE/PID" ,
s.server, s.status
from v$session s, v$process p
where s.username is not null
and s.paddr = p.addr
order by to_number(p.spid)
/