Debian Codegraph @

man/systemd.journal-fields.xml

raw
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="systemd.journal-fields" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>systemd.journal-fields</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd.journal-fields</refentrytitle>
15 <manvolnum>7</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd.journal-fields</refname>
20 <refpurpose>Special journal fields</refpurpose>
21 </refnamediv>
22
23 <refsect1>
24 <title>Description</title>
25
26 <para>Entries in the journal (as written by
27 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>)
28 resemble a UNIX process environment block in syntax but with field values that may include binary data,
29 and with non-unique field names permitted. Primarily, field values are formatted UTF-8 text strings —
30 binary encoding is used only where formatting as UTF-8 text strings makes little sense. New fields may
31 freely be defined by applications, but a few fields have special meanings, which are listed
32 below. Typically, fields may only appear once per log entry, however there are special exceptions: some
33 fields may appear more than once per entry, in which case this is explicitly mentioned below. Even though
34 the logging subsystem makes no restrictions on which fields to accept non-unique values for, it is
35 strongly recommended to avoid relying on this for the fields listed below (except where listed otherwise,
36 as mentioned) in order to avoid unnecessary incompatibilities with other applications.</para>
37 </refsect1>
38
39 <refsect1>
40 <title>User Journal Fields</title>
41
42 <para>User fields are fields that are directly passed from clients
43 and stored in the journal.</para>
44
45 <variablelist class='journal-directives'>
46 <varlistentry>
47 <term><varname>MESSAGE=</varname></term>
48 <listitem>
49 <para>The human-readable message string for this entry. This is supposed to be the primary text
50 shown to the user. It is usually not translated (but might be in some cases), and is not supposed
51 to be parsed for metadata. In order to encode multiple lines in a single log entry, separate them
52 by newline characters (ASCII code 10), but encode them as a single <varname>MESSAGE=</varname>
53 field. Do not add multiple values of this field type to the same entry (also see above), as
54 consuming applications generally do not expect this and are unlikely to show all values in that
55 case.</para>
56 </listitem>
57 </varlistentry>
58
59 <varlistentry>
60 <term><varname>MESSAGE_ID=</varname></term>
61 <listitem>
62 <para>A 128-bit message identifier ID for recognizing certain message types, if this is desirable. This
63 should contain a 128-bit ID formatted as a lower-case hexadecimal string, without any separating dashes or
64 suchlike. This is recommended to be a UUID-compatible ID, but this is not enforced, and formatted
65 differently. Developers can generate a new ID for this purpose with <command>systemd-id128 new</command>.
66 </para>
67 </listitem>
68 </varlistentry>
69
70 <varlistentry>
71 <term><varname>PRIORITY=</varname></term>
72 <listitem>
73 <para>A priority value between 0 (<literal>emerg</literal>)
74 and 7 (<literal>debug</literal>) formatted as a decimal
75 string. This field is compatible with syslog's priority
76 concept.</para>
77 </listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term><varname>CODE_FILE=</varname></term>
82 <term><varname>CODE_LINE=</varname></term>
83 <term><varname>CODE_FUNC=</varname></term>
84 <listitem>
85 <para>The code location generating this message, if known.
86 Contains the source filename, the line number and the
87 function name.</para>
88 </listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><varname>ERRNO=</varname></term>
93 <listitem>
94 <para>The low-level Unix error number causing this entry, if
95 any. Contains the numeric value of
96 <citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
97 formatted as a decimal string.</para>
98
99 <xi:include href="version-info.xml" xpointer="v188"/>
100 </listitem>
101 </varlistentry>
102
103 <varlistentry>
104 <term><varname>INVOCATION_ID=</varname></term>
105 <term><varname>USER_INVOCATION_ID=</varname></term>
106 <listitem>
107 <para>A randomized, unique 128-bit ID identifying each runtime cycle of the unit. This is different from
108 <varname>_SYSTEMD_INVOCATION_ID</varname> in that it is only used for messages coming from systemd code
109 (e.g. logs from the system/user manager or from forked processes performing systemd-related setup).</para>
110
111 <xi:include href="version-info.xml" xpointer="v245"/>
112 </listitem>
113 </varlistentry>
114
115 <varlistentry>
116 <term><varname>SYSLOG_FACILITY=</varname></term>
117 <term><varname>SYSLOG_IDENTIFIER=</varname></term>
118 <term><varname>SYSLOG_PID=</varname></term>
119 <term><varname>SYSLOG_TIMESTAMP=</varname></term>
120 <listitem>
121 <para>Syslog compatibility fields containing the facility (formatted as
122 decimal string), the identifier string (i.e. "tag"), the client PID, and
123 the timestamp as specified in the original datagram. (Note that the tag is
124 usually derived from glibc's
125 <varname>program_invocation_short_name</varname> variable, see
126 <citerefentry project='die-net'><refentrytitle>program_invocation_short_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>.)</para>
127 <para>Note that the journal service does not validate the values of any structured
128 journal fields whose name is not prefixed with an underscore, and this includes any
129 syslog related fields such as these. Hence, applications that supply a facility, PID,
130 or log level are expected to do so properly formatted, i.e. as integers formatted
131 as decimals.</para>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry>
136 <term><varname>SYSLOG_RAW=</varname></term>
137 <listitem>
138 <para>The original contents of the syslog line as received in the syslog
139 datagram. This field is only included if the <varname>MESSAGE=</varname>
140 field was modified compared to the original payload or the timestamp could
141 not be located properly and is not included in
142 <varname>SYSLOG_TIMESTAMP=</varname>. Message truncation occurs when
143 the message contains leading or trailing whitespace (trailing and leading
144 whitespace is stripped), or it contains an embedded
145 <constant>NUL</constant> byte (the <constant>NUL</constant> byte and
146 anything after it is not included). Thus, the original syslog line is
147 either stored as <varname>SYSLOG_RAW=</varname> or it can be recreated
148 based on the stored priority and facility, timestamp, identifier, and the
149 message payload in <varname>MESSAGE=</varname>.
150 </para>
151
152 <xi:include href="version-info.xml" xpointer="v240"/>
153 </listitem>
154 </varlistentry>
155
156 <varlistentry>
157 <term><varname>DOCUMENTATION=</varname></term>
158 <listitem>
159 <para>A documentation URL with further information about the topic of the log message. Tools such
160 as <command>journalctl</command> will include a hyperlink to a URL specified this way in their
161 output. Should be an <literal>http://</literal>, <literal>https://</literal>,
162 <literal>file:/</literal>, <literal>man:</literal> or <literal>info:</literal> URL.</para>
163
164 <xi:include href="version-info.xml" xpointer="v246"/>
165 </listitem>
166 </varlistentry>
167
168 <varlistentry>
169 <term><varname>TID=</varname></term>
170 <listitem>
171 <para>The numeric thread ID (TID) the log message originates from.</para>
172
173 <xi:include href="version-info.xml" xpointer="v247"/>
174 </listitem>
175 </varlistentry>
176
177 <varlistentry>
178 <term><varname>UNIT=</varname></term>
179 <term><varname>USER_UNIT=</varname></term>
180 <listitem>
181 <para>The name of a unit. Used by the system and user managers when logging about specific
182 units.</para>
183
184 <para>When <option>--unit=<replaceable>name</replaceable></option> or
185 <option>--user-unit=<replaceable>name</replaceable></option> are used with
186 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, a
187 match pattern that includes <literal>UNIT=<replaceable>name</replaceable>.service</literal> or
188 <literal>USER_UNIT=<replaceable>name</replaceable>.service</literal> will be generated.</para>
189
190 <xi:include href="version-info.xml" xpointer="v251"/>
191 </listitem>
192 </varlistentry>
193 </variablelist>
194 </refsect1>
195
196 <refsect1>
197 <title>Trusted Journal Fields</title>
198
199 <para>Fields prefixed with an underscore are trusted fields, i.e.
200 fields that are implicitly added by the journal and cannot be
201 altered by client code.</para>
202
203 <variablelist class='journal-directives'>
204 <varlistentry>
205 <term><varname>_PID=</varname></term>
206 <term><varname>_UID=</varname></term>
207 <term><varname>_GID=</varname></term>
208 <listitem>
209 <para>The process number, user number, and group number of the process the journal entry originates
210 from formatted as decimals. Note that entries obtained via <literal>stdout</literal> or
211 <literal>stderr</literal> of forked processes will contain credentials valid for a parent process
212 (that initiated the connection to <command>systemd-journald</command>).</para>
213 </listitem>
214 </varlistentry>
215
216 <varlistentry>
217 <term><varname>_COMM=</varname></term>
218 <term><varname>_EXE=</varname></term>
219 <term><varname>_CMDLINE=</varname></term>
220 <listitem>
221 <para>The name, the executable path, and the command line of
222 the process the journal entry originates from.</para>
223 </listitem>
224 </varlistentry>
225
226 <varlistentry>
227 <term><varname>_CAP_EFFECTIVE=</varname></term>
228 <listitem>
229 <para>The effective
230 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
231 of the process the journal entry originates from.</para>
232
233 <xi:include href="version-info.xml" xpointer="v206"/>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry>
238 <term><varname>_AUDIT_SESSION=</varname></term>
239 <term><varname>_AUDIT_LOGINUID=</varname></term>
240 <listitem>
241 <para>The session and login UID of the process the journal
242 entry originates from, as maintained by the kernel audit
243 subsystem.</para>
244 </listitem>
245 </varlistentry>
246
247 <varlistentry>
248 <term><varname>_SYSTEMD_CGROUP=</varname></term>
249 <term><varname>_SYSTEMD_SLICE=</varname></term>
250 <term><varname>_SYSTEMD_UNIT=</varname></term>
251 <term><varname>_SYSTEMD_USER_UNIT=</varname></term>
252 <term><varname>_SYSTEMD_USER_SLICE=</varname></term>
253 <term><varname>_SYSTEMD_SESSION=</varname></term>
254 <term><varname>_SYSTEMD_OWNER_UID=</varname></term>
255
256 <listitem>
257 <para>The control group path in the systemd hierarchy, the systemd slice unit name, the systemd
258 unit name, the unit name in the systemd user manager (if any), the systemd session ID (if any), and
259 the owner UID of the systemd user unit or systemd session (if any) of the process the journal entry
260 originates from.</para>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry>
265 <term><varname>_SELINUX_CONTEXT=</varname></term>
266 <listitem>
267 <para>The SELinux security context (label) of the process
268 the journal entry originates from.</para>
269 </listitem>
270 </varlistentry>
271
272 <varlistentry>
273 <term><varname>_SOURCE_REALTIME_TIMESTAMP=</varname></term>
274 <listitem>
275 <para>The earliest trusted timestamp of the message, if any is known that is different from the
276 reception time of the journal. The timestamp is the <constant>CLOCK_REALTIME</constant> time in
277 microseconds, formatted as a decimal.</para>
278 </listitem>
279 </varlistentry>
280
281 <varlistentry>
282 <term><varname>_SOURCE_BOOTTIME_TIMESTAMP=</varname></term>
283 <listitem>
284 <para>The earliest trusted timestamp of the message in the <constant>CLOCK_BOOTTIME</constant>
285 time, in the same format as <varname>_SOURCE_REALTIME_TIMESTAMP=</varname>.</para>
286
287 <xi:include href="version-info.xml" xpointer="v257"/>
288 </listitem>
289 </varlistentry>
290
291 <varlistentry>
292 <term><varname>_BOOT_ID=</varname></term>
293 <listitem>
294 <para>The kernel boot ID for the boot the message was
295 generated in, formatted as a 128-bit hexadecimal
296 string.</para>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry>
301 <term><varname>_MACHINE_ID=</varname></term>
302 <listitem>
303 <para>The machine ID of the originating host, as described in
304 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
305 </listitem>
306 </varlistentry>
307
308 <varlistentry>
309 <term><varname>_SYSTEMD_INVOCATION_ID=</varname></term>
310 <listitem>
311 <para>The invocation ID for the runtime cycle of the unit
312 the message was generated in, as available to processes
313 of the unit in <varname>$INVOCATION_ID</varname> (see
314 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</para>
315
316 <xi:include href="version-info.xml" xpointer="v233"/>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry>
321 <term><varname>_HOSTNAME=</varname></term>
322 <listitem>
323 <para>The hostname of the originating host.</para>
324 </listitem>
325 </varlistentry>
326
327 <varlistentry>
328 <term><varname>_TRANSPORT=</varname></term>
329 <listitem>
330 <para>How the entry was received by the journal service.
331 Valid transports are:
332 </para>
333 <variablelist>
334 <varlistentry>
335 <term>
336 <option>audit</option>
337 </term>
338 <listitem>
339 <para>for those read from the kernel audit subsystem
340 </para>
341
342 <xi:include href="version-info.xml" xpointer="v227"/>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry>
347 <term>
348 <option>driver</option>
349 </term>
350 <listitem>
351 <para>for internally generated messages
352 </para>
353
354 <xi:include href="version-info.xml" xpointer="v205"/>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry>
359 <term>
360 <option>syslog</option>
361 </term>
362 <listitem>
363 <para>for those received via the local syslog socket
364 with the syslog protocol
365 </para>
366
367 <xi:include href="version-info.xml" xpointer="v205"/>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry>
372 <term>
373 <option>journal</option>
374 </term>
375 <listitem>
376 <para>for those received via the native journal
377 protocol
378 </para>
379
380 <xi:include href="version-info.xml" xpointer="v205"/>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry>
385 <term>
386 <option>stdout</option>
387 </term>
388 <listitem>
389 <para>for those read from a service's standard output
390 or error output
391 </para>
392
393 <xi:include href="version-info.xml" xpointer="v205"/>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry>
398 <term>
399 <option>kernel</option>
400 </term>
401 <listitem>
402 <para>for those read from the kernel
403 </para>
404
405 <xi:include href="version-info.xml" xpointer="v205"/>
406 </listitem>
407 </varlistentry>
408 </variablelist>
409 </listitem>
410 </varlistentry>
411 <varlistentry>
412 <term><varname>_STREAM_ID=</varname></term>
413 <listitem>
414 <para>Only applies to <literal>_TRANSPORT=stdout</literal> records: specifies a randomized 128-bit ID assigned
415 to the stream connection when it was first created. This ID is useful to reconstruct individual log streams
416 from the log records: all log records carrying the same stream ID originate from the same stream.</para>
417
418 <xi:include href="version-info.xml" xpointer="v235"/>
419 </listitem>
420 </varlistentry>
421 <varlistentry>
422 <term><varname>_LINE_BREAK=</varname></term>
423 <listitem>
424 <para>Only applies to <literal>_TRANSPORT=stdout</literal> records: indicates that the log message
425 in the standard output/error stream was not terminated with a normal newline character
426 (<literal>\n</literal>, i.e. ASCII 10). Specifically, when set this field is one of
427 <option>nul</option> (in case the line was terminated by a <constant>NUL</constant> byte), <option>line-max</option> (in
428 case the maximum log line length was reached, as configured with <varname>LineMax=</varname> in
429 <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
430 <option>eof</option> (if this was the last log record of a stream and the stream ended without a
431 final newline character), or <option>pid-change</option> (if the process which generated the log
432 output changed in the middle of a line). Note that this record is not generated when a normal
433 newline character was used for marking the log line end.</para>
434
435 <xi:include href="version-info.xml" xpointer="v235"/>
436 </listitem>
437 </varlistentry>
438 <varlistentry>
439 <term><varname>_NAMESPACE=</varname></term>
440
441 <listitem><para>If this file was written by a <command>systemd-journald</command> instance managing a
442 journal namespace that is not the default, this field contains the namespace identifier. See
443 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
444 for details about journal namespaces.</para>
445
446 <xi:include href="version-info.xml" xpointer="v245"/>
447 </listitem>
448 </varlistentry>
449 <varlistentry>
450 <term><varname>_RUNTIME_SCOPE=</varname></term>
451
452 <listitem><para>A string field that specifies the runtime scope in which the message was logged. If
453 <literal>initrd</literal>, the log message was processed while the system was running inside the
454 initrd. If <literal>system</literal>, the log message was generated after the system switched
455 execution to the host root filesystem.</para>
456
457 <xi:include href="version-info.xml" xpointer="v252"/></listitem>
458 </varlistentry>
459 </variablelist>
460 </refsect1>
461
462 <refsect1>
463 <title>Kernel Journal Fields</title>
464
465 <para>Kernel fields are fields that are used by messages
466 originating in the kernel and stored in the journal.</para>
467
468 <variablelist class='journal-directives'>
469 <varlistentry>
470 <term><varname>_KERNEL_DEVICE=</varname></term>
471 <listitem>
472 <para>The kernel device name. If the entry is associated to a block device, contains the major and
473 minor numbers of the device node, separated by <literal>:</literal> and prefixed by
474 <literal>b</literal>. Similarly for character devices, but prefixed by <literal>c</literal>. For
475 network devices, this is the interface index prefixed by <literal>n</literal>. For all other
476 devices, this is the subsystem name prefixed by <literal>+</literal>, followed by
477 <literal>:</literal>, followed by the kernel device name.</para>
478
479 <xi:include href="version-info.xml" xpointer="v189"/>
480 </listitem>
481 </varlistentry>
482 <varlistentry>
483 <term><varname>_KERNEL_SUBSYSTEM=</varname></term>
484 <listitem>
485 <para>The kernel subsystem name.</para>
486
487 <xi:include href="version-info.xml" xpointer="v189"/>
488 </listitem>
489 </varlistentry>
490 <varlistentry>
491 <term><varname>_UDEV_SYSNAME=</varname></term>
492 <listitem>
493 <para>The kernel device name as it shows up in the device
494 tree below <filename>/sys/</filename>.</para>
495
496 <xi:include href="version-info.xml" xpointer="v189"/>
497 </listitem>
498 </varlistentry>
499 <varlistentry>
500 <term><varname>_UDEV_DEVNODE=</varname></term>
501 <listitem>
502 <para>The device node path of this device in
503 <filename>/dev/</filename>.</para>
504
505 <xi:include href="version-info.xml" xpointer="v189"/>
506 </listitem>
507 </varlistentry>
508 <varlistentry>
509 <term><varname>_UDEV_DEVLINK=</varname></term>
510 <listitem>
511 <para>Additional symlink names pointing to the device node
512 in <filename>/dev/</filename>. This field is frequently set
513 more than once per entry.</para>
514
515 <xi:include href="version-info.xml" xpointer="v189"/>
516 </listitem>
517 </varlistentry>
518 </variablelist>
519 </refsect1>
520
521 <refsect1>
522 <title>Fields to log on behalf of a different program</title>
523
524 <para>Fields in this section are used by programs to specify that
525 they are logging on behalf of another program or unit.
526 </para>
527
528 <para>Fields used by the <command>systemd-coredump</command>
529 coredump kernel helper:
530 </para>
531
532 <variablelist class='journal-directives'>
533 <varlistentry>
534 <term><varname>COREDUMP_UNIT=</varname></term>
535 <term><varname>COREDUMP_USER_UNIT=</varname></term>
536 <listitem>
537 <para>Used to annotate messages containing coredumps from
538 system and session units. See
539 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
540 </para>
541
542 <xi:include href="version-info.xml" xpointer="v198"/>
543 </listitem>
544 </varlistentry>
545 </variablelist>
546
547 <para>Privileged programs (currently UID 0) may attach
548 <varname>OBJECT_PID=</varname> to a message. This will instruct
549 <command>systemd-journald</command> to attach additional fields on
550 behalf of the caller:</para>
551
552 <variablelist class='journal-directives'>
553 <varlistentry>
554 <term><varname>OBJECT_PID=<replaceable>PID</replaceable></varname></term>
555 <listitem>
556 <para>PID of the program that this message pertains to.</para>
557
558 <xi:include href="version-info.xml" xpointer="v205"/>
559 </listitem>
560 </varlistentry>
561
562 <varlistentry>
563 <term><varname>OBJECT_UID=</varname></term>
564 <term><varname>OBJECT_GID=</varname></term>
565 <term><varname>OBJECT_COMM=</varname></term>
566 <term><varname>OBJECT_EXE=</varname></term>
567 <term><varname>OBJECT_CMDLINE=</varname></term>
568 <term><varname>OBJECT_AUDIT_SESSION=</varname></term>
569 <term><varname>OBJECT_AUDIT_LOGINUID=</varname></term>
570 <term><varname>OBJECT_SYSTEMD_CGROUP=</varname></term>
571 <term><varname>OBJECT_SYSTEMD_SESSION=</varname></term>
572 <term><varname>OBJECT_SYSTEMD_OWNER_UID=</varname></term>
573 <term><varname>OBJECT_SYSTEMD_UNIT=</varname></term>
574 <term><varname>OBJECT_SYSTEMD_USER_UNIT=</varname></term>
575 <listitem>
576 <para>These are additional fields added automatically by <command>systemd-journald</command>.
577 Their meaning is the same as
578 <varname>_UID=</varname>,
579 <varname>_GID=</varname>,
580 <varname>_COMM=</varname>,
581 <varname>_EXE=</varname>,
582 <varname>_CMDLINE=</varname>,
583 <varname>_AUDIT_SESSION=</varname>,
584 <varname>_AUDIT_LOGINUID=</varname>,
585 <varname>_SYSTEMD_CGROUP=</varname>,
586 <varname>_SYSTEMD_SESSION=</varname>,
587 <varname>_SYSTEMD_UNIT=</varname>,
588 <varname>_SYSTEMD_USER_UNIT=</varname>, and
589 <varname>_SYSTEMD_OWNER_UID=</varname>
590 as described above, except that the process identified by
591 <replaceable>PID</replaceable> is described, instead of the
592 process which logged the message.</para>
593
594 <xi:include href="version-info.xml" xpointer="v205"/>
595 </listitem>
596 </varlistentry>
597
598 <varlistentry>
599 <term><varname>OBJECT_SYSTEMD_INVOCATION_ID=</varname></term>
600 <listitem>
601 <para>An additional field added automatically by <command>systemd-journald</command>. The meaning
602 is mostly the same as <varname>_SYSTEMD_INVOCATION_ID=</varname>, with the difference described
603 above.</para>
604
605 <xi:include href="version-info.xml" xpointer="v235"/>
606 </listitem>
607 </varlistentry>
608 </variablelist>
609
610 </refsect1>
611
612 <refsect1>
613 <title>Address Fields</title>
614
615 <para>During serialization into external formats, such as the
616 <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format">Journal Export Format</ulink>
617 or the
618 <ulink url="https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format">Journal JSON Format</ulink>,
619 the addresses of journal entries are
620 serialized into fields prefixed with double underscores. Note that
621 these are not proper fields when stored in the journal but for
622 addressing metadata of entries. They cannot be written as part of
623 structured log entries via calls such as
624 <citerefentry><refentrytitle>sd_journal_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
625 They may also not be used as matches for
626 <citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
627 </para>
628
629 <variablelist class='journal-directives'>
630 <varlistentry>
631 <term><varname>__CURSOR=</varname></term>
632 <listitem>
633 <para>The cursor for the entry. A cursor is an opaque text
634 string that uniquely describes the position of an entry in
635 the journal and is portable across machines, platforms and
636 journal files.
637 </para>
638 </listitem>
639 </varlistentry>
640
641 <varlistentry>
642 <term><varname>__REALTIME_TIMESTAMP=</varname></term>
643 <listitem>
644 <para>The wallclock time
645 (<constant>CLOCK_REALTIME</constant>) at the point in time
646 the entry was received by the journal, in microseconds since
647 the epoch UTC, formatted as a decimal. This has
648 different properties from
649 <literal>_SOURCE_REALTIME_TIMESTAMP=</literal>, as it is
650 usually a bit later but more likely to be monotonic.
651 </para>
652 </listitem>
653 </varlistentry>
654
655 <varlistentry>
656 <term><varname>__MONOTONIC_TIMESTAMP=</varname></term>
657 <listitem>
658 <para>The monotonic time
659 (<constant>CLOCK_MONOTONIC</constant>) at the point in time
660 the entry was received by the journal in microseconds,
661 formatted as a decimal. To be useful as an address
662 for the entry, this should be combined with the boot ID in
663 <literal>_BOOT_ID=</literal>.
664 </para>
665 </listitem>
666 </varlistentry>
667
668 <varlistentry>
669 <term><varname>__SEQNUM=</varname></term>
670 <term><varname>__SEQNUM_ID=</varname></term>
671
672 <listitem><para>The sequence number (and associated sequence number ID) of this journal entry in the
673 journal file it originates from. See
674 <citerefentry><refentrytitle>sd_journal_get_seqnum</refentrytitle><manvolnum>3</manvolnum></citerefentry>
675 for details.</para>
676
677 <xi:include href="version-info.xml" xpointer="v254"/></listitem>
678 </varlistentry>
679 </variablelist>
680 </refsect1>
681
682 <refsect1>
683 <title>See Also</title>
684 <para><simplelist type="inline">
685 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
686 <member><citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
687 <member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
688 <member><citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
689 <member><citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
690 <member><citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
691 <member><citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
692 </simplelist></para>
693 </refsect1>
694
695 </refentry>