Add New and Custom Diagnostic Tests

Applies To: Microsoft HPC Pack 2008 R2, Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2, Windows HPC Server 2008 R2

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.

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

  • Step 2: Adding the custom test to the cluster

  • Step 3: Run the new test and view results

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.

Important

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

  1. On the head node, create a new folder called C:\CustomTests.

  2. Copy the test XML file to the C:\CustomTests folder.

  3. Open the file in Notepad or in an XML viewer.

  4. In the DiagnosticTest element, find the Name, Company, Suite, and Alias attributes 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">
    

Important

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

The following procedures describe how to add a custom test to the cluster by using HPC PowerShell. For more information about using the cmdlets, see Add-HpcTest and Get-HpcTestDetail.

To add a custom diagnostic test using HPC PowerShell

  1. 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.

  2. 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

  3. 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

Note

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

  1. In HPC Cluster Manager, click Diagnostics.

  2. In the Navigation Pane, under Tests, select the node that corresponds to the Company attribute of the test that you added. The corresponding test or tests appear in the view pane.

  3. In the view pane, right-click the name of the test, then click Run.

  4. In the Run Diagnostics Tests dialog box, click Run.

  5. In the Navigation Pane, click Test Results, then select the test in the view pane.

  6. In the Details Pane you can see the results, test details, and run parameters for the test run.