1SYSTEMD.JOURNAL-FIELDS(7)   systemd.journal-fields   SYSTEMD.JOURNAL-FIELDS(7)
2
3
4

NAME

6       systemd.journal-fields - Special journal fields
7

DESCRIPTION

9       Entries in the journal (as written by systemd-journald.service(8))
10       resemble a UNIX process environment block in syntax but with fields
11       that may include binary data. Primarily, fields are formatted UTF-8
12       text strings, and binary encoding is used only where formatting as
13       UTF-8 text strings makes little sense. New fields may freely be defined
14       by applications, but a few fields have special meanings. All fields
15       with special meanings are optional. In some cases, fields may appear
16       more than once per entry.
17

USER JOURNAL FIELDS

19       User fields are fields that are directly passed from clients and stored
20       in the journal.
21
22       MESSAGE=
23           The human-readable message string for this entry. This is supposed
24           to be the primary text shown to the user. It is usually not
25           translated (but might be in some cases), and is not supposed to be
26           parsed for metadata.
27
28       MESSAGE_ID=
29           A 128-bit message identifier ID for recognizing certain message
30           types, if this is desirable. This should contain a 128-bit ID
31           formatted as a lower-case hexadecimal string, without any
32           separating dashes or suchlike. This is recommended to be a
33           UUID-compatible ID, but this is not enforced, and formatted
34           differently. Developers can generate a new ID for this purpose with
35           systemd-id128 new.
36
37       PRIORITY=
38           A priority value between 0 ("emerg") and 7 ("debug") formatted as a
39           decimal string. This field is compatible with syslog's priority
40           concept.
41
42       CODE_FILE=, CODE_LINE=, CODE_FUNC=
43           The code location generating this message, if known. Contains the
44           source filename, the line number and the function name.
45
46       ERRNO=
47           The low-level Unix error number causing this entry, if any.
48           Contains the numeric value of errno(3) formatted as a decimal
49           string.
50
51       INVOCATION_ID=, USER_INVOCATION_ID=
52           A randomized, unique 128-bit ID identifying each runtime cycle of
53           the unit. This is different from _SYSTEMD_INVOCATION_ID in that it
54           is only used for messages coming from systemd code (e.g. logs from
55           the system/user manager or from forked processes performing
56           systemd-related setup).
57
58       SYSLOG_FACILITY=, SYSLOG_IDENTIFIER=, SYSLOG_PID=, SYSLOG_TIMESTAMP=
59           Syslog compatibility fields containing the facility (formatted as
60           decimal string), the identifier string (i.e. "tag"), the client
61           PID, and the timestamp as specified in the original datagram. (Note
62           that the tag is usually derived from glibc's
63           program_invocation_short_name variable, see
64           program_invocation_short_name(3).)
65
66           Note that the journal service does not validate the values of any
67           structured journal fields whose name is not prefixed with an
68           underscore, and this includes any syslog related fields such as
69           these. Hence, applications that supply a facility, PID, or log
70           level are expected to do so properly formatted, i.e. as numeric
71           integers formatted as decimal strings.
72
73       SYSLOG_RAW=
74           The original contents of the syslog line as received in the syslog
75           datagram. This field is only included if the MESSAGE= field was
76           modified compared to the original payload or the timestamp could
77           not be located properly and is not included in SYSLOG_TIMESTAMP=.
78           Message truncation occurs when the message contains leading or
79           trailing whitespace (trailing and leading whitespace is stripped),
80           or it contains an embedded NUL byte (the NUL byte and anything
81           after it is not included). Thus, the original syslog line is either
82           stored as SYSLOG_RAW= or it can be recreated based on the stored
83           priority and facility, timestamp, identifier, and the message
84           payload in MESSAGE=.
85
86       DOCUMENTATION=
87           A documentation URL with further information about the topic of the
88           log message. Tools such as journalctl will include a hyperlink to
89           an URL specified this way in their output. Should be an "http://",
90           "https://", "file:/", "man:" or "info:" URL.
91
92       TID=
93           The numeric thread ID (TID) the log message originates from.
94
95       UNIT=, USER_UNIT=
96           The name of a unit. Used by the system and user managers when
97           logging about specific units.
98
99           When --unit=name or --user-unit=name are used with journalctl(1), a
100           match pattern that includes "UNIT=name.service" or
101           "USER_UNIT=name.service" will be generated.
102

TRUSTED JOURNAL FIELDS

104       Fields prefixed with an underscore are trusted fields, i.e. fields that
105       are implicitly added by the journal and cannot be altered by client
106       code.
107
108       _PID=, _UID=, _GID=
109           The process, user, and group ID of the process the journal entry
110           originates from formatted as a decimal string. Note that entries
111           obtained via "stdout" or "stderr" of forked processes will contain
112           credentials valid for a parent process (that initiated the
113           connection to systemd-journald).
114
115       _COMM=, _EXE=, _CMDLINE=
116           The name, the executable path, and the command line of the process
117           the journal entry originates from.
118
119       _CAP_EFFECTIVE=
120           The effective capabilities(7) of the process the journal entry
121           originates from.
122
123       _AUDIT_SESSION=, _AUDIT_LOGINUID=
124           The session and login UID of the process the journal entry
125           originates from, as maintained by the kernel audit subsystem.
126
127       _SYSTEMD_CGROUP=, _SYSTEMD_SLICE=, _SYSTEMD_UNIT=, _SYSTEMD_USER_UNIT=,
128       _SYSTEMD_USER_SLICE=, _SYSTEMD_SESSION=, _SYSTEMD_OWNER_UID=
129           The control group path in the systemd hierarchy, the systemd slice
130           unit name, the systemd unit name, the unit name in the systemd user
131           manager (if any), the systemd session ID (if any), and the owner
132           UID of the systemd user unit or systemd session (if any) of the
133           process the journal entry originates from.
134
135       _SELINUX_CONTEXT=
136           The SELinux security context (label) of the process the journal
137           entry originates from.
138
139       _SOURCE_REALTIME_TIMESTAMP=
140           The earliest trusted timestamp of the message, if any is known that
141           is different from the reception time of the journal. This is the
142           time in microseconds since the epoch UTC, formatted as a decimal
143           string.
144
145       _BOOT_ID=
146           The kernel boot ID for the boot the message was generated in,
147           formatted as a 128-bit hexadecimal string.
148
149       _MACHINE_ID=
150           The machine ID of the originating host, as available in machine-
151           id(5).
152
153       _SYSTEMD_INVOCATION_ID=
154           The invocation ID for the runtime cycle of the unit the message was
155           generated in, as available to processes of the unit in
156           $INVOCATION_ID (see systemd.exec(5)).
157
158       _HOSTNAME=
159           The name of the originating host.
160
161       _TRANSPORT=
162           How the entry was received by the journal service. Valid transports
163           are:
164
165           audit
166               for those read from the kernel audit subsystem
167
168           driver
169               for internally generated messages
170
171           syslog
172               for those received via the local syslog socket with the syslog
173               protocol
174
175           journal
176               for those received via the native journal protocol
177
178           stdout
179               for those read from a service's standard output or error output
180
181           kernel
182               for those read from the kernel
183
184       _STREAM_ID=
185           Only applies to "_TRANSPORT=stdout" records: specifies a randomized
186           128bit ID assigned to the stream connection when it was first
187           created. This ID is useful to reconstruct individual log streams
188           from the log records: all log records carrying the same stream ID
189           originate from the same stream.
190
191       _LINE_BREAK=
192           Only applies to "_TRANSPORT=stdout" records: indicates that the log
193           message in the standard output/error stream was not terminated with
194           a normal newline character ("\n", i.e. ASCII 10). Specifically,
195           when set this field is one of nul (in case the line was terminated
196           by a NUL byte), line-max (in case the maximum log line length was
197           reached, as configured with LineMax= in journald.conf(5)), eof (if
198           this was the last log record of a stream and the stream ended
199           without a final newline character), or pid-change (if the process
200           which generated the log output changed in the middle of a line).
201           Note that this record is not generated when a normal newline
202           character was used for marking the log line end.
203
204       _NAMESPACE=
205           If this file was written by a systemd-journald instance managing a
206           journal namespace that is not the default, this field contains the
207           namespace identifier. See systemd-journald.service(8) for details
208           about journal namespaces.
209

KERNEL JOURNAL FIELDS

211       Kernel fields are fields that are used by messages originating in the
212       kernel and stored in the journal.
213
214       _KERNEL_DEVICE=
215           The kernel device name. If the entry is associated to a block
216           device, contains the major and minor numbers of the device node,
217           separated by ":" and prefixed by "b". Similarly for character
218           devices, but prefixed by "c". For network devices, this is the
219           interface index prefixed by "n". For all other devices, this is the
220           subsystem name prefixed by "+", followed by ":", followed by the
221           kernel device name.
222
223       _KERNEL_SUBSYSTEM=
224           The kernel subsystem name.
225
226       _UDEV_SYSNAME=
227           The kernel device name as it shows up in the device tree below
228           /sys/.
229
230       _UDEV_DEVNODE=
231           The device node path of this device in /dev/.
232
233       _UDEV_DEVLINK=
234           Additional symlink names pointing to the device node in /dev/. This
235           field is frequently set more than once per entry.
236

FIELDS TO LOG ON BEHALF OF A DIFFERENT PROGRAM

238       Fields in this section are used by programs to specify that they are
239       logging on behalf of another program or unit.
240
241       Fields used by the systemd-coredump coredump kernel helper:
242
243       COREDUMP_UNIT=, COREDUMP_USER_UNIT=
244           Used to annotate messages containing coredumps from system and
245           session units. See coredumpctl(1).
246
247       Privileged programs (currently UID 0) may attach OBJECT_PID= to a
248       message. This will instruct systemd-journald to attach additional
249       fields on behalf of the caller:
250
251       OBJECT_PID=PID
252           PID of the program that this message pertains to.
253
254       OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
255       OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
256       OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
257       OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
258           These are additional fields added automatically by
259           systemd-journald. Their meaning is the same as _UID=, _GID=,
260           _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
261           _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
262           _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
263           except that the process identified by PID is described, instead of
264           the process which logged the message.
265

ADDRESS FIELDS

267       During serialization into external formats, such as the Journal Export
268       Format[1] or the Journal JSON Format[2], the addresses of journal
269       entries are serialized into fields prefixed with double underscores.
270       Note that these are not proper fields when stored in the journal but
271       for addressing metadata of entries. They cannot be written as part of
272       structured log entries via calls such as sd_journal_send(3). They may
273       also not be used as matches for sd_journal_add_match(3).
274
275       __CURSOR=
276           The cursor for the entry. A cursor is an opaque text string that
277           uniquely describes the position of an entry in the journal and is
278           portable across machines, platforms and journal files.
279
280       __REALTIME_TIMESTAMP=
281           The wallclock time (CLOCK_REALTIME) at the point in time the entry
282           was received by the journal, in microseconds since the epoch UTC,
283           formatted as a decimal string. This has different properties from
284           "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
285           more likely to be monotonic.
286
287       __MONOTONIC_TIMESTAMP=
288           The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
289           was received by the journal in microseconds, formatted as a decimal
290           string. To be useful as an address for the entry, this should be
291           combined with the boot ID in "_BOOT_ID=".
292

SEE ALSO

294       systemd(1), systemd-journald.service(8), journalctl(1),
295       journald.conf(5), sd-journal(3), coredumpctl(1), systemd.directives(7)
296

NOTES

298        1. Journal Export Format
299           https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-export-format
300
301        2. Journal JSON Format
302           https://systemd.io/JOURNAL_EXPORT_FORMATS#journal-json-format
303
304
305
306systemd 250                                          SYSTEMD.JOURNAL-FIELDS(7)
Impressum