此计数器显示每秒引发的异常数目。其中包括 .NET 异常以及转换为 .NET 异常的非托管异常,例如,非托管代码中的空指针引用异常将在托管代码中重新引发 .NET System.NullReferenceException;此计数器既包括已处理异常也包括未处理异常。异常应仅在极少情况下而不是在程序的正常控件流中发生;此计数器被设计为由于引发大比率异常 (>100s) 而发生潜在性能问题的指示器。此计数器不是一段时间的平均值;它显示最近两个样本中观测的值的差除以样本间隔时间的结果。
此规则收集 .NET Exceptions\# Exceptions Thrown/sec 性能计数器
Target | Microsoft.Windows.InternetInformationServices.6.2.WebServer |
Category | PerformanceCollection |
Enabled | False |
Instance Name | .NET CLR Exceptions |
Counter Name | # of Exceps Thrown / sec |
Frequency | 300 |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | System.Performance.OptimizedDataProvider | Default |
WriteToDB | WriteAction | Microsoft.SystemCenter.CollectPerformanceData | Default |
WriteToDW | WriteAction | Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.WebServer.NumberOfDotNetExceptionsThrownPerSecond" Enabled="false" Target="Microsoft.Windows.InternetInformationServices.6.2.WebServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="SystemPerf!System.Performance.OptimizedDataProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName># of Exceps Thrown / sec</CounterName>
<ObjectName>.NET CLR Exceptions</ObjectName>
<InstanceName>_Global_</InstanceName>
<AllInstances>false</AllInstances>
<Frequency>300</Frequency>
<Tolerance>5</Tolerance>
<ToleranceType>Percentage</ToleranceType>
<MaximumSampleSeparation>4</MaximumSampleSeparation>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>