solaris操作系统内存和cpu使用率很高
用sar -u 3 30/top/ps -eo pid,pcpu,args |sort +1n 察看到占用cpu很高
select * from v$session_wait a where a.EVENT not like 'SQL*Net%' and a.EVENT like 'latch%';
select * from v$sql a where a.SQL_ID = '3ujjam9kcu2ma';
select 'alter system kill session '''||sid||','||serial#||''';' from v$session
ps -eo pid,pcpu,args |sort +1n
20017 4.0 oracleora11g (LOCAL=NO)
20025 4.0 oracleora11g (LOCAL=NO)
20027 4.0 oracleora11g (LOCAL=NO)
20017,20025,20027
察看时间已经执行了好几天,确认是没用的SQL,就直接kill掉,cpu使用率下降了很多
select * from v$session_wait a where a.EVENT not like 'SQL*Net%' and a.EVENT like 'latch%';
select * from v$sql a where a.SQL_ID = '3ujjam9kcu2ma';
select 'alter system kill session '''||sid||','||serial#||''';' from v$session
where sid in (select sid
from v$session_wait a
where a.EVENT not like 'SQL*Net%'
and a.EVENT like 'latch%');
select * from v$process a where a.sPID in(20017,20025,20027);
察看内存使用率:
ps -eo pid,pcpu,pmem,vsz,time,etime,stime,args | sort +2n