Export-HpcMetric

Exports the specified set of metrics that HPC Cluster Manager uses in the heat maps for the nodes and the monitoring charts to an XML file.

Syntax

Export-HpcMetric
      [[-Name] <String[]>]
      -Path <String>
      [-MetricTargets <MetricTarget[]>]
      [-Type <String[]>]
      [-Force]
      [-ClusterConnectionString <String[]>]
      [-Scheduler <String[]>]
      [<CommonParameters>]

Description

The Export-HpcMetric cmdlet exports the specified set of metrics that HPC Cluster Manager uses in the heat maps for the nodes and the monitoring charts to an XML file. You can specify the metrics that you want to export by any combination of the names of the metrics, the locations where the metrics are generated, and the categories for the metrics. If you do not specify any names, locations, or categories, the Export-HpcMetric cmdlet exports all of the metrics for the HPC Cluster.

Examples

Example 1: Export all metrics

PS C:\>Export-HpcMetric -Path "C:\MyMetrics\Metrics.xml"

This command exports all of the metrics for the HPC cluster to the XML file at C:\MyMetrics\Metrics.xml. If the file already exists, the cmdlet prompts you to confirm whether you want to overwrite the file.

Example 2: Export metrics by category

PS C:\>Export-HpcMetric -Type Calculated -Path "C:\MyMetrics\CalculatedMetrics.xml" -Force

This command exports all of the metrics in the calculated categories for the HPC cluster to the XML file at C:\MyMetrics\CalculatedMetrics.xml. If the file already exists, the cmdlet overwrites the file without prompting for confirmation.

Example 3: Export metrics by name

PS C:\>Export-HpcMetric -MetricTarget ComputeNode,HeadNode -Name HpcDisk* -Path "C:\MyMetrics\DiskMetrics.xml"

This command exports all of the metrics that have names that begin with HpcDisk and that are generated on the head node or compute nodes in the HPC cluster to the XML file at C:\MyMetrics\DiskMetrics.xml. If the file already exists, the cmdlet prompts you to confirm whether you want to overwrite the file.

Parameters

-ClusterConnectionString

Specifies an array of cluster connection strings for the cluster to which you want to add the device drivers. The value format is host1,host2,host3. If you do not specify the ClusterConnectionString parameter, this cmdlet uses the connection string on the head node that the CCP_CONNECTIONSTRING environment variable specifies. To set this environment variable, run the following cmdlet: Set-Content Env: CCP_CONNECTIONSTRING \<head_node_name\>.

This parameter was introduced in HPC Pack 2016.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Replaces an existing metrics file without prompting the user. If you do not specify the Force parameter, the Export-HpcMetric cmdlet prompts for confirmation that you want to overwrite the file if the file that the Path parameter specifies already exists.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MetricTargets

Type:MetricTarget[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies an array of names for the metrics that you want to export to the XML file.

Type:String[]
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Path

Specifies the file name for the XML file to which you want to export the metrics, including the full or relative path to the file if the Export-HpcMetric cmdlet should not save the file in the current directory.

This cmdlet creates any directories that do not already exist in the path. If the file already exists and you do not specify the Force parameter, the cmdlet prompts you to confirm whether you want to replace the file.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Scheduler

Specifies the host name or IP address of the head node for the cluster that includes the metrics that you want to export. The value must be a valid computer name or IP address. If you do not specify the Scheduler parameter, this cmdlet uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies. To set this environment variable, run the following cmdlet:

Set-Content Env:CCP_SCHEDULER \<head_node_name\>

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Type

Specifies an array of categories that include the metrics that you want to export. Valid values are: Performance, Calculated.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

HpcMetric[]

Outputs

None

Notes

  • You must be a cluster administrator to run this cmdlet successfully.