Windows operating system missing update KB2155311 to prevent performance issues on a NUMA based computer
http://go.microsoft.com/fwlink/?LinkId=259570
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_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>
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
</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>