posix_trace_attr_getlogsize Subroutine

Purpose

Retrieves the size of the log of a trace stream.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <sys/types.h>
#include <trace.h>

int posix_trace_attr_getlogsize(attr, logsize)
const trace_attr_t *restrict attr;
size_t *restrict logsize;

Description

The posix_trace_attr_getlogsize subroutine copies the size of a log in bytes from the log-max-size attribute of the attr parameter into the logsize variable. This size is the maximum total bytes that is allocated for system and user trace events in the trace log. The default value for the attr parameter is 1 MB.

If this subroutine is called with a non-initialized attributes object as parameter, the result is not specified.

Parameters

Item Description
attr Specifies the trace attribute object.
logsize Specifies where the attr parameter, in bytes, will be stored.

Return Values

Upon successful completion, this subroutine returns a value of zero. Otherwise, it returns the corresponding error number.

The posix_trace_attr_getlogsize subroutine stores the maximum trace log size that is allowed in the object pointed to by the logsize parameter, if successful.

Errors

This subroutine fails if the following error number returns:
Item Description
EINVAL The parameter is null or not valid.

Files

The trace.h file and the types.h file in AIX® Version 7.1 Files Reference