JVM 垃圾回收器回收计数更改率

Microsoft.JEE.ApplicationServer.PerformanceData.GCCollectionCountDelta (Rule)

Java 虚拟机示例之间的指定垃圾回收器的垃圾回收次数变化。

Knowledge Base article:

摘要

GCCollectionCountDelta 规则通过对使用 /Stats 查询的 servlet 进行 Stats 调用从 Java 虚拟机中收集性能数据,然后该规则计算当前的抽样值与以前的抽样值之间的差异。

Java 虚拟机示例之间的垃圾回收次数变化。

性能数据将写入系统数据库和数据仓库。

Element properties:

TargetMicrosoft.JEE.GarbageCollector
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.JEE.Monitoring.UrlProbe.Stats.DataSource Default
PerfMapper ConditionDetection Microsoft.JEE.DeltaMapper Default
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.JEE.ApplicationServer.PerformanceData.GCCollectionCountDelta" Target="Microsoft.JEE.GarbageCollector" Enabled="true" Remotable="true">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.JEE.Monitoring.UrlProbe.Stats.DataSource">
<ComputerName>$Target/Host/Property[Type="Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</ComputerName>
<Protocol>$Target/Host/Property[Type="Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Protocol$</Protocol>
<Port>$Target/Host/Property[Type="Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Port$</Port>
<BaseURL/>
<URLSuffix/>
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</DataSources>
<ConditionDetection TypeID="Microsoft.JEE.DeltaMapper" ID="PerfMapper">
<ObjectName>Garbage Collector</ObjectName>
<CounterName>JVM Garbage Collector Collection Count Change Rate</CounterName>
<InstanceName>$Target/Property[Type="Microsoft.JEE.GarbageCollector"]/GarbageCollectorName$</InstanceName>
<!-- Need to find the GCCollectionCount that has a sibling element -->
<!-- called GCName with a value of (for example) "PS Scavenge" -->
<!-- XPath should look like: -->
<!-- /Stats/GC/Properties/GCCollectionCount[../GCName = "PS Scavenge"] -->
<Value>$Data/Stats/GC/Properties/GCCollectionCount[../GCName = "$Target/Property[Type="Microsoft.JEE.GarbageCollector"]/GarbageCollectorName$"]$</Value>
<NumSamples>1</NumSamples>
<Absolute>true</Absolute>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>