Opens a trace log.
Posix Trace Library (libposixtrace.a)
The posix_trace_open subroutine allocates the necessary resources and establish the connection between a trace log identified by the file_desc parameter and a trace stream identifier identified by the object pointed to by the trid parameter. The file_desc parameter must be a valid open file descriptor that corresponds to a trace log. The file_desc parameter must be open for reading. The current trace event time stamp is set to the time stamp of the oldest trace event recorded in the trace log identified by the trid parameter. The current trace event time stamp specifies the time stamp of the trace event that will be read by the next call to the posix_trace_getnext_event.
Note that the operations used by a trace controller process, such as the posix_trace_start, posix_trace_stop, or the posix_trace_shutdown subroutine, cannot be invoked using the trace stream identifier returned by the posix_trace_open subroutine.
Item | Description |
---|---|
file_desc | Specifies the open file descriptor of the trace log. |
trid | Specifies the trace stream identifier. |
On successful completion, this subroutine returns a value of zero. Otherwise, it returns the corresponding error number.
If successful, the posix_trace_open subroutine stores the trace stream identifier value in the object pointed to by the trid parameter.
Item | Description |
---|---|
EBADF | The file_desc parameter is not a valid file descriptor open for reading. |
EINVAL | The object pointed to by file_desc does not correspond to a valid trace log. |
The trace.h file in the AIX® Version 7.1 Files Reference.