|
你好,按照你的方法进行了配置,但是在添加计数器里面没有选项,这是自定义的部分:
V$ Monitor]
Counters=150
CustomCounters=12
;How many seconds for each data sample?
SamplingRate=10
[Custom0]
;Name must be unique
Name=库快存命中率.
Description=该计数器返回当前库快存命中率
Query=SELECT 100*((sum(pins-reloads))/sum(pins)) from v$librarycache.
IsRate=0
[Custom1]
;Name must be unique
Name=高速缓存区命中率
Description=oracle database shoot straight.
Query=SELECT round(1-SUM(HYSICAL_READS)/(SUM(DB_BLOCK_GETS) + SUM(CONSISTENT_GETS)), 4) * 100 FROM (SELECT CASE WHEN NAME='physical reads' THEN VALUE END PHYSICAL_READS,CASE WHEN NAME = 'db block gets' THEN VALUE END DB_BLOCK_GETS,CASE WHEN NAME = 'consistent gets' THEN VALUE END CONSISTENT_GETS FROM V$SYSSTAT WHERE Name IN ('physical reads','db block gets','consistent gets'))
IsRate=0
[Custom2]
;Name must be unique
Name=共享区库缓存区命中率
Description=命中率应大于0.99.
Query=Select round(sum(pins-reloads)/sum(pins) * 100, 2) from v$librarycache
IsRate=0
[Custom3]
;Name must be unique
Name=共享区字典缓存区命中率
Description=命中率应大于0.85
Query=Select round(sum(gets-getmisses-usage-fixed)/sum(gets) * 100, 2) from v$rowcache
IsRate=0
[Custom4]
;Name must be unique
Name=检测回滚段的争用
Description=应该小于1%
Query=select round(sum(waits)/sum(gets) * 100, 2) from v$rollstat
IsRate=0
[Custom5]
;Name must be unique
Name=检测回滚段收缩次数
Description=应该小于1%
Query=select sum(shrinks) from v$rollstat, v$rollname where v$rollstat.usn = v$rollname.usn
IsRate=0
[Custom6]
;Name must be unique
Name=监控表空间的I/O读总数
Description=监控表空间的I/O
Query=select sum(f.phyrds) pyr from v$filestat f, dba_data_files df where f.file# = df.file_id
IsRate=0
[Custom7]
;Name must be unique
Name=监控表空间的I/O块读总数
Description=监控表空间的I/O
Query=select sum(f.phyblkrd) pbr from v$filestat f, dba_data_files df where f.file# = df.file_id
IsRate=0
[Custom8]
;Name must be unique
Name=监控表空间的I/O写总数
Description=监控表空间的I/O
Query=select sum(f.phywrts) pyw from v$filestat f, dba_data_files df where f.file# = df.file_id
IsRate=0
[Custom9]
;Name must be unique
Name=库快存命中率
Description=该计数器返回当前库快存命中率
Query=SELECT 100*((sum(pins-reloads))/sum(pins)) from v$librarycache
IsRate=0
[Custom10]
;Name must be unique
Name=监控表空间的 I/O块写总数
Description=监控表空间的I/O
Query=select sum(f.phyblkwrt) pbw from v$filestat f, dba_data_files df where f.file# = df.file_id
IsRate=0
[Custom11]
;Name must be unique
Name=监控 SGA 中重做日志缓存区的命中率
Description=应该小于1%
Query=SELECT Decode(immediate_gets+immediate_misses,0,0,immediate_misses/(immediate_gets+immediate_misses)*100) ratio2 FROM v$latch WHERE name IN ('redo copy')
IsRate=0
[Custom12]
;Name must be unique
Name=监控内存和硬盘的排序比率
Description=最好使它小于 10%
Query=select round(sum(case when name='sorts (disk)' then value else 0 end) / sum(case when name='sorts (memory)' then value else 0 end)*100,2) from (SELECT name, value FROM v$sysstatWHERE name IN ('sorts (memory)', 'sorts (disk)'))
IsRate=0
添加计数器的自定义计数器为空C:\Users\Administrator\Desktop
|
|