CPU busy by oracle

classic Classic list List threaded Threaded
3 messages Options
big
Reply | Threaded
Open this post in threaded view
|

CPU busy by oracle

big
Hi,
On 11.2.0.4 on AIX
CPU is very busy and topas shows



We can see pid in topas:



That is 15270180.

In which oracle table I can find user and what he is doing (select, update, insert ....) using this pid ?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: CPU busy by oracle

ErmanArslansOracleBlog
Administrator
you will use v$process and v$session for that.
v$process   SPID VARCHAR2(12) Operating system process identifie
You will join them and use the OS PID information for querying the details.
Once you get the Oracle SID (session id), your job will be easier. You will then check the relevant data dictionary views to see what those sessions are doing..

If you have a tool like Toad in place, you can also use the capabilities of that Tool to display the relevant detailed info about that process/session.. Those types of tools have Session Monitor tabs, so you can use them as well..
big
Reply | Threaded
Open this post in threaded view
|

Re: CPU busy by oracle

big
Thank you.

Yes and a query like this:
select
 substr(a.spid,1,9) pid,
 substr(b.sid,1,5) sid,
 substr(b.serial#,1,5) ser#,
 substr(b.machine,1,15) box,
 substr(b.username,1,10) username,
-- b.server,
 substr(b.osuser,1,15) os_user,
 substr(b.program,1,30) program
from v$session b, v$process a
where
b.paddr = a.addr
and type='USER'
order by username;

Regards.