Increase Harvest Log Levels
search cancel

Increase Harvest Log Levels

book

Article ID: 37371

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager

Issue/Introduction

When trying to diagnose certain problems with your Harvest SCM Server, Broadcom Support may request that you increase your “hserver logging level” to help trace a given problem.  This document explains how to increase the Harvest logging levels.

Environment

Release: 12.1 and higher
Component:  Harvest SCM/Openmake Meister

Resolution

There are 2 ways to increase your HServer logging level.  One requires an update to your HServer.arg file and a restart of the SCM Broker and HServers, and the other can be done from a command prompt window that does not require a SCM Broker restart:

Method 1:  To increase the logging level in your HServer.arg file:

  • On the SCM Broker machine, navigate to the folder where SCM is installed (%CA_SCM_HOME% on a Windows machine, $CA_SCM_HOME on a Linux or Unix machine) and locate a file named HServer.arg. Edit this file with your preferred text editor and add the following line:
-logging=5
  • Save and close the file and then restart your SCM Broker.

Method 2:  To increase the logging level using the command prompt window:

  • Open a command prompt window on the broker machine and navigate to the folder where the SCM command line utilities are installed (%CA_SCM_HOME% on a Windows machine, $CA_SCM_HOME/bin on a Linux or Unix machine). Then execute the following command:
hdbgctrl -b brokername -prompt hserver:on:5:all

(where “brokername” should be replaced with the hostname of the broker machine)

  • The command will prompt for username and password. Supply the Harvest SCM login credentials of an administrator on the Harvest SCM System (same credentials you would use when logging into the Harvest SCM Administrator Tool)
  • Once the command completes, a hdbgctrl.log file will be created in the same folder from which the command was run. You can execute this command to see the log file and confirm whether the command was successful:

(On a Windows machine) type hdbgctrl.log

(on a Linux or Unix machine) more hdbgctrl.log

The hdbgctrl commandline process will supercede the hserver.arg settings, but will not overwrite them.   hdbgctrl will write changed logging levels to the existing log levels.  New log file would only be created for a new HServer process spawned.

If server side logging is being conducted, then hdbgctrl will cause the broker and hserver to continue to use their existing logs files, writing new logging records according to the new levels chosen.

Either of these methods will increase the logging level to 5, so you only have to choose one or the other.

Additional Information

Information on logging levels is available in existing documentation, Configure the Broker and Server Communication on Windows.  Excerpt below:

-logging=int level Writes detailed server information to the server log. Each log level displays the information of all levels below it. The levels are cumulative not mutually exclusive.

Level=1 displays ODBC errors and any error messages written by the relational database.

Level=2 displays the product Transaction name; the date and time it started; the date and time it ended; the name of the server and process ID that processed the transaction; and the duration of the transaction in milliseconds.

Level=3 displays the executed SQL statement, when it started, when it ended, the execution time in milliseconds, and the time in milliseconds since the last completed SQL.

Level=4 displays commit and rollback statements.

Level=5 displays the results of the SQL statements being executed.

More information on the hdbgctrl command can be found in the Command Line Reference Guide

See also KB Article 230571 for additional information about the Harvest Logs