출처 : http://blog.naver.com/k65fac?Redirect=Log&logNo=40105702092
1. 세션별 CPU Time, Memory 사용량
select s.sid, s.serial#, p.spid as "os pid", s.username, s.module, s.sql_id, event, seconds_in_wait,
st.value/100 as "cpu sec",
round(pga_used_mem/1024/1024) "pga_tot(mb)",
round(pga_used_mem/1024/1024) "pga_per_sess(mb)"
from v$sesstat st, v$statname sn, v$session s, v$process p
where sn.name = 'CPU used by this session' -- cpu
and st.statistic# = sn.statistic#
and st.sid = s.sid
and s.paddr = p.addr
and s.last_call_et < 1800 -- active within last 1/2 hour
and s.logon_time > (SYSDATE - 240/1440) -- sessions logged on within 4 hours
order by st.value
2. Client별 Memory 사용량
select machine,status,count(*) cnt,
round(sum(pga_used_mem)/1024/1024) "pga_tot(mb)",
round(sum(pga_used_mem)/count(*)/1024/1024) "pga_per_sess(mb)"
from v$session s, v$process p
where 1=1
--and s.status='active'
and s.paddr=p.addr
and type <> 'BACKGROUND'
group by machine,status
order by 1
'::: DB ::: > Oracle' 카테고리의 다른 글
| 오라클 세션별 CPU, PGA 사용량 확인 쿼리 (0) | 2012/05/17 |
|---|---|
| MULTIPLE LISTENER의 LOAD BALANCING 및 2개의 NETWORK CARD 사용 시 SETUP (0) | 2012/05/15 |
| Useful Metalink Articles (0) | 2012/05/15 |
| (Oracle 10g) dbms_stats.gather_schema_stats 수행에 시간이 너무 많이 걸려요. (0) | 2012/03/28 |
| ORA-12154: TNS:could not resolve the connect identifier specified (0) | 2012/03/22 |
| 오라클에서 특정 컬럼의 인코딩만 변경해서 넣거나 가져오기 (0) | 2012/03/22 |

댓글을 달아 주세요