Add New and Custom Diagnostic Tests
In Microsoft HPC Pack, cluster administrators and partners can create custom diagnostic tests. Partners include independent software vendors (ISVs), independent hardware vendors (IHVs), original equipment manufacturers (OEMs), and system integrators. Cluster administrators can add these tests to the list of diagnostic tests for their HPC cluster, and then run them in the same way as the built-in diagnostic tests for HPC Pack. With custom diagnostic tests, cluster administrators can verify that custom and non-Microsoft software or hardware that they have added to their HPC cluster works correctly.
For more information about creating custom diagnostic tests, see Diagnostics Extensibility Step-by-Step Guide on MSDN.
For information about newly available tests, see Download and Install New Diagnostic Tests.
Diagnostic tests are defined in an XML file. The XML file for the test includes metadata, parameter information, and commands for the test to run. This topic includes the following sections:
Step 1: Copying the test XML file to the head node and viewing test metadata
You can add the test XML file to an existing folder, or create a new folder for custom diagnostic description files. If you do not have documentation for the custom test, or you did not create the test, you can view the XML file to find out the test suite, name, company, and alias. These are required attributes, and allow you to identify the test in the Diagnostics view in HPC Cluster Manager, or to invoke the test in HPC PowerShell or at a command prompt.
If the test uses any program files or scripts, verify that the files are in the appropriate folder on all of the nodes in the cluster or in an appropriate share that is accessible from all of the nodes. The location for the files should match the location that is specified in the XML file. In the txt XML file, you can see if any files or scripts are specified in the following elements: PreStep, RunStep, and PostStep.
The following procedure describes how to create a new folder for custom tests and how to find basic test information in the XML file.
To copy the test XML file to the head node and view test metadata
On the head node, create a new folder called C:\CustomTests.
Copy the test XML file to the C:\CustomTests folder.
Open the file in Notepad or in an XML viewer.
DiagnosticTestelement, find the
Aliasattributes for the test. For example, the following XML snippet show the definition for a test named “Free Disk Space”, by a company called “Contoso, Ltd”, in a suite named “Sample”, that uses “diskspace” as the alias:
<DiagnosticTests> <DiagnosticTest Name="Free Disk Space" Description="Checks the amount of disk space free on the specified drive." Company="Contoso, Ltd" Suite="Sample" Alias="diskspace">
If your head node is configured for high availability, you must copy the test binaries to both the active and the passive head nodes.
Step 2: Adding the custom test to the cluster
To add a custom diagnostic test using HPC PowerShell
To open HPC PowerShell:
HPC Pack 2012: on the Start screen, type HPC PowerShell, and then click HPC PowerShell.
Windows HPC Server 2008 R2 and earlier versions: on the head node, click Start, point to All Programs, click Microsoft HPC Pack 2008 R2, right-click HPC PowerShell, and then click Run as administrator.
In HPC PowerShell, type the following cmdlet to add the test, where C:\CustomTests\myTest.xml is the location of the XML file for the test that you are adding:
Add-HpcTest -File C:\CustomTests\myTest.xml
Type the following command to verify that the metadata, parameters, and command for the test were correctly added to the HPC cluster, where testAlias is the alias of the test that you added:
Get-HpcTestDetail -Alias testAlias
You can remove tests by using the Remove-HpcTest cmdlet.
Step 3: Run the new test and view results
After you add the test to the cluster, you can run them in the same way as the built-in diagnostic tests for HPC Pack. Tests are listed in the Diagnostics navigation pane by Company, and then by Suite. The following procedure describes how to run a custom diagnostic test.
To run a custom diagnostic test
In HPC Cluster Manager, click Diagnostics.
In the Navigation Pane, under Tests, select the node that corresponds to the
Companyattribute of the test that you added. The corresponding test or tests appear in the view pane.
In the view pane, right-click the name of the test, then click Run.
In the Run Diagnostics Tests dialog box, click Run.
In the Navigation Pane, click Test Results, then select the test in the view pane.
In the Details Pane you can see the results, test details, and run parameters for the test run.