Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX SNAplus2 API NOF Programmer's Guide: HP-UX 11.0, 11i v1, and 11i v2 > Chapter 5 NOF API Verbs (REGISTER_INDICATION_SINK to UNREGISTER_INDICATION_SINK)

SET_TRACE_FILE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

This verb specifies the name of a file that SNAplus2 uses to record trace data.

If you issue a second SET_TRACE_FILE verb specifying a new file for the same file type, all subsequent trace information will be written to the new file; the existing file is not removed, but further information will not be written to it. If you issue a second SET_TRACE_FILE verb for the same trace file, this resets the file (discarding trace information that was written to the file before the second verb).

This verb may be issued to a running node, or (for client-server trace files only) to a HP-UX client computer on which the SNAplus2 software is running. To obtain a target handle for the client in order to issue this verb, use the CONNECT_NODE verb without specifying a node name; the NOF application must be running on the client.

On Windows clients, client-server tracing is controlled by options in the sna.ini file. For more information, see the HP-UX SNAplus2 Administration Guide.

VCB Structure

typedef struct set_trace_file
{
AP_UINT16 opcode; /* verb operation code */
unsigned char reserv2; /* reserved */
unsigned char format; /* reserved */
AP_UINT16 primary_rc; /* primary return code */
AP_UINT32 secondary_rc; /* secondary return code */
unsigned char trace_file_type; /* type of trace file */
unsigned char dual_files; /* dual trace files */
AP_UINT32 trace_file_size; /* trace file size */
unsigned char file_name[81]; /* file name */
unsigned char file_name_2[81]; /* second file name */
} SET_TRACE_FILE;

Supplied Parameters

The application supplies the following parameters:

opcode

AP_SET_TRACE_FILE

trace_file_type

The type of trace file. Possible values are:

AP_CS_TRACE

File contains tracing on data transferred across the SNAplus2 LAN between the specified computer and other nodes (activated by the SET_CS_TRACE verb).

AP_BCK_CS_TRACE

File contains tracing on data transferred across the SNAplus2 LAN between a current-level server and back-level computers. This type of tracing is activated by the SET_BCK_CS_TRACE verb.

AP_TN_SERVER_TRACE

File contains tracing on the SNAplus2 TN server component.

AP_IPS_TRACE

File contains tracing on kernel components for the specified node (activated by the SET_TRACE_TYPE or ADD_DLC_TRACE verb).

dual_files

Specifies whether tracing is to one file or to two files. Possible values are:

AP_YES

Tracing is to two files. When the first file reaches the size specified by trace_file_size, the second file is cleared, and tracing continues to the second file. When this file then reaches the size specified by trace_file_size, the first file is cleared, and tracing continues to the first file. This ensures that tracing can continue for long periods without using excessive disk space; the maximum space required is approximately twice the value of trace_file_size.

AP_NO

Tracing is to one file.

AP_LEAVE_UNCHANGED

Leave the dual_files setting unchanged from the existing definition. (The initial default, when the SNAplus2 software is started, is to use two files.)

trace_file_size

The maximum size of the trace file, in bytes. To continue using the existing file size definition, specify zero.

If dual_files is set to AP_YES, tracing will switch between the two files when the current file reaches this size. If dual_files is set to AP_NO, this parameter is ignored; the file size is not limited.

You may need to increase the size of the trace files according to the size of the SNAplus2 client-server network, to allow for the volume of trace information generated in larger systems. In particular, consider increasing the trace file size on a server to allow for large numbers of clients or users accessing the server.

file_name

Name of the trace file, or of the first trace file if dual_files is set to AP_YES. To continue using the file name specified on a previous SET_TRACE_FILE verb, set this parameter to a null string.

To create the file in the default directory for diagnostics files, /var/opt/sna, specify the file name with no path. To create the file in a different directory, specify either a full path or the path relative to the default directory. If you include the path, ensure that it is a valid path (either relative to the application's working directory or a full path) on any computer to which this verb is issued.

This parameter is an ASCII string of 1-80 characters, followed by a NULL character (binary zero).

file_name_2

Name of the second trace file; this parameter is used only if dual_files is set to AP_YES. To continue using the file name specified on a previous set_trace_file verb, set this parameter to a null string.

To create the file in the default directory for diagnostics files, /var/opt/sna, specify the file name with no path. To create the file in a different directory, specify either a full path or the path relative to the default directory. If you include the path, ensure that it is a valid path (either relative to the application's working directory or a full path) on any computer to which this verb is issued.

This parameter is an ASCII string of 1-80 characters, followed by a NULL character (binary zero).

Returned Parameters: Successful Execution

If the verb executes successfully, SNAplus2 returns the following parameters:

primary_rc

AP_OK

secondary_rc

Not used.

Returned Parameters: Parameter Check

If the verb does not execute because of a parameter error, SNAplus2 returns the following parameters:

primary_rc

AP_PARAMETER_CHECK

secondary_rc

Possible values are:

AP_INVALID_FILE_NAME

The file_name or file_name_2 parameter was not set to a valid HP-UX file name, or file_name_2 was not specified when changing from a single trace file to dual trace files.

AP_INVALID_FILE_TYPE

The trace_file_type parameter was not set to a valid value.

Appendix A “Common Return Codes” lists further secondary return codes associated with AP_PARAMETER_CHECK, which are common to all NOF verbs.

Returned Parameters: Other Conditions

Appendix A “Common Return Codes” lists further combinations of primary and secondary return codes that are common to all NOF verbs.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003 Hewlett-Packard Development Company, L.P.