POSIX_TRACE_GET_ATTR(3)    POSIX Programmer's Manual   POSIX_TRACE_GET_ATTR(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       posix_trace_get_attr, posix_trace_get_status -- retrieve the trace
       attributes or trace status (TTRRAACCIINNGG)

SSYYNNOOPPSSIISS
       #include <trace.h>

       int posix_trace_get_attr(trace_id_t _t_r_i_d, trace_attr_t *_a_t_t_r);
       int posix_trace_get_status(trace_id_t _t_r_i_d,
           struct posix_trace_status_info *_s_t_a_t_u_s_i_n_f_o);

DDEESSCCRRIIPPTTIIOONN
       The _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r() function shall copy the attributes of the
       active trace stream identified by _t_r_i_d into the object pointed to by
       the _a_t_t_r argument.  If the Trace Log option is supported, _t_r_i_d may
       represent a pre-recorded trace log.

       The _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() function shall return, in the structure
       pointed to by the _s_t_a_t_u_s_i_n_f_o argument, the current trace status for the
       trace stream identified by the _t_r_i_d argument. These status values
       returned in the structure pointed to by _s_t_a_t_u_s_i_n_f_o shall have been
       appropriately read to ensure that the returned values are consistent.
       If the Trace Log option is supported and the _t_r_i_d argument refers to a
       pre-recorded trace stream, the status shall be the status of the
       completed trace stream.

       Each time the _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() function is used, the overrun
       status of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
       immediately after the call completes.  If the Trace Log option is
       supported, the _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() function shall behave the same
       as when the option is not supported except for the following
       differences:

        *  If the _t_r_i_d argument refers to a trace stream with log, each time
           the _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() function is used, the log overrun
           status of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
           and the _f_l_u_s_h___e_r_r_o_r status shall be reset to zero immediately after
           the call completes.

        *  If the _t_r_i_d argument refers to a pre-recorded trace stream, the
           status returned shall be the status of the completed trace stream
           and the status values of the trace stream shall not be reset.

RREETTUURRNN VVAALLUUEE
       Upon successful completion, these functions shall return a value of
       zero. Otherwise, they shall return the corresponding error number.

       The _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r() function stores the trace attributes in the
       object pointed to by _a_t_t_r, if successful.

       The _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() function stores the trace status in the
       object pointed to by _s_t_a_t_u_s_i_n_f_o, if successful.

EERRRROORRSS
       These functions shall fail if:

       EEIINNVVAALL The trace stream argument _t_r_i_d does not correspond to a valid
              active trace stream or a valid trace log.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       The _p_o_s_i_x___t_r_a_c_e___g_e_t___a_t_t_r() and _p_o_s_i_x___t_r_a_c_e___g_e_t___s_t_a_t_u_s() functions may
       be removed in a future version.

SSEEEE AALLSSOO
       _p_o_s_i_x___t_r_a_c_e___a_t_t_r___d_e_s_t_r_o_y(), _p_o_s_i_x___t_r_a_c_e___c_l_o_s_e(), _p_o_s_i_x___t_r_a_c_e___c_r_e_a_t_e()

       The Base Definitions volume of POSIX.1-2017, <<ttrraaccee..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017              POSIX_TRACE_GET_ATTR(3)
