trc_loginfo Subroutine

Purpose

Returns information about a trace log object.

Library

libtrace.a

Syntax

#include <sys/libtrace.h>

int trc_loginfo (log_object_name, infop)
char *log_object_name;
trc_log_info_t *infop;

Description

The trc_loginfo subroutine returns information about the named trace log object. If the log_object_name parameter is NULL or an empty string, the trc_loginfo subroutine returns information about the default log object.

Parameters

Item Description
log_object_name Names the trace log object. This is specified as it is for the trc_open subroutine.
infop Points to an item of type trc_log_info_t where the information will be returned. The trc_log_info_t structure is defined in the /usr/include/sys/libtrace.h file. It contains such fields as the file size, the time the trace was taken, the trace log file magic number, the command used to start the trace, CPUs in the machine, number of CPUs traced, multi-CPU trace indicator (-C), and the trace object type as defined in the trcopen subroutine. The trc_free subroutine should be called to free the trc_loginfo_t information, even if the trc_loginfo subroutine returned an error.
The /usr/include/sys/libtrace.h file contains the data definitions for the returned data, *infop. The following table contains the data item name, data type, and description for each item returned:
Label Data Type Description
trci_magic int Structure magic number managed by the library.
trci_logmagic int The trace log file's magic number, see the /usr/include/sys/trchdr.h file. This identifies the type of log file, and is included mainly for completeness. The pertinent log file information may be gotten from other fields in this structure.
trci_time time_t The time the trace was taken.
trci_ipaddr int The system's IP address.
trci_uname struct utsname uname information.
trci_cmd char * The command used to start the trace.
trci_fnames trci_fname_t* Log file names array.
trci_mach_cpus int Number of CPUs in the machine.
trci_traced_cpus int Number of traced CPUs.
trci_flags int Data stream flags.
trci_obj_type int Trace object type.
trci_hookids trc_hookset_t or trc_hookset64_t The binary hook IDs map shows the hooks traced. If the application is compiled on systems before AIX® 6.1, the trc_hookset_t data type is provided and can be examined with the trc_hkisset subroutine. Beginning with AIX 6.1, applications are provided with the trc_hookset64_t type that can be examined with the trc_hkisset64 subroutine.
The trci_flags field contains bit flags as follows:
Item Description
TRCIF_MULTICPU This trace was taken with the -C trace option, (for example) it is a multi-CPU trace.
TRCIF_64BIT This is a 64-bit trace, 32-bit if not set.
TRCIF_SEPSEG Separate segment buffering was used.
TRCIF_CONDTRACE Conditional trace by hookid, trace -j, -k, -J, or -K.
TRCIF_CONDEXCL Trace hook exclusion, -k or -K, was used.
TRCIF_COMPONENT The given file is a Component Trace master file obtained by either the ctctrl command or the trcdead command.

Return Values

Upon successful completion, the trc_loginfo subroutine returns a 0, and information about the trace log object is placed into the memory pointed to by the infop parameter.

Error Codes

Upon error, the trc_loginfo subroutine returns information identical to that returned by the trc_open Subroutine.