1POSIX_TRACE_GET_ATTR(3P) POSIX Programmer's Manual POSIX_TRACE_GET_ATTR(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 posix_trace_get_attr, posix_trace_get_status — retrieve the trace
14 attributes or trace status (TRACING)
15
17 #include <trace.h>
18
19 int posix_trace_get_attr(trace_id_t trid, trace_attr_t *attr);
20 int posix_trace_get_status(trace_id_t trid,
21 struct posix_trace_status_info *statusinfo);
22
24 The posix_trace_get_attr() function shall copy the attributes of the
25 active trace stream identified by trid into the object pointed to by
26 the attr argument. If the Trace Log option is supported, trid may rep‐
27 resent a pre-recorded trace log.
28
29 The posix_trace_get_status() function shall return, in the structure
30 pointed to by the statusinfo argument, the current trace status for the
31 trace stream identified by the trid argument. These status values
32 returned in the structure pointed to by statusinfo shall have been
33 appropriately read to ensure that the returned values are consistent.
34 If the Trace Log option is supported and the trid argument refers to a
35 pre-recorded trace stream, the status shall be the status of the com‐
36 pleted trace stream.
37
38 Each time the posix_trace_get_status() function is used, the overrun
39 status of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
40 immediately after the call completes. If the Trace Log option is sup‐
41 ported, the posix_trace_get_status() function shall behave the same as
42 when the option is not supported except for the following differences:
43
44 * If the trid argument refers to a trace stream with log, each time
45 the posix_trace_get_status() function is used, the log overrun sta‐
46 tus of the trace stream shall be reset to POSIX_TRACE_NO_OVERRUN
47 and the flush_error status shall be reset to zero immediately after
48 the call completes.
49
50 * If the trid argument refers to a pre-recorded trace stream, the
51 status returned shall be the status of the completed trace stream
52 and the status values of the trace stream shall not be reset.
53
55 Upon successful completion, these functions shall return a value of
56 zero. Otherwise, they shall return the corresponding error number.
57
58 The posix_trace_get_attr() function stores the trace attributes in the
59 object pointed to by attr, if successful.
60
61 The posix_trace_get_status() function stores the trace status in the
62 object pointed to by statusinfo, if successful.
63
65 These functions shall fail if:
66
67 EINVAL The trace stream argument trid does not correspond to a valid
68 active trace stream or a valid trace log.
69
70 The following sections are informative.
71
73 None.
74
76 None.
77
79 None.
80
82 The posix_trace_get_attr() and posix_trace_get_status() functions may
83 be removed in a future version.
84
86 posix_trace_attr_destroy(), posix_trace_close(), posix_trace_create()
87
88 The Base Definitions volume of POSIX.1‐2008, <trace.h>
89
91 Portions of this text are reprinted and reproduced in electronic form
92 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
93 -- Portable Operating System Interface (POSIX), The Open Group Base
94 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
95 cal and Electronics Engineers, Inc and The Open Group. (This is
96 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
97 event of any discrepancy between this version and the original IEEE and
98 The Open Group Standard, the original IEEE and The Open Group Standard
99 is the referee document. The original Standard can be obtained online
100 at http://www.unix.org/online.html .
101
102 Any typographical or formatting errors that appear in this page are
103 most likely to have been introduced during the conversion of the source
104 files to man page format. To report such errors, see https://www.ker‐
105 nel.org/doc/man-pages/reporting_bugs.html .
106
107
108
109IEEE/The Open Group 2013 POSIX_TRACE_GET_ATTR(3P)