hpctrace

 

Applies To: Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

This command was introduced in HPC Pack 2008 R2 and is not supported in previous versions. Functionality was added in HPC Pack 2012 and changed in HPC Pack 2012 with Service Pack 1 (SP1).

  • Hpctrace reference for HPC Pack 2012 with SP1 (or later)

  • Hpctrace reference for HPC Pack 2008 R2 and HPC Pack 2012

Hpctrace reference for HPC Pack 2012 with SP1 (or later)

Collects and extracts the information in the binary log files (.bin) that are generated by HPC Pack, starting with HPC Pack 2012 with Service Pack 1 (SP1).

Note

To download and manage log files that are generated on Windows Azure nodes, you can use the hpcazurelog command-line tool. Then, use the parselog subcommand in this tool to extract the information in the log files that you downloaded.

Syntax

hpctrace getlog <provider> [level] [-d:<destination folder>]

hpctrace parselog <BIN file> [level] [-s] [-d:<destination folder>]

hpctrace {/? | /help}

Subcommands

Subcommand

Description

hpctrace getlog

Collects the binary log files for the specified provider and automatically runs the parselog subcommand to extract their information into text files. When used with the optional level parameter, filters the log output based on the severity of each log entry.

hpctrace parselog

Extracts the information from one or more binary log files (.bin), and writes it to a text file with tab-separated values, which can be imported into a table-based tool for analysis. The output file has the same name as the binary log file, with a .log extension. When used with the optional level parameter, filters the log output based on the severity of each log entry.

The optional –s parameter processes binary files in all subfolders.

hpctrace /?

Displays Help at the command prompt.

hpctrace /help

Displays Help at the command prompt.

Parameters

Parameter

Description

<provider>

Specifies the provider (source) of the logs. The available providers are:

mgmt

HPC Management Service

sche

HPC Job Scheduler Service

sdm

HPC SDM Store Service

diag

HPC Diagnostics Service

rept

HPC Reporting Service

nmgr

HPC Node Manager Service

msvr

HPC Monitoring Server Service

mclt

HPC Monitoring Client Service

brok

HPC Broker Service

sdgm

HPC SOA Diag Mon Service

sess

HPC Session Service

<BIN file>

Specifies the name of the binary log file or files to extract. Applies only to the parselog subcommand. Accepts the * and ? wildcards.

[level]

Optionally filters the log output based on the maximum severity of each log entry. The default level is 4. The available levels are:

1

Error and Critical only

2

Warning, Error, and Critical only

3

Info, Warning, Error and Critical only

4

All: Verbose, Info, Warning, Error, and Critical

[-s]

Optionally extracts binary files in all existing subfolders. Applies only to the parselog subcommand

[-d:<destination folder>]

Optionally specifies the path to the folder where the output text file or files should be written. If this parameter is not specified for the getlog subcommand, the text files are written to the folder from which you ran hpctrace. If this parameter is not specified for the parselog subcommand, the text files are written to the same folder where the binary files are stored.

Examples

To collect and extract the information in the log files for the HPC Job Scheduler Service, and write the output files to the current folder:

hpctrace getlog sche

To collect and extract the information in the log files for the HPC Management Service, and write the output files to the C:\My Logs folder:

hpctrace getlog mgmt -d:"C:\My Logs"

To extract only Error and Critical log entries in the binary file named hpcworker_000001.bin in the C:\logs folder, and write the output file in the same folder:

hpctrace parselog C:\logs\hpcworker_000001.bin 1

To extract all binary files that start with "hpc” in the current folder and in any existing subfolders, and write each output file in the same folder as its corresponding binary file:

hpctrace parselog hpc*.bin -s

Hpctrace reference for HPC Pack 2008 R2 and HPC Pack 2012

Starts, stops, queries, collects, and formats the Event Tracing for Windows (ETW)-based trace logs generated by the HPC Management Service, HPC SDM Store Service, and the HPC management tools that use the HPC management API. In HPC Pack 2012, hpctrace also extracts the binary log files generated by Windows Azure nodes, and by the HPC Monitoring Server Service and the HPC Monitoring Client Service.

Syntax

hpctrace start <provider> [file size] 

hpctrace {stop|query} <provider>

hpctrace getlog <provider> <TXT file> [level] 

hpctrace fmtlog <ETL file> <TXT file> [level] 

hpctrace parselog <BIN file> [-s] [level] 

hpctrace {/? | /help}

Subcommands

Subcommand

Description

hpctrace fmtlog

Extracts the information from an existing ETL file (.etl), and writes it to the specified text file (.txt). When used with the optional level parameter, filters the log output based on the severity of each log entry.

hpctrace getlog

Collects the trace log of the specified provider (trace source) and writes it to the specified text file (.txt). When used with the optional level parameter, filters the log output based on the severity of each log entry.

hpctrace parselog

This parameter was added in HPC Pack 2012 and is not supported in previous versions.

Extracts the information from one or more binary log files (.bin), and writes it to a text file (.txt) with tab-separated values, which can be imported into a table-based tool for analysis. The output file has the same name as the binary log file, with a .log file extension, and is stored in the same folder as the .bin file. When used with the optional level parameter, filters the log output based on the severity of each log entry.

The optional –s parameter processes binary files in all subfolders.

Note

This parameter was introduced in HPC Pack 2012. It is not supported in previous versions.

hpctrace query

Displays session information for the specified provider (trace source).

hpctrace start

Starts a new tracing session for the specified provider (trace source).

The ETL file that is generated will be stored in %CCP_DATA%LogFiles. The optional file size parameter specifies the maximum size of the ETL file, in MB.

hpctrace stop

Stops an existing trace session for the specified provider (trace source).

Warning

Stopping and restarting a session will delete the current ETL file (.etl) for the provider. If you want to keep the content of an earlier session, before restarting the session copy the ETL file to a safe place or use the getlog parameter to write it to a text file. ETL files are stored in %CCP_DATA%LogFiles.

hpctrace /?

Displays Help at the command prompt.

hpctrace /help

Displays Help at the command prompt.

Parameters

Parameter

Description

<BIN file>

Specifies the name of the binary log file or files to extract. Applies only to the parselog subcommand. Accepts the * and ? wildcards.

<ETL file>

Specifies the name of the ETL file to extract. Applies only to the fmtlog subcommand.

[file size]

Optionally specifies the maximum size of the ETL file, in MB. Applies only to the start subcommand. Generally, the text file that is extracted from the ETL file will be half the size of the ETL file. For example, a 1 GB ETL file will generate 500 MB of formatted text output. You must stop the current logging session and restart it in order to change the file size. The default size is 400 MB.

[level]

Optionally filters the log output based on the maximum severity of each log entry. Applies to the getlog, fmtlog, and parselog subcommands. The default level for the getlog and fmtlog subcommands is 4. The default level for parselog is 5. The available levels are:

1

Critical only

2

Error and Critical

3

Warning, Error, and Critical

4

Info, Warning, Error, and Critical

5

All: Verbose, Info, Warning, Error, and Critical

<provider>

Specifies the provider (source) of the trace logs. Applies only to the query and getlog subcommands. The available providers are:

mgmt

HPC Management Service

sdm

HPC SDM Store Service

mapi

HPC management API

Used to specify tracing for HPC PowerShell sessions and HPC Cluster Manager. Only one trace session is needed for all HPC management API processes.

[-s]

Optionally extracts binary files in all existing subfolders. Applies only to the parselog subcommand

<TXT file>

Specifies the name of the output text file. Applies only to the getlog and fmtlog subcommands.

Examples

To retrieve the hpctrace log file named mgmttxt that contains warning, error, and critical messages, use the following command:

hpctrace getlog mgmt mgmttxt 3

To stop a tracing session for the HPC Management Service, and then restart it with a maximum file size of 100 MB:

hpctrace stop mgmthpctrace start mgmt 100

To extract only the binary file named HpcLog_01.bin, in the C:\logs folder:

hpctrace parselog C:\logs\HpcLog_01.bin

To extract all binary files that start with "HpcLog_0", followed by one number, in the current folder (for example, HpcLog_00.bin, HpcLog_01.bin, HpcLog_02.bin, and so on):

hpctrace parselog HpcLog_0?.bin

To extract all binary files in the current folder, and in all existing subfolders:

hpctrace parselog *.bin -s

See Also

hpcazurelog