Dell Server Performance DSMT

Dell.ManagedServer.ServerPerformanceDSMT (DataSourceModuleType)

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
DSP1 DataSource System.SimpleScheduler Default
PB1 ProbeAction Microsoft.Windows.PowerShellPropertyBagProbe Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Interval SecondsInterval Seconds for the Server Performance DSMT
LogLevelint$Config/LogLevel$LogLevelLogLevel for the Server Performance DSMT

Source Code:

<DataSourceModuleType ID="Dell.ManagedServer.ServerPerformanceDSMT" Accessibility="Public" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
<SchemaType>Windows!Microsoft.Windows.PowerShellSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="IntervalSeconds" type="xsd:integer"/>
<xsd:element name="SyncTime" type="xsd:string"/>
<xsd:element name="TimeoutSeconds" type="xsd:integer"/>
<xsd:element name="LogLevel" type="xsd:integer"/>
<xsd:element name="Warning" type="xsd:double"/>
<xsd:element name="Critical" type="xsd:double"/>
<xsd:element name="LowerWarning" type="xsd:double"/>
<xsd:element name="LowerCritical" type="xsd:double"/>
<xsd:element name="HighWarning" type="xsd:double"/>
<xsd:element name="HighCritical" type="xsd:double"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="LogLevel" Selector="$Config/LogLevel$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DSP1" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
</DataSource>
<ProbeAction ID="PB1" TypeID="Windows!Microsoft.Windows.PowerShellPropertyBagProbe">
<ScriptName>DellServerPerformanceCookDownUMT.ps1</ScriptName>
<ScriptBody><Script>
param($LogLevel, $Critical, $Warning, $HighWarning, $LowerWarning, $HighCritical, $LowerCritical)
$api = New-Object -comObject 'MOM.ScriptAPI'

$scriptname = "DelliSMServerPerformanceCookDownUMT"
$logDirectory = "DellManagedServeriSM_log"

try
{
$ErrorActionPreference = "SilentlyContinue"
if ($LogLevel -ne 0)
{
$TempFolder = $env:SystemRoot + "\Temp"
$LogLocation = $TempFolder + "\" + $logDirectory + "\"
If(!(Test-Path -path($TempFolder)))
{
# create the directory if not present
New-Item $TempFolder -type directory
}

If(!(Test-Path -path($LogLocation)))
{
# create the directory if not present
New-Item $LogLocation -type directory
}
$Global:LogFileLocation = $LogLocation + $scriptname + ".log"
If(!(Test-Path -path($LogFileLocation)))
{
# create the file if it does not exist
New-Item $LogFileLocation -type file
}
Else
{
$logFileSize = Get-ChildItem $LogFileLocation | ForEach-Object {($_.Length/1KB)}
If ($logFileSize -gt 512)
{
# existingLogFile is greater than 512 KB
$archiveTime = Get-Date -f "yyyy-MM-dd_HH.mm"
Rename-Item $LogFileLocation ("ArchivedLog_" + $scriptname + "_" + $archiveTime + ".log")
New-Item $LogFileLocation -type file
}
}
}
}
catch
{
$ErrorMessage = $_.Exception.Message
$FailedItem = $_.Exception.ItemName
$message = "Exception in creating log file. Exception-Message:" + $ErrorMessage + $FailedItem
$api.LogScriptEvent("DellServerHealthCookDownUMT.ps1",1345,0,$message)
}
Function psDebugLog
{
param($level, $message)
if (($level -gt 0) -and ($level -le $LogLevel))
{
$currentTime = Get-Date -f "yyyy-MM-dd_HH.mm.ss"
Out-File -FilePath $LogFileLocation -InputObject ($currentTime + " :: " + $message) -Append -EA SilentlyContinue
}
}

psDebugLog -level 1 -message "Server Performance CookDownUMT Script is Started"

# Update for all profiles inventory.
$profiles = @(
"DCIM_SystemView",
"DCIM_PSNumericSensor",
"DCIM_NumericSensor",
"DCIM_AggregationMetricValue",
"DCIM_BaseMetricValue",
"DCIM_NICStatistics",
"DCIM_PCIeSSDView"
)

$hash_profileInstances = @{}

foreach($profile in $profiles)
{
psDebugLog -level 1 -message ("Health UMT Retriving " + $profile + " Profile")
Try
{
$ErrorActionPreference = "SilentlyContinue"
$ProfileInstances = Get-CimInstance -Namespace root\cimv2\dcim -ClassName $profile
#Converting single-objects into arrays, as some profiles are not arrrays
if($ProfileInstances -ne $null)
{
if($ProfileInstances -isnot [system.array])
{
$temparray = @()
$temparray += $ProfileInstances
$ProfileInstances = $temparray
}
# Then add array into Hash Map.
$hash_profileInstances.Add($profile, $ProfileInstances)
}
}
Catch
{
$ErrorMessage = $_.exception.Message
psDebugLog -level 1 -message "Exception in Retriving Profile " + $profile + " Exception-Message:" + $ErrorMessage
}
}
$dcimSystemViewArray = $hash_profileInstances.Item("DCIM_SystemView")
$dcimSystemView = $null
if($dcimSystemViewArray -ne $null){
$dcimSystemView = $dcimSystemViewArray[0];
}

$dcimPSNumericSensorArray = $hash_profileInstances.Item("DCIM_PSNumericSensor")
$dcimNumericSensorArray = $hash_profileInstances.Item("DCIM_NumericSensor")
$dcimAggregationMetricValueArray = $hash_profileInstances.Item("DCIM_AggregationMetricValue")
$dcimBaseMetricValueArray = $hash_profileInstances.Item("DCIM_BaseMetricValue")
$dcimNicStatisticsArray = $hash_profileInstances.Item("DCIM_NICStatistics")
$dcimPCIeSSDViewArray = $hash_profileInstances.Item("DCIM_PCIeSSDView")

if($dcimSystemView -ne $null)
{
if(($dcimPSNumericSensorArray -ne $null) -and ($dcimPSNumericSensorArray.count -gt 0))
{
foreach($dcimPSNumericSensor in $dcimPSNumericSensorArray)
{
$deviceId = $dcimPSNumericSensor.DeviceID
$currentReading = $dcimPSNumericSensor.CurrentReading
$unitModifier = $dcimPSNumericSensor.UnitModifier
$lcaseDeviceID = $deviceId.ToLower()
$status = "Normal"
#Condition for power consumption performance graph: If the device Id contains 'pwrconsumption', then this condition will proceed.
if ($lcaseDeviceID.Contains("pwrconsumption"))
{
psDebugLog -level 1 -message ("Power Consumption Performance UMT is started")

If ($currentReading -ge 0)
{
psDebugLog -level 1 -message ("Power Consumption Performance UMT for PSInstance: " + $deviceId + ", CurrentReading: " +$currentReading)

if($currentReading -ge $Critical)
{
$status = "Error"
}
elseif(($currentReading -lt $Critical) -and ($currentReading -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PowerSupplyNumericSensor")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$currentReading)
$propertyBag.AddValue("PerformanceMetricName","Power Consumption (Watts)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}

psDebugLog -level 1 -message "Power Consumption Performance UMT Script is Ended"
}

#Condition for Amperage Power Supply 1 performance graph: If the device Id contains 'ps1current1', then this condition will proceed.
if ($lcaseDeviceID.Contains("ps1current1"))
{
$status = "Normal"
psDebugLog -level 1 -message ("Amperage Power Supply 1 Perf UMT is started")
if ($currentReading -ge 0)
{
$perValue = $currentReading * [Math]::Pow(10,$unitModifier)
psDebugLog -level 1 -message ("Amperage Power Supply 1 UMT for PSInstance:" + $deviceId + ", CurrentReading: " +$perValue)
if($perValue -ge $Critical)
{
$status = "Error"
}
elseif(($perValue -lt $Critical) -and ($perValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AmperagePowerPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$perValue)
$propertyBag.AddValue("PerformanceMetricName","Amperage Power Supply 1(Amps)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "Amperage Power Supply 1 UMT Script is Ended"
}

#Condition for Amperage Power Supply 2 performance graph: If the device Id contains 'ps2current2', then this condition will proceed.
if ($lcaseDeviceID.Contains("ps2current2"))
{
$status = "Normal"
psDebugLog -level 1 -message ("Amperage Power Supply 2 Perf UMT is started")
if ($currentReading -ge 0)
{
$perValue = $currentReading * [Math]::Pow(10,$unitModifier)
psDebugLog -level 1 -message ("Amperage Power Supply 2 UMT for PSInstance:" + $deviceId + ", CurrentReading: " +$perValue)
if($perValue -ge $Critical)
{
$status = "Error"
}
elseif(($perValue -lt $Critical) -and ($perValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AmperagePowerPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$perValue)
$propertyBag.AddValue("PerformanceMetricName","Amperage Power Supply 2(Amps)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "Amperage Power Supply 2 UMT Script is Ended"
}

}
}
if(($dcimNumericSensorArray -ne $null) -and ($dcimNumericSensorArray.count -gt 0))
{
psDebugLog -level 1 -message ("AmbientTempPerf UMT is started")
foreach($dcimNumericSensor in $dcimNumericSensorArray)
{
$deviceId = $dcimNumericSensor.DeviceID
$currentReading = $dcimNumericSensor.CurrentReading
$unitModifier = $dcimNumericSensor.UnitModifier
$lcaseDeviceID = $deviceId.ToLower()
#Condition for Ambient SystemBoardInlet Temperature performance graph: If the device Id contains 'inlet', then this condition will proceed.
if ($lcaseDeviceID.Contains("inlet"))
{
$status = "Normal"
$perValue = $currentReading * [Math]::Pow(10,$unitModifier)
psDebugLog -level 1 -message ("AmbientTempPerfInlet UMT for NSInstance:" + $deviceId + ", CurrentReading: " +$perValue)
if(($perValue -ge $HighCritical) -or ($perValue -le $LowerCritical))
{
$status = "Error"
}
elseif((($perValue -lt $HighCritical) -and ($perValue -ge $HighWarning)) -or
(($perValue -gt $LowerCritical) -and ($perValue -le $LowerWarning)))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AmbientTempPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$perValue)
$propertyBag.AddValue("PerformanceMetricName","Ambient SystemBoardInlet Temperature(centigrade)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
#Condition for Ambient SystemBoardExhaust Temperature performance graph: If the device Id contains 'exhaust', then this condition will proceed.
if ($lcaseDeviceID.Contains("exhaust"))
{
if ($currentReading -ge 0)
{
$status = "Normal"
$perValue = $currentReading * [Math]::Pow(10,$unitModifier)
psDebugLog -level 1 -message ("AmbientTempPerfExhaust UMT for NSInstance:" + $deviceId + ", CurrentReading: " +$perValue)
if(($perValue -ge $HighCritical) -or ($perValue -le $LowerCritical))
{
$status = "Error"
}
elseif((($perValue -lt $HighCritical) -and ($perValue -ge $HighWarning)) -or
(($perValue -gt $LowerCritical) -and ($perValue -le $LowerWarning)))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AmbientTempPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$perValue)
$propertyBag.AddValue("PerformanceMetricName","Ambient SystemBoardExhaust Temperature(centigrade)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
}
}
psDebugLog -level 1 -message "AmbientTempPerf UMT Script is Ended"
}

if(($dcimAggregationMetricValueArray -ne $null) -and ($dcimAggregationMetricValueArray.count -gt 0))
{
foreach($dcimAggregationMetricValue in $dcimAggregationMetricValueArray)
{
$instanceId = $dcimAggregationMetricValue.InstanceID
$metricValue = $dcimAggregationMetricValue.MetricValue
$lcaseInstanceId = $instanceId.ToLower()

#Condition for Peak Power performance graph: If the Instance Id contains all of these 'power', 'max, 'cont' then this condition will proceed.
if (($lcaseInstanceId.Contains("power")) -and ($lcaseInstanceId.Contains("max")) -and ($lcaseInstanceId.Contains("cont")))
{
psDebugLog -level 1 -message ("Peak Power Performance UMT is started")
if (($lcaseInstanceId.Contains("powerhdrm")) -eq $false)
{
$status = "Normal"
psDebugLog -level 1 -message ("Peak Power Performance UMT for Peak Power Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakPowerPerf")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","Peak Power")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
}
psDebugLog -level 1 -message ("Peak Power Performance UMT Script is Ended")
}

#Condition for Peak Amperage performance graph: If the Instance Id contains both of these 'current', 'max' then this condition will proceed.
if (($lcaseInstanceId.Contains("current")) -and ($lcaseInstanceId.Contains("max")))
{
$status = "Normal"
psDebugLog -level 1 -message ("Peak Amperage Performance UMT is started")
if ($metricValue -ge 0)
{
$metricValue = $metricValue / 10
psDebugLog -level 1 -message ("Peak Amperage Performance UMT for Peak Amperage Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakAmperagePerf")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","Peak Amperage")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("Peak Amperage Performance UMT Script is Ended")
}

#Condition for Peak Headroom performance graph: If the Instance Id contains both of these 'powerhdrm', 'max' then this condition will proceed.
if (($lcaseInstanceId.Contains("powerhdrm")) -and ($lcaseInstanceId.Contains("max")))
{
$status = "Normal"
psDebugLog -level 1 -message ("Peak Headroom Performance UMT is started")
psDebugLog -level 1 -message ("Peak Headroom Performance UMT for Peak Power Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakHeadroomPerf")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","Peak Headroom")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("Peak Headroom Performance UMT Script is Ended")
}

#Condition for System Board Average Memory Usage performance graph: If the Instance Id contains all of these 'systemboard', 'avg', 'memoryusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("avg")) -and ($lcaseInstanceId.Contains("memoryusage")) -and
($lcaseInstanceId.Contains("1h")))
{
$status = "Normal"
psDebugLog -level 1 -message ("System Board Average Memory Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Average Memory Usage Performance UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AverageMemoryUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Average Memory Usage(last hour)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Average Memory Usage Performance UMT Script is Ended")
}

#Condition for System Board Maximum Memory Usage performance graph: If the Instance Id contains all of these 'systemboard', 'max', 'memoryusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("max")) -and ($lcaseInstanceId.Contains("memoryusage")) -and
($lcaseInstanceId.Contains("1h")))
{
psDebugLog -level 1 -message ("System Board Maximum Memory Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Maximum Memory Usage Performance UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.MaxMemoryUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Maximum Memory Usage(last hour)")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Maximum Memory Usage Performance UMT Script is Ended")
}

#Condition for System Board Peak Memory Usage performance graph: If the Instance Id contains all of these 'systemboard', 'peak', 'memoryusage' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("peak")) -and ($lcaseInstanceId.Contains("memoryusage")))
{
psDebugLog -level 1 -message ("System Board Peak Memory Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Peak Memory Usage Performance UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakMemoryUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Peak Memory Usage")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Peak Memory Usage Performance UMT Script is Ended")
}

#Condition for System Board Average IO Usage performance graph: If the Instance Id contains all of these 'systemboard', 'avg', 'iousage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("avg")) -and ($lcaseInstanceId.Contains("iousage")) -and
($lcaseInstanceId.Contains("1h")))
{
$status = "Normal"
psDebugLog -level 1 -message ("System Board Average IO Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Average IO Usage Performance UMT UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AvgIOUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Average IO Usage(last hour)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Average IO Usage Performance UMT Script is Ended")
}

#Condition for System Board Maximum IO Usage performance graph: If the Instance Id contains all of these 'systemboard', 'max', 'iousage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("max")) -and ($lcaseInstanceId.Contains("iousage")) -and
($lcaseInstanceId.Contains("1h")))
{
psDebugLog -level 1 -message ("System Board Maximum IO Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Maximum IO Usage Performance UMT UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.MaxIOUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Maximum IO Usage(last hour)")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Maximum IO Usage Performance UMT Script is Ended")
}

#Condition for System Board Peak IO Usage performance graph: If the Instance Id contains all of these 'systemboard', 'peak', 'iousage' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("peak")) -and ($lcaseInstanceId.Contains("iousage")))
{
psDebugLog -level 1 -message ("System Board peak IO Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board peak IO Usage Performance UMT UMT for Instance: " + $instanceId + ", MetricValue: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakIOUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Peak IO Usage")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Peak IO Usage Performance UMT Script is Ended")
}

#Condition for System Board Maximum SYS Usage performance graph: If the Instance Id contains all of these 'systemboard', 'max', 'sysusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("max")) -and ($lcaseInstanceId.Contains("sysusage")) -and ($lcaseInstanceId.Contains("1h")))
{
psDebugLog -level 1 -message ("System Board Maximum SYS Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Maximum SYS Usage Performance UMT for Max Power Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.MaxCUPSUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Maximum SYS Usage(last hour)")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Maximum SYS Usage Performance UMT Script is Ended")
}

#Condition for System Board Peak SYS Usage performance graph: If the Instance Id contains all of these 'systemboard', 'peak', 'sysusage' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("peak")) -and ($lcaseInstanceId.Contains("sysusage")))
{
psDebugLog -level 1 -message ("System Board Peak SYS Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Peak SYS Usage Performance UMT for Peak CUPS Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakCUPSUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Peak SYS Usage")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Peak SYS Usage Performance UMT Script is Ended")
}

#Condition for System Board Average SYS Usage performance graph: If the Instance Id contains all of these 'systemboard', 'avg', 'sysusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("avg")) -and ($lcaseInstanceId.Contains("sysusage")) -and ($lcaseInstanceId.Contains("1h")))
{
$status = "Normal"
psDebugLog -level 1 -message ("System Board Average SYS Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Average SYS Usage Performance UMT for Average CUPS Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AvgCUPSUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Average SYS Usage(last hour)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Average SYS Usage Performance UMT Script is Ended")
}

#Condition for System Board Average SYS Usage performance graph: If the Instance Id contains all of these 'systemboard', 'avg', 'sysusage', '1d' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("avg")) -and ($lcaseInstanceId.Contains("sysusage")) -and ($lcaseInstanceId.Contains("1d")))
{
psDebugLog -level 1 -message ("Capacity Planning Check Performance Graph Script is started")
psDebugLog -level 1 -message ("Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AvgCUPSUtilizationPerDay")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","Capacity Check System Board Average SYS Usage(last day)")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("Capacity Planning Check Performance Graph Script is Ended")
}

#Condition for System Board Maximum CPU Usage performance graph: If the Instance Id contains all of these 'systemboard', 'max', 'cpuusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("max")) -and ($lcaseInstanceId.Contains("cpuusage")) -and ($lcaseInstanceId.Contains("1h")))
{
psDebugLog -level 1 -message ("System Board Maximum CPU Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Maximum CPU Usage Performance UMT for Max Power Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.MaxSystemCPUUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Maximum CPU Usage(last hour)")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Maximum CPU Usage Performance UMT Script is Ended")
}

#Condition for System Board Peak CPU Usage performance graph: If the Instance Id contains both of these 'peak', 'cpuusage' then this condition will proceed.
if (($lcaseInstanceId.Contains("peak")) -and ($lcaseInstanceId.Contains("cpuusage")))
{
psDebugLog -level 1 -message ("System Board Peak CPU Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Peak CPU Usage Performance UMT for Peak CUPS Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.PeakSystemCPUUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Peak CPU Usage")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Peak CPU Usage Performance UMT Script is Ended")
}

#Condition for System Board Average CPU Usage performance graph: If the Instance Id contains all of these 'systemboard', 'avg', 'cpuusage', '1h' then this condition will proceed.
if (($lcaseInstanceId.Contains("systemboard")) -and ($lcaseInstanceId.Contains("avg")) -and ($lcaseInstanceId.Contains("1h")) -and ($lcaseInstanceId.Contains("cpuusage")))
{
$status = "Normal"
psDebugLog -level 1 -message ("System Board Average CPU Usage Performance UMT is started")
psDebugLog -level 1 -message ("System Board Average CPU Usage Performance UMT for Average CUPS Instance: " + $instanceId + ", Metric Value: " + $metricValue)
if ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.AvgSystemCPUUtilization")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","System Board Average CPU Usage(last hour)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("System Board Average CPU Usage Performance UMT Script is Ended")
}
}
}

if(($dcimBaseMetricValueArray -ne $null) -and ($dcimBaseMetricValueArray.count -gt 0))
{

foreach($dcimBaseMetricValue in $dcimBaseMetricValueArray)
{
$instanceId = $dcimBaseMetricValue.InstanceID
$energyMetricValue = $dcimBaseMetricValue.MetricValue
$metricValue = $dcimBaseMetricValue.MetricValue
$className = "Dell.ManagedServer.EnergyConsPerf"
$lcaseInstanceId = $instanceId.ToLower()

#Condition for Energy Consumption performance graph: If the Instance Id contains 'energy' then this condition will proceed.
if ($lcaseInstanceId.Contains("energy"))
{
$status = "Normal"
psDebugLog -level 1 -message ("Energy Consumption Performance UMT is started")
psDebugLog -level 1 -message ("Energy Consumption UMT for EnergyConsInstance:"+ $instanceId + ", Metric Value: " + $energyMetricValue)
If ($energyMetricValue -ge 0)
{
if($energyMetricValue -ge $Critical)
{
$status = "Error"
}
elseif(($energyMetricValue -lt $Critical) -and ($energyMetricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType",$className)
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$energyMetricValue)
$propertyBag.AddValue("PerformanceMetricName","Energy Consumption(KWh)")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "Energy Consumption Performance UMT Script is Ended"
}

#Condition for Instantaneous Headroom performance graph: If the Instance Id contains 'powerhdrm' then this condition will proceed.
if ($lcaseInstanceId.Contains("powerhdrm"))
{
$status = "Normal"
psDebugLog -level 1 -message ("Instant Headroom Performance UMT is started")
psDebugLog -level 1 -message ("Instant Headroom Performance UMT for HeadroomInstance:"+ $instanceId + ", Metric Value: " + $metricValue)
If ($metricValue -ge 0)
{
if($metricValue -ge $Critical)
{
$status = "Error"
}
elseif(($metricValue -lt $Critical) -and ($metricValue -ge $Warning))
{
$status = "Warning"
}
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.InstantHeadroomPerf")
$propertyBag.AddValue("InstanceIndex",$instanceId)
$propertyBag.AddValue("PerformanceValue",$metricValue)
$propertyBag.AddValue("PerformanceMetricName","Instantaneous Headroom")
$propertyBag.AddValue("Status", $status)
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "Instant Headroom Performance UMT Script is Ended"
}
}
}

if(($dcimNicStatisticsArray -ne $null) -and ($dcimNicStatisticsArray.count -gt 0))
{
psDebugLog -level 1 -message ("NIC Transmitted Bytes Performance UMT is started")
foreach($dcimNicStatistics in $dcimNicStatisticsArray)
{
$deviceId = $dcimNicStatistics.FQDD
$performanceValue = $dcimNicStatistics.TxBytes
if( ($performanceValue -eq $null) -or ($performanceValue -eq "") -or ($performanceValue -eq "Not Available"))
{
$performanceValue = 0
}
if ($performanceValue -ge 0)
{
psDebugLog -level 1 -message ("NIC Transmitted Bytes Performance UMT for NIC: " + $deviceId + ", PerformanceValue: " +$performanceValue)
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.NICTxBytesPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$performanceValue)
$propertyBag.AddValue("PerformanceMetricName","NIC Transmitted Bytes")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "NIC Transmitted Bytes Performance UMT Script is Ended"

#NIC Received Packets
psDebugLog -level 1 -message ("NIC Received Packets Performance UMT is started")
$performanceMulticast = $dcimNicStatistics.RxMutlicast
$performanceUnicast = $dcimNicStatistics.RxUnicast
if( ($performanceMulticast -eq $null) -or ($performanceMulticast -eq "") -or ($performanceMulticast -eq "Not Available"))
{
$multiCast = 0
}
Else
{
$multiCast = [Double]($performanceMulticast)
}
if( ($performanceUnicast -eq $null) -or ($performanceUnicast -eq "") -or ($performanceUnicast -eq "Not Available"))
{
$uniCast = 0
}
Else
{
$uniCast = [Double]($performanceUnicast)
}
$performanceValue = $multiCast + $uniCast
if ($performanceValue -ge 0)
{
psDebugLog -level 1 -message ("NIC Received Packets Performance UMT for NIC: " + $deviceId + ", PerformanceValue: " +$performanceValue)
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.NICRxPacketsPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$performanceValue)
$propertyBag.AddValue("PerformanceMetricName","NIC Received Packets")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "NIC Received Packets Performance UMT Script is Ended"

#Received NIC Bytes
psDebugLog -level 1 -message ("NIC Received Bytes Performance UMT is started")
$value = $dcimNicStatistics.RxBytes

If ( ($value -eq $null) -OR ($value -eq "") -OR ($value -eq "Not Available"))
{
$value = 0
}

If ($value -ge 0)
{
psDebugLog -level 1 -message ("NIC Received Bytes Performance UMT for NICRXBytes Instance: " + $deviceId + ", PerformanceValue: " + $value)

$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.NICRxBytesPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$value)
$propertyBag.AddValue("PerformanceMetricName","NIC Received Bytes")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("NIC Received Bytes Performance UMT Script is Ended")

#NICTxPacketsPerf
psDebugLog -level 1 -message ("NIC Transmitted Packets Performance UMT is started")
$multivalue = $dcimNicStatistics.TxMutlicast
$univalue = $dcimNicStatistics.TxUnicast

If ( ($multivalue -eq $null) -OR ($multivalue -eq "") -OR ($multivalue -eq "Not Available"))
{
$multivalue = 0
}
ELSE
{
$multivalue = [Double]($multivalue)
}

If ( ($univalue -eq $null) -OR ($univalue -eq "") -OR ($univalue -eq "Not Available"))
{
$univalue = 0
}
ELSE
{
$univalue = [Double]($univalue)
}

$value = $multivalue + $univalue

If ($value -ge 0)
{
psDebugLog -level 1 -message ("NIC Transmitted Packets Performance UMT for NICTxPackets Instance: " + $deviceId + ", PerformanceValue: " + $value)

$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.NICTxPacketsPerf")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$value)
$propertyBag.AddValue("PerformanceMetricName","NIC Transmitted Packets")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message ("NIC Transmitted Packets Performance UMT Script is Ended")
}
}

#Disk Performance
if(($dcimPCIeSSDViewArray -ne $null) -and ($dcimPCIeSSDViewArray.count -gt 0))
{
psDebugLog -level 1 -message ("Disk Performance UMT is started")
foreach($dcimPCIeSSD in $dcimPCIeSSDViewArray)
{
$deviceId = $dcimPCIeSSD.FQDD
$remainingRatedWriteEndurance = $dcimPCIeSSD.RemainingRatedWriteEndurance
if ($remainingRatedWriteEndurance -ge 0)
{
psDebugLog -level 1 -message ("Disk Performance UMT for disk: " + $deviceId + ", PerformanceValue: " +$remainingRatedWriteEndurance)
$propertyBag = $api.CreatePropertyBag()
$propertyBag.AddValue("ComponentType","Dell.ManagedServer.SSDWear")
$propertyBag.AddValue("InstanceIndex",$deviceId)
$propertyBag.AddValue("PerformanceValue",$remainingRatedWriteEndurance)
$propertyBag.AddValue("PerformanceMetricName","SSD Wear Percentage")
$api.AddItem($propertyBag)
$propertyBag
}
psDebugLog -level 1 -message "Disk Performance UMT Script is Ended"
}
}
}
psDebugLog -level 1 -message "Server Performance CookDownUMT Script is Ended"
</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>LogLevel</Name>
<Value>$Config/LogLevel$</Value>
</Parameter>
<Parameter>
<Name>Critical</Name>
<Value>$Config/Critical$</Value>
</Parameter>
<Parameter>
<Name>Warning</Name>
<Value>$Config/Warning$</Value>
</Parameter>
<Parameter>
<Name>HighWarning</Name>
<Value>$Config/HighWarning$</Value>
</Parameter>
<Parameter>
<Name>LowerWarning</Name>
<Value>$Config/LowerWarning$</Value>
</Parameter>
<Parameter>
<Name>HighCritical</Name>
<Value>$Config/HighCritical$</Value>
</Parameter>
<Parameter>
<Name>LowerCritical</Name>
<Value>$Config/LowerCritical$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PB1">
<Node ID="DSP1"/>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>