Export-HpcMetric

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

Parameter Set: Default
Export-HpcMetric [[-Name] <String[]> ] -Path <String> [-Force] [-MetricTarget <MetricTarget[]> ] [-Scheduler <String> ] [-Type <String[]> ] [ <CommonParameters>]

Detailed Description

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.

Parameters

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

Aliases

none

Required?

false

Position?

named

Default Value

not applicable

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MetricTarget<MetricTarget[]>

Specifies a list of one or more locations where the metrics that you want to export are generated. Depending on the version of HPC Pack that is installed, the valid locations include HeadNode, ComputeNode, BrokerNode, WorkstationNode, AzureNode, and Cluster.

Aliases

none

Required?

false

Position?

named

Default Value

HeadNode,ComputeNode,Cluster

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String[]>

Specifies a list of one or more names for the metrics that you want to export to the XML file.

Aliases

none

Required?

false

Position?

1

Default Value

no default

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Path<String>

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.

Aliases

none

Required?

true

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scheduler<String>

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>

Aliases

none

Required?

false

Position?

named

Default Value

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Type<String[]>

Specifies one or more categories that include the metrics that you want to export. The valid categories are Performance and Calculated.

Aliases

none

Required?

false

Position?

named

Default Value

Performance,Calculated

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • One or more HpcMetric objects, through their Name properties.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None.

Notes

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

Examples

EXAMPLE 1

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.

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

EXAMPLE 2

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.

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

EXAMPLE 3

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.

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

Get-HpcMetric

Import-HpcMetric