Share via


Using Log Files to Monitor and Troubleshoot the HPC Basic Profile Web Service

Applies To: Windows HPC Server 2008

The HPC Basic Profile Web Service generates a log file that you can review to monitor and troubleshoot the service. The HPC Basic Profile Web Service relies on the HPC Job Scheduler service to submit and manage the jobs sent to the Web service, and on the Windows Communication Foundation (WCF) to process the incoming and outgoing messages between the clients and the Web service. Depending on the type of errors you are receiving, you may want to enable WCF or Scheduler/Debug logging.

The following table describes the three log files that pertain to the HPC Basic Profile Web Service:

Log file Description Default logging level

HPCBasicProfile.svclog

Generated by the HPC Basic Profile Web Service.

A log of errors and information about how the HPC Basic Profile Web Service is working.

Enabled by default at Level 2 (error and warning messages).

HPCBasicProfileWCF.svclog

Generated by the WCF hosting environment.

A log of message traffic going in and out of the HPC Basic Profile Web Service.

Not enabled by default.

Scheduler/Debug service log

Generated by the HPC Job Scheduler service.

A debug-level log of state transition information and internal scheduler data.

Debug-level logging is not enabled by default.

In this topic:

  • Guidelines for using log files to monitor and troubleshoot the HPC Basic Profile Web Service

  • How to enable logging, and set trace level and output location

Guidelines for using log files to monitor and troubleshoot the HPC Basic Profile Web Service

The first log file you should review is the HPC Basic Profile Web Service log file, HPCBasicProfile.svclog. Errors and information about how the HPC Basic Profile Web Service is working are logged in this file. Depending on what type of errors and information you find in HPCBasicProfile.svclog, you may want to enable WCF or Scheduler/Debug logging.

If there are errors in the HPC Basic Profile Web Service log file that are related to XML parsing errors, or if your Web service client has returned this type of error, then you should also generate and review the WCF log file, HPCBasicProfileWCF.svclog. The WCF log file records inbound and outbound message traffic through the HPC Basic Profile Web Service. Because the file records message traffic going in and out of the HPC Basic Profile Web Service, reviewing this log file can be helpful if the problem seems to be at the Web service level, such as an incompatibility of data coming in and out of the service.

If there is an exception in the HPC Basic Profile Web Service log file HPCBasicProfile.svclog that is from the microsoft.hpc.scheduler namespace, you can enable debug-level logging for the HPC Job Scheduler Service. In this log, you can review state transition information and internal scheduler data.

How to enable logging, and set trace level and output location

The following sections describe how to set the trace level and the location of the output file for HPC Basic Profile Web Service logging, and how to enable WCF and HPC Job Scheduler Service debug-level logging:

  • Configure HPC Basic Profile Web Service logging

  • Enable WCF hosting environment logging

  • Enable Scheduler/Debug service logging

Note

Data from the HPC Basic Profile Web Service and the WCF framework are both recorded in a text-based XML format that can be browsed using the Service Trace Viewer Tool (SvcTraceViewer.exe) that is part of the .NET 3.0 (and later) redistributable package. Alternatively, you can use any text file editor to view the messages. For information about the Service Trace Viewer Tool, see Service Trace Viewer Tool (SvcTraceViewer.exe) (https://go.microsoft.com/fwlink/?LinkId=122126). To download the Microsoft .NET Framework, see Microsoft .NET Framework (https://go.microsoft.com/?linkid=7755937).

Configure HPC Basic Profile Web Service logging

The HPC Basic Profile Web Service logs activity within the service as it processes the incoming message traffic and communicates with the Windows HPC Server 2008 cluster. Messages from the HPC Basic Profile Web Service are recorded in a log file called HPCBasicProfile.svclog.

No output will be captured in this logging file during normal operations when the logging level is set at the default level (2). When the logging level is set at higher logging levels (3 and above), output will only be generated when the service is being used.

By default, HPC management logs are saved in the C:\Program Files\Microsoft HPC Pack\Data\LogFiles\ folder.

The location of the log file and the current logging level are determined by the following registry key settings:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HPC

Registry key Default value

LogfileDir

C:\Program Files\Microsoft HPC Pack\Data\LogFiles\

TraceLevel

2

Note

The LogfileDir and TraceLevel registry keys apply to all the Windows HPC Server 2008 service log files.

You can alter the logging level by changing the value of the TraceLevel registry key. Changes in the TraceLevel setting are picked up on the next Web service invocation:

  • Level 0. No logging.

  • Level 1. Log error messages only.

  • Level 2. Log error and warning messages only.

  • Level 3. Log error, warning, and information messages only.

  • Level 4. Log all messages (error, warning, information, and trace messages).

Note

The three types of log messages that are relevant to the HPC Basic Profile Web Service are the following message types:

  • Error. Faults generated by processing the message or contacting the HPC Job Scheduler Service.

  • Information. Messages relating to activity in processing the Web service operations.

  • Trace. Records of the entry and exit from the Web service operation.

Enable WCF hosting environment logging

The WCF hosting environment processes message traffic between clients and the HPC Basic Profile Web Service. WCF logging is independent of the logging controls used in Windows HPC Server 2008, and is not enabled by default.

You can enable WCF logging in the Web service configuration file, HPCBasicProfile.exe.config, which by default is in the C:\Program Files\Microsoft HPC Pack\bin\ folder. This file includes the following XML element:

<diagnostics>
  <messageLogging logEntireMessage="true" logMalformedMessages="false"
          logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" />
</diagnostics>

The messageLogging element in the HPCBasicProfile.exe.config file is commented out by default. You can enable the logging of all message traffic by uncommenting the messageLogging element.

You can adjust the logging level by setting the messageLogging attributes to true or false. Setting all of these attributes to false will turn off message logging.

When enabled, WCF message logging is recorded in the HPCBasicProfileWCF.svclog file in the C:\Program Files\Microsoft HPC Pack\bin\ folder, as specified by the following XML element in the HPCBasicProfile.exe.config file:

<sharedListeners>
  <add name="logging"
          type="System.Diagnostics.XmlWriterTraceListener"
          initializeData="HPCBasicProfileWCF.svclog" />
</sharedListeners>

You can change the location of the output file by altering the value of the initializeData attribute.

Enable Scheduler/Debug service logging

The HPC Basic Profile Web Service uses the HPC Job Scheduler Service to submit and manage the jobs sent to the Web service. If you are getting errors from the microsoft.hpc.scheduler namespace, you can enable debug-level logging for the HPC Job Scheduler Service. This records state transition information and internal scheduler data. The following procedure describes how to enable debug-level logging for the HPC Job Scheduler Service.

To enable debug-level logging for the HPC Job Scheduler Service

  1. Log on to your head node as a user with Administrator privileges.

  2. Open the Event Viewer:

    Click Start, point to Administrative Tools, then click Event Viewer.

  3. In the navigation pane, expand the Applications and Services Logs node, then expand the Microsoft node, then expand the Windows node, then expand the HPCServer node.

  4. In the menu bar, click View, then select Show Analytic and Debug Logs. The Scheduler/Debug log should now appear under the HPCServer node.

  5. Right-click Scheduler/Debug, then click Enable Log.

Additional references