Windows operating system missing update KB2510206 to prevent performance issues when computer has more than 64 processors
http://go.microsoft.com/fwlink/?LinkId=235065
Target | Microsoft.KnowledgeServices.SQLServer.DBEngine | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | Alert | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Warning | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.KnowledgeServices.Library.PowerShellMonitorEx | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default | ||
Comment | SupportTopic=TBD;VersionNumber=1.0.0.0; |
<UnitMonitor ID="Monitor_AK563279" Comment="SupportTopic=TBD;VersionNumber=1.0.0.0;" Accessibility="Public" Enabled="true" Target="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="KnowledgeServicesLibrary!Microsoft.KnowledgeServices.Library.PowerShellMonitorEx" ConfirmDelivery="true">
<Category>Alert</Category>
<AlertSettings AlertMessage="MonitorMessageed60a8aaffb0452089775f3733d3da77">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/ProductVersion$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlVersion$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='RecommendedVersion']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ScriptName>AK563279.ps1</ScriptName>
<Parameters>
<Parameter>
<Name>MajorVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/MajorVersion$</Value>
</Parameter>
<Parameter>
<Name>MinorVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/MinorVersion$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlMajor</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlMajor$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlMinor</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlMinor$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlVersion$</Value>
</Parameter>
<Parameter>
<Name>LogicalProcessors</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$</Value>
</Parameter>
</Parameters>
<ScriptBody>
param($MajorVersion,$MinorVersion,$NtoskrnlMajor,$NtoskrnlMinor,$NtoskrnlVersion,$LogicalProcessors)
$ErrorActionPreference = "Stop"
# Set up the arguments
$scriptargs = new-object psobject
$scriptargs | add-member NoteProperty "MajorVersion" $MajorVersion
$scriptargs | add-member NoteProperty "MinorVersion" $MinorVersion
$scriptargs | add-member NoteProperty "NtoskrnlMajor" $NtoskrnlMajor
$scriptargs | add-member NoteProperty "NtoskrnlMinor" $NtoskrnlMinor
$scriptargs | add-member NoteProperty "NtoskrnlVersion" $NtoskrnlVersion
$scriptargs | add-member NoteProperty "LogicalProcessors" $LogicalProcessors
# Set up the output
$global:scriptoutput = new-object psobject
$scriptoutput | add-member NoteProperty "HasIssue" $false
$scriptoutput | add-member NoteProperty "RecommendedVersion" ""
#-----------------------------------------------------
# MAIN CODE SECTION
#-----------------------------------------------------
# Environment
$scriptenv = new-object psobject
$scriptenv | Add-Member NoteProperty "ErrorFlag" $false
# Helper functions
function GetRecommendedVersion([string]$NtoskrnlVersion){
# the fix builds are different depending upon service pack and GDR/LDR branch
# RTM GDR fix: 6.1.7600.16770 [use format 6.1.7600.16XXX to determine this]
# RTM LDR fix: 6.1.7600.20912 [use format 6.1.7600.20XXX to determine this]
# SP1 GDR fix: 6.1.7601.17568 [use format 6.1.7601.17XXX to determine this]
# SP1 LDR fix: 6.1.7601.21671 [use format 6.1.7601.21XXX to determine this]
$versionPrefix = $NtoskrnlVersion.Substring(0,11)
$actualVersion = [int]::Parse($NtoskrnlVersion.Substring(9))
$fixVersion = ""
switch ($versionPrefix) {
"6.1.7600.16"
{
if ($actualVersion -lt 16770){
$fixVersion = "6.1.7600.16770"
}
break
}
"6.1.7600.20"
{
if ($actualVersion -lt 20912){
$fixVersion = "6.1.7600.20912"
}
break
}
"6.1.7601.17"
{
if ($actualVersion -lt 17568){
$fixVersion = "6.1.7601.17568"
}
break
}
"6.1.7601.21"
{
if ($actualVersion -lt 21671){
$fixVersion = "6.1.7601.21671"
}
break
}
default {
break
}
}
return $fixVersion
}
# Main function
function AdvisorRule($scriptargs, $scriptoutput)
{
trap [Exception] {
$scriptenv.ErrorFlag = $true
continue
}
# Initialize parameters
$scriptoutput.HasIssue = $false
$scriptoutput.RecommendedVersion = ""
# Detection Logic
# check if the config point [SQL DB Engine]::[Product Version] is of the format 10.00
# only SQL Server 2008 is affected by this problem
# check if the config point [Windows Operating System]::[OSVersion] is of format 6.1.
# only Windows 2008 R2 is affected by this problem
if (
($scriptargs.MajorVersion -eq 10) -and
($scriptargs.MinorVersion -eq 0) -and
($scriptargs.NtoskrnlMajor -eq 6) -and
($scriptargs.NtoskrnlMinor -eq 1)
)
{
# check if the server has more than 64 processors
if ([int]::Parse($scriptargs.LogicalProcessors) -gt 64){
$scriptoutput.RecommendedVersion = GetRecommendedVersion $scriptargs.NtoskrnlVersion
if ($scriptoutput.RecommendedVersion -ne ""){
if($scriptenv.ErrorFlag -eq $false)
{
$scriptoutput.HasIssue = $true
}
}
}
}
}
AdvisorRule $scriptargs $scriptoutput
# set the output
$mom = new-object -comobject "MOM.ScriptAPI"
$bag = $mom.CreatePropertyBag()
if ($scriptoutput.HasIssue -ne $null)
{
$bag.AddValue("HasIssue", $scriptoutput.HasIssue)
}
if ($scriptoutput.RecommendedVersion -ne $null)
{
$bag.AddValue("RecommendedVersion", $scriptoutput.RecommendedVersion)
}
$bag
</ScriptBody>
<SnapIns/>
<TimeoutSeconds>300</TimeoutSeconds>
<Schedule>86397</Schedule>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<Not>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Not>
</SuccessExpression>
</Configuration>
</UnitMonitor>