Share via


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

Default (Default)

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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MetricTargets

Specify an array of metric targets. The acceptable values for this parameter are:

  • Cluster
  • HeadNode
  • ComputeNode
  • BrokerNode
  • WorkStationNode
  • AzureNode
  • AzureBatchPool

Parameter properties

Type:

MetricTarget[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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\>

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Type

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

HpcMetric

Outputs

None

Notes

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