RDS/TS counters (custom)

Feb 23, 2011 at 7:39 AM

I've been using this today to analyze a new RDS server.  It is extremely simple and as of yet has no thresholds, but should generate some pretty graphs for the PTB (Powers That Be) to look at.

Not sure how to distribute the file so will attempt to paste the xml file content into the next response.

Feb 23, 2011 at 7:40 AM

<?xml version="1.0"?>
<PAL NAME="RDS-Simple" DESCRIPTION="Very simple RDS performance analyzer based on &quot;well known&quot; Microsoft values and personal experience.  Need assistance configuring threshold values/formulas.&#xD;&#xA;Additional reference:&#xD;&#xA;http://www.virtualizationadmin.com/articles-tutorials/terminal-services/general/windows-performance-monitor-baseline-terminal-server-part1.html" VERSION="1.0" PALVERSION="2.0" CONTENTOWNERS="Steve" FEEDBACKEMAILADDRESS="sdixon2006@hotmail.com">
  <ANALYSIS NAME="LogicalDisk Avg. Disk Queue Length" ENABLED="True" CATEGORY="LogicalDisk" PRIMARYDATASOURCE="\LogicalDisk(*)\Avg. Disk Queue Length" ID="d6e6094f-0d89-493e-9943-f69943edcc89" FROMALLCOUNTERSTATS="False">
    <DESCRIPTION><![CDATA[Avg. Disk Queue Length is the average number of both read and write requests that were queued for the selected disk during the sample interval.]]></DESCRIPTION>
    <DATASOURCE TYPE="CounterLog" NAME="\LogicalDisk(*)\Avg. Disk Queue Length" COLLECTIONVARNAME="CollectionOfLogicalDiskAvgDiskQueueLength" EXPRESSIONPATH="\LogicalDisk(*)\Avg. Disk Queue Length" TRENDVARNAME="TrendLogicalDiskAvgDiskQueueLength" DATATYPE="integer" />
    <CHART CHARTTITLE="\LogicalDisk(*)\Avg. Disk Queue Length" ISTHRESHOLDSADDED="False" DATASOURCE="\LogicalDisk(*)\Avg. Disk Queue Length" CHARTLABELS="instance" />
  </ANALYSIS>
  <ANALYSIS NAME="Memory Available MBytes" ENABLED="True" CATEGORY="Memory" PRIMARYDATASOURCE="\Memory\Available MBytes" ID="fad1211c-ccd3-4936-95d7-b5e3f1ac26ca" FROMALLCOUNTERSTATS="False">
    <DATASOURCE TYPE="CounterLog" NAME="\Memory\Available MBytes" COLLECTIONVARNAME="CollectionOfMemoryAvailableMBytes" EXPRESSIONPATH="\Memory\Available MBytes" TRENDVARNAME="TrendMemoryAvailableMBytes" DATATYPE="integer" />
    <CHART CHARTTITLE="\Memory\Available MBytes" ISTHRESHOLDSADDED="False" DATASOURCE="\Memory\Available MBytes" CHARTLABELS="instance" />
    <DESCRIPTION><![CDATA[Available MBytes is the amount of physical memory, in Megabytes, immediately available for allocation to a process or for system use. It is equal to the sum of memory assigned to the standby (cached), free and zero page lists. For a full explanation of the memory manager, refer to MSDN and/or the System Performance and Troubleshooting Guide chapter in the Windows Server 2003 Resource Kit.]]></DESCRIPTION>
  </ANALYSIS>
  <ANALYSIS NAME="Network Interface Bytes Sent/sec" ENABLED="True" CATEGORY="Network Interface" PRIMARYDATASOURCE="\Network Interface(*)\Bytes Sent/sec" ID="8cd8ffb3-e95a-44dc-9c94-2f8729938be4" FROMALLCOUNTERSTATS="False">
    <DESCRIPTION><![CDATA[Bytes Sent/sec is the rate at which bytes are sent over each network adapter, including framing characters. Network Interface\Bytes Sent/sec is a subset of Network Interface\Bytes Total/sec.]]></DESCRIPTION>
    <DATASOURCE TYPE="CounterLog" NAME="\Network Interface(*)\Bytes Sent/sec" COLLECTIONVARNAME="CollectionOfNetworkInterfaceBytesSentsec" EXPRESSIONPATH="\Network Interface(*)\Bytes Sent/sec" TRENDVARNAME="TrendNetworkInterfaceBytesSentsec" DATATYPE="integer" />
    <CHART CHARTTITLE="\Network Interface(*)\Bytes Sent/sec" ISTHRESHOLDSADDED="False" DATASOURCE="\Network Interface(*)\Bytes Sent/sec" CHARTLABELS="instance" />
  </ANALYSIS>
  <ANALYSIS NAME="Network Interface Bytes Received/sec" ENABLED="True" CATEGORY="Network Interface" PRIMARYDATASOURCE="\Network Interface(*)\Bytes Received/sec" ID="4220b19b-b28d-4fff-837e-136cf5918085" FROMALLCOUNTERSTATS="False">
    <DESCRIPTION><![CDATA[Bytes Received/sec is the rate at which bytes are received over each network adapter, including framing characters. Network Interface\Bytes Received/sec is a subset of Network Interface\Bytes Total/sec.]]></DESCRIPTION>
    <DATASOURCE TYPE="CounterLog" NAME="\Network Interface(*)\Bytes Received/sec" COLLECTIONVARNAME="CollectionOfNetworkInterfaceBytesReceivedsec" EXPRESSIONPATH="\Network Interface(*)\Bytes Received/sec" TRENDVARNAME="TrendNetworkInterfaceBytesReceivedsec" DATATYPE="integer" />
    <CHART CHARTTITLE="\Network Interface(*)\Bytes Received/sec" ISTHRESHOLDSADDED="False" DATASOURCE="\Network Interface(*)\Bytes Received/sec" CHARTLABELS="instance" />
  </ANALYSIS>
  <ANALYSIS NAME="Paging File % Usage" ENABLED="True" CATEGORY="Paging File" PRIMARYDATASOURCE="\Paging File(*)\% Usage" ID="c1430b71-5e06-4e82-8fba-86a43d31a9fa" FROMALLCOUNTERSTATS="False">
    <DESCRIPTION><![CDATA[The amount of the Page File instance in use in percent.  See also Process\\Page File Bytes.]]></DESCRIPTION>
    <DATASOURCE TYPE="CounterLog" NAME="\Paging File(*)\% Usage" COLLECTIONVARNAME="CollectionOfPagingFilePercentUsage" EXPRESSIONPATH="\Paging File(*)\% Usage" TRENDVARNAME="TrendPagingFilePercentUsage" DATATYPE="integer" />
    <CHART CHARTTITLE="\Paging File(*)\% Usage" ISTHRESHOLDSADDED="False" DATASOURCE="\Paging File(*)\% Usage" CHARTLABELS="instance" />
  </ANALYSIS>
  <ANALYSIS NAME="LogicalDisk Avg. Disk Queue Length" ENABLED="True" CATEGORY="LogicalDisk" PRIMARYDATASOURCE="\LogicalDisk(_Total)\Avg. Disk Queue Length" ID="804d3652-8a0d-44f9-a7d8-6107536a3cfd" FROMALLCOUNTERSTATS="False">
    <DESCRIPTION><![CDATA[Avg. Disk Queue Length is the average number of both read and write requests that were queued for the selected disk during the sample interval.]]></DESCRIPTION>
    <DATASOURCE TYPE="CounterLog" NAME="\LogicalDisk(_Total)\Avg. Disk Queue Length" COLLECTIONVARNAME="CollectionOfLogicalDiskAvgDiskQueueLength" EXPRESSIONPATH="\LogicalDisk(_Total)\Avg. Disk Queue Length" TRENDVARNAME="TrendLogicalDiskAvgDiskQueueLength" DATATYPE="integer" />
    <CHART CHARTTITLE="\LogicalDisk(_Total)\Avg. Disk Queue Length" ISTHRESHOLDSADDED="False" DATASOURCE="\LogicalDisk(_Total)\Avg. Disk Queue Length" CHARTLABELS="instance" />
  </ANALYSIS>
  <ANALYSIS NAME="Processor % Processor Time" ENABLED="True" CATEGORY="Processor" PRIMARYDATASOURCE="\Processor(*)\% Processor Time" ID="cc9d67d5-3dee-4f69-8c7d-d1e0028c6a96" FROMALLCOUNTERSTATS="False">
    <DATASOURCE TYPE="CounterLog" NAME="\Processor(*)\% Processor Time" COLLECTIONVARNAME="CollectionOfProcessorPercentProcessorTime" EXPRESSIONPATH="\Processor(*)\% Processor Time" TRENDVARNAME="TrendProcessorPercentProcessorTime" DATATYPE="integer" />
    <CHART CHARTTITLE="\Processor(*)\% Processor Time" ISTHRESHOLDSADDED="False" DATASOURCE="\Processor(*)\% Processor Time" CHARTLABELS="instance" />
    <THRESHOLD NAME="CPU &gt; 90%" CONDITION="Critical" COLOR="Red" PRIORITY="100">
      <DESCRIPTION><![CDATA[]]></DESCRIPTION>
      <CODE><![CDATA[#// Use PowerShell code to create alerts when the conditions for this threshold are met.
#// Optionally use the variables listed above in the Variables list box.
#// If the condition for this threshold is a static value, then use the StaticThreshold() function.
#// Otherwise, you will need to manually loop through the counter instance collection object.
#// The counter instance collection object has a unique name for each counter data source in this analysis.
#// See the variables in the Variables list box above for more information on the counter instance collection object.

#// Here is a ready to use example on how to use the StaticThreshold() function to define a threshold:
StaticThreshold -CollectionOfCounterInstances $CollectionOfProcessorPercentProcessorTime -Operator 'gt' -Threshold 90

#// The -Operator parameter accepts gt for greater than, ge for greater than or equal to, lt for less than,
#//  and le for less than or equal to. -Threshold is the static value for the threshold.]]></CODE>
    </THRESHOLD>
    <THRESHOLD NAME="CPU &gt; 50%" CONDITION="Critical" COLOR="Red" PRIORITY="100">
      <DESCRIPTION><![CDATA[]]></DESCRIPTION>
      <CODE><![CDATA[#// Use PowerShell code to create alerts when the conditions for this threshold are met.
#// Optionally use the variables listed above in the Variables list box.
#// If the condition for this threshold is a static value, then use the StaticThreshold() function.
#// Otherwise, you will need to manually loop through the counter instance collection object.
#// The counter instance collection object has a unique name for each counter data source in this analysis.
#// See the variables in the Variables list box above for more information on the counter instance collection object.

#// Here is a ready to use example on how to use the StaticThreshold() function to define a threshold:
StaticThreshold -CollectionOfCounterInstances $CollectionOfProcessorPercentProcessorTime -Operator 'gt' -Threshold 50

#// The -Operator parameter accepts gt for greater than, ge for greater than or equal to, lt for less than,
#//  and le for less than or equal to. -Threshold is the static value for the threshold.]]></CODE>
    </THRESHOLD>
    <DESCRIPTION><![CDATA[% Processor Time is the percentage of elapsed time that the processor spends to execute a non-Idle thread. It is calculated by measuring the percentage of time that the processor spends executing the idle thread and then subtracting that value from 100%. (Each processor has an idle thread that consumes cycles when no other threads are ready to run). This counter is the primary indicator of processor activity, and displays the average percentage of busy time observed during the sample interval. It should be noted that the accounting calculation of whether the processor is idle is performed at an internal sampling interval of the system clock (10ms). On todays fast processors, % Processor Time can therefore underestimate the processor utilization as the processor may be spending a lot of time servicing threads between the system clock sampling interval. Workload based timer applications are one example  of applications  which are more likely to be measured inaccurately as timers are signaled just after the sample is taken.]]></DESCRIPTION>
  </ANALYSIS>
  <ANALYSIS NAME="Terminal Services Active Sessions" ENABLED="True" CATEGORY="Terminal Services" PRIMARYDATASOURCE="\Terminal Services\Active Sessions" ID="7da28ac2-c3a0-4e56-9b9e-3877b221c927" FROMALLCOUNTERSTATS="False">
    <DATASOURCE TYPE="CounterLog" NAME="\Terminal Services\Active Sessions" COLLECTIONVARNAME="CollectionOfTerminalServicesActiveSessions" EXPRESSIONPATH="\Terminal Services\Active Sessions" TRENDVARNAME="TrendTerminalServicesActiveSessions" DATATYPE="integer" />
    <CHART CHARTTITLE="\Terminal Services\Active Sessions" ISTHRESHOLDSADDED="False" DATASOURCE="\Terminal Services\Active Sessions" CHARTLABELS="instance" />
    <DESCRIPTION><![CDATA[Number of active Terminal Services sessions]]></DESCRIPTION>
  </ANALYSIS>
  <ANALYSIS NAME="Terminal Services Total Sessions" ENABLED="True" CATEGORY="Terminal Services" PRIMARYDATASOURCE="\Terminal Services\Total Sessions" ID="a158b5a5-d30c-49d5-858f-a104a243bdeb" FROMALLCOUNTERSTATS="False">
    <DATASOURCE TYPE="CounterLog" NAME="\Terminal Services\Total Sessions" COLLECTIONVARNAME="CollectionOfTerminalServicesTotalSessions" EXPRESSIONPATH="\Terminal Services\Total Sessions" TRENDVARNAME="TrendTerminalServicesTotalSessions" DATATYPE="integer" />
    <CHART CHARTTITLE="\Terminal Services\Total Sessions" ISTHRESHOLDSADDED="False" DATASOURCE="\Terminal Services\Total Sessions" CHARTLABELS="instance" />
    <DESCRIPTION><![CDATA[Total number Terminal services sessions]]></DESCRIPTION>
  </ANALYSIS>
  <QUESTION QUESTIONVARNAME="TotalRAM" DATATYPE="string" DEFAULTVALUE="4">Amount of RAM in the sampled server (in GB)</QUESTION>
  <QUESTION QUESTIONVARNAME="x64" DATATYPE="boolean" DEFAULTVALUE="True">x64 architecture?</QUESTION>
  <QUESTION QUESTIONVARNAME="NICSpeed" DATATYPE="string" DEFAULTVALUE="100">NIC speed in Mbps (10/100/1000)</QUESTION>
  <QUESTION QUESTIONVARNAME="CPUCount" DATATYPE="string" DEFAULTVALUE="1">Number of CPU's in the sampled server (1 core/thread = 1 CPU)?</QUESTION>
</PAL>

Feb 23, 2011 at 7:52 AM

My apologies if pasting the xml code as above is not considered polite, I just couldn't see any other way.

I'm swamped at the moment but any assistance configuring the analysis logic (formulas and thresholds) would be appreciated.  If I find some time next month I may dig into powershell scripting enough to do this myself, but no promises.

This basically just grabs the bare minimum counters and summarizes them into the PAL report style in it's current state.  Admittedly, this should be enough to use your own grey matter to identify any obvious issues.

Pending items:

  • Add calculations to trend RAM, CPU and Network usage as percents of total capacity
  • more detailed reports (more counters) as second threshold file
Feb 23, 2011 at 8:03 AM

PS - in 2.0.7 the palversion="2.0" had to added manually to the xml file, I hope this gets added automatically (as a parameter in the editor perhaps?) in a future version.

PPS - this PAL tool is awesome, just needs more templates

Coordinator
Mar 16, 2011 at 6:36 AM

Yes, I very much want to get the editor updated, but my primary job comes first and has me very busy these last few months.

Coordinator
Mar 16, 2011 at 6:41 AM

Most of the operating system analyses are covered in the QuickSystemOverview.xml. Add the following line/node under the PAL xml node at the top. This will tell PAL to inherit everything from the QuickSystemOverview.xml.
  <INHERITANCE FILEPATH="QuickSystemOverview.xml" />



If you want me to, I can take what you have so far and make it into a threshold file. Go ahead and email me directly on this at clinth@microsoft.com.

Thank you,