Scripts to monitor CPU, IO and Paging for each sessions in database
Hi all,
My oracle db is 11gR2 running in AIX platform 7.1 64bit
I have checked some dynamic views to develop monitoring scripts (still use AWR but want run scripts at anytime for quick check) related to CPU, Memory, IO and Paging for each sessions.
I used bellow script for CPU usage:
select
ss.username,
se.SID,
ss.status,
VALUE/100 cpu_usage_seconds
from
v$session ss,
v$sesstat se,
v$statname sn
where se.STATISTIC# = sn.STATISTIC#
and NAME like '%CPU used by this session%'
and se.SID = ss.SID
and ss.status in ('ACTIVE','INACTIVE')
and ss.username is not null