TRCUNIX(3x,L) AIX Technical Reference TRCUNIX(3x,L) ------------------------------------------------------------------------------- trcunix PURPOSE Records application trace log entries. LIBRARY Run-time Services Library (librts.a) SYNTAX int trcunix (buf, cnt) char *buf; unsigned int cnt; DESCRIPTION The trcunix subroutine invokes the application trace device driver to record a trace log entry. trcunix is a C run-time subroutine. Device drivers should use the trsave subroutine to log trace events. The buf parameter points to a buffer containing a 2-byte traceid followed by up to 20 bytes of user-defined trace data. The high-order 5 bits of the traceid specify the channel number, and the low-order 11 bits specify the hook ID for the message. User programs may use only channel number 31. The cnt parameter specifies the number of bytes in the buffer, including the traceid. If the application trace device driver is not open, then trcunix opens it before writing the trace log entry to it. RETURN VALUE Upon successful completion, a value of 0 is returned and a trace log entry is written to /dev/appltrace. If the trcunix subroutine fails, an error message is written to the standard error output, and a value of -1 is returned. FILE /dev/appltrace RELATED INFORMATION In this book: "trace_on," and "trace." The trace command in AIX Operating System Commands Reference. The discussion of trace in AIX Programming Tools and Interfaces. Processed November 7, 1990 TRCUNIX(3x,L) 1