1. top 或 topas 查看大概情况 ,查看CPU, process数,Mem, swap 使用情况 ,查看各Process的
CPU , mem, swap使用情况。
2. vmstat 2 100 查看等待是否严重及 swap , cpu 运转情况
3. 根据时间段做 ASH 报告 (ashrpt.sql)
4. 同时通过sql或toad 查看lock情况及等待事件,查看active的session量
5. 如果可以通过EM 查看active 状态的session是否有处于等待状态的
6. 查看ASH 中的top user events , Top SQL, Top Service/Module , Top sessions .
7. 生成AWR报告并查看等待事件 等
select * from v$session_wait where wait_class#<>6;
select s.sid,s.value "CPU Used"
from v$sesstat s,v$statname n
where s.statistic#=n.statistic# and n.name='CPU used by this session'
and s.value>0
order by 2 desc;
from v$sesstat s,v$statname n
where s.statistic#=n.statistic# and n.name='CPU used by this session'
and s.value>0
order by 2 desc;
select event,count(*) from gv$session_wait group by event order by count(*) desc;
SELECT s.sid,s.serial#,p.spid, t.sql_text FROM v$session s, v$sql t, v$process p
WHERE s.event LIKE 'row cache lock' AND t.sql_id = s.sql_id AND s.PADDR = p.ADDR ;
WHERE s.event LIKE 'row cache lock' AND t.sql_id = s.sql_id AND s.PADDR = p.ADDR ;
Alter system kill session 'SID,SERIAL#' ;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-750980/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-750980/