AKN395853

Monitor_AKN395853 (UnitMonitor)

Windows operating system missing update KB2155311 to prevent performance issues on a NUMA based computer

Knowledge Base article:

External

http://go.microsoft.com/fwlink/?LinkId=259570

Element properties:

TargetMicrosoft.KnowledgeServices.SQLServer.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.KnowledgeServices.Library.PowerShellMonitorEx
RemotableTrue
AccessibilityPublic
Alert Message
Windows operating system missing update KB2155311 to prevent performance issues on a NUMA based computer
<Details>
<Content>You are missing Windows operating system update KB2155311. This update prevents a problem related to working set trimming in applications like SQL Server when the computer has more than one NUMA node. The problem happens when a thread requests a large amount of memory within the 4 GB physical memory address range of a specific NUMA node and the requested amount of memory is not available. Review the knowledge base article and apply the operating system update.</Content>
<CollectedInformation>
<Info>
<Name>Current NTOSKRNL version</Name>
<Value>{0}</Value>
</Info>
<Info>
<Name>Recommended NTOSKRNL version</Name>
<Value>{1}</Value>
</Info>
</CollectedInformation>
</Details>
RunAsDefault
CommentSupportTopic=TBD;VersionNumber=1.0.0.0;

Source Code:

<UnitMonitor ID="Monitor_AKN395853" 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="MonitorMessage439460b29f9546988232fe044fd21cd3">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='CurrentNTOSKRNLVersionOutput']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='RecommendedNTOSKRNLVersionOutput']$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ScriptName>AKN395853.ps1</ScriptName>
<Parameters>
<Parameter>
<Name>CurrentNTOSKRNLVersionInput</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlVersion$</Value>
</Parameter>
<Parameter>
<Name>NUMANodesTotalInput</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NumaNodesTotal$</Value>
</Parameter>
</Parameters>
<ScriptBody><Script>


param($CurrentNTOSKRNLVersionInput,$NUMANodesTotalInput)

$ErrorActionPreference = "Stop"

# Set up the arguments
$scriptargs = new-object psobject
$scriptargs | add-member NoteProperty "CurrentNTOSKRNLVersionInput" $CurrentNTOSKRNLVersionInput
$scriptargs | add-member NoteProperty "NUMANodesTotalInput" $NUMANodesTotalInput

# Set up the output
$global:scriptoutput = new-object psobject
$scriptoutput | add-member NoteProperty "HasIssue" $false
$scriptoutput | add-member NoteProperty "CurrentNTOSKRNLVersionOutput" ""
$scriptoutput | add-member NoteProperty "RecommendedNTOSKRNLVersionOutput" ""
#-----------------------------------------------------
# MAIN CODE SECTION
#-----------------------------------------------------

# Environment

$scriptenv = New-Object psobject
$scriptenv | Add-Member NoteProperty "RuntimeError" $false
$scriptenv | Add-Member NoteProperty "IsOSUpdateNeededEnv" $false
$scriptenv | Add-Member NoteProperty "RecommendedNTOSKRNLVersionEnv" ""


function IsOSUpdateNeeded()
{
if(-not [string]::IsNullOrEmpty($scriptargs.CurrentNTOSKRNLVersionInput))
{
if([version]($scriptargs.CurrentNTOSKRNLVersionInput) -ge [version]"6.1.7600.16385" -and `
[version]($scriptargs.CurrentNTOSKRNLVersionInput) -lt [version]"6.1.7600.20731")
{
$scriptenv.IsOSUpdateNeededEnv = $true
$scriptenv.RecommendedNTOSKRNLVersionEnv = "6.1.7600.20731"
}
}
}


# Main function

function AdvisorRule($scriptargs, $scriptoutput)
{
# All parameters should be populated outside of the main function.
# The main function should only include the detection logic so that it can be easily reused by the Atlanta authoring tool.

trap [Exception] {
$scriptenv.RuntimeError = $true
continue;
}

# Initialize parameters
$scriptoutput.HasIssue = $false
$scriptoutput.CurrentNTOSKRNLVersionOutput = ""
$scriptoutput.RecommendedNTOSKRNLVersionOutput = ""

# Set parameter values
IsOSUpdateNeeded

if($scriptenv.IsOSUpdateNeededEnv -eq $true -and $scriptargs.NUMANodesTotalInput -gt 1)
{
if($scriptenv.RuntimeError -eq $false)
{
$scriptoutput.HasIssue = $true
$scriptoutput.CurrentNTOSKRNLVersionOutput = $scriptargs.CurrentNTOSKRNLVersionInput
$scriptoutput.RecommendedNTOSKRNLVersionOutput = $scriptenv.RecommendedNTOSKRNLVersionEnv
}
}
}
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.CurrentNTOSKRNLVersionOutput -ne $null)
{
$bag.AddValue("CurrentNTOSKRNLVersionOutput", $scriptoutput.CurrentNTOSKRNLVersionOutput)
}

if ($scriptoutput.RecommendedNTOSKRNLVersionOutput -ne $null)
{
$bag.AddValue("RecommendedNTOSKRNLVersionOutput", $scriptoutput.RecommendedNTOSKRNLVersionOutput)
}

$bag

</Script></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>