1SYSTEMD.JOURNAL-FIELDS(7) systemd.journal-fields SYSTEMD.JOURNAL-FIELDS(7)
2
3
4
6 systemd.journal-fields - Special journal fields
7
9 Entries in the journal resemble an environment block in their syntax
10 but with fields that can include binary data. Primarily, fields are
11 formatted UTF-8 text strings, and binary formatting is used only where
12 formatting as UTF-8 text strings makes little sense. New fields may
13 freely be defined by applications, but a few fields have special
14 meaning. All fields with special meanings are optional. In some cases,
15 fields may appear more than once per entry.
16
18 User fields are fields that are directly passed from clients and stored
19 in the journal.
20
21 MESSAGE=
22 The human-readable message string for this entry. This is supposed
23 to be the primary text shown to the user. It is usually not
24 translated (but might be in some cases), and is not supposed to be
25 parsed for metadata.
26
27 MESSAGE_ID=
28 A 128-bit message identifier ID for recognizing certain message
29 types, if this is desirable. This should contain a 128-bit ID
30 formatted as a lower-case hexadecimal string, without any
31 separating dashes or suchlike. This is recommended to be a
32 UUID-compatible ID, but this is not enforced, and formatted
33 differently. Developers can generate a new ID for this purpose with
34 journalctl --new-id128.
35
36 PRIORITY=
37 A priority value between 0 ("emerg") and 7 ("debug") formatted as a
38 decimal string. This field is compatible with syslog's priority
39 concept.
40
41 CODE_FILE=, CODE_LINE=, CODE_FUNC=
42 The code location generating this message, if known. Contains the
43 source filename, the line number and the function name.
44
45 ERRNO=
46 The low-level Unix error number causing this entry, if any.
47 Contains the numeric value of errno(3) formatted as a decimal
48 string.
49
50 SYSLOG_FACILITY=, SYSLOG_IDENTIFIER=, SYSLOG_PID=
51 Syslog compatibility fields containing the facility (formatted as
52 decimal string), the identifier string (i.e. "tag"), and the client
53 PID. (Note that the tag is usually derived from glibc's
54 program_invocation_short_name variable, see
55 program_invocation_short_name(3).)
56
58 Fields prefixed with an underscore are trusted fields, i.e. fields that
59 are implicitly added by the journal and cannot be altered by client
60 code.
61
62 _PID=, _UID=, _GID=
63 The process, user, and group ID of the process the journal entry
64 originates from formatted as a decimal string. Note that entries
65 obtained via "stdout" or "stderr" of forked processes will contain
66 credentials valid for a parent process (that initiated the
67 connection to systemd-journald).
68
69 _COMM=, _EXE=, _CMDLINE=
70 The name, the executable path, and the command line of the process
71 the journal entry originates from.
72
73 _CAP_EFFECTIVE=
74 The effective capabilities(7) of the process the journal entry
75 originates from.
76
77 _AUDIT_SESSION=, _AUDIT_LOGINUID=
78 The session and login UID of the process the journal entry
79 originates from, as maintained by the kernel audit subsystem.
80
81 _SYSTEMD_CGROUP=, _SYSTEMD_SLICE=, _SYSTEMD_UNIT=, _SYSTEMD_USER_UNIT=,
82 _SYSTEMD_SESSION=, _SYSTEMD_OWNER_UID=
83 The control group path in the systemd hierarchy, the the systemd
84 slice unit name, the systemd unit name, the unit name in the
85 systemd user manager (if any), the systemd session ID (if any), and
86 the owner UID of the systemd user unit or systemd session (if any)
87 of the process the journal entry originates from.
88
89 _SELINUX_CONTEXT=
90 The SELinux security context (label) of the process the journal
91 entry originates from.
92
93 _SOURCE_REALTIME_TIMESTAMP=
94 The earliest trusted timestamp of the message, if any is known that
95 is different from the reception time of the journal. This is the
96 time in microseconds since the epoch UTC, formatted as a decimal
97 string.
98
99 _BOOT_ID=
100 The kernel boot ID for the boot the message was generated in,
101 formatted as a 128-bit hexadecimal string.
102
103 _MACHINE_ID=
104 The machine ID of the originating host, as available in machine-
105 id(5).
106
107 _SYSTEMD_INVOCATION_ID=
108 The invocation ID for the runtime cycle of the unit the message was
109 generated in, as available to processes of the unit in
110 $INVOCATION_ID (see systemd.exec(5)).
111
112 _HOSTNAME=
113 The name of the originating host.
114
115 _TRANSPORT=
116 How the entry was received by the journal service. Valid transports
117 are:
118
119 audit
120 for those read from the kernel audit subsystem
121
122 driver
123 for internally generated messages
124
125 syslog
126 for those received via the local syslog socket with the syslog
127 protocol
128
129 journal
130 for those received via the native journal protocol
131
132 stdout
133 for those read from a service's standard output or error output
134
135 kernel
136 for those read from the kernel
137
138 _STREAM_ID=
139 Only applies to "_TRANSPORT=stdout" records: specifies a randomized
140 128bit ID assigned to the stream connection when it was first
141 created. This ID is useful to reconstruct individual log streams
142 from the log records: all log records carrying the same stream ID
143 originate from the same stream.
144
145 _LINE_BREAK=
146 Only applies to "_TRANSPORT=stdout" records: indicates that the log
147 message in the standard output/error stream was not terminated with
148 a normal newline character ("\n", i.e. ASCII 10). Specifically,
149 when set this field is one of nul (in case the line was terminated
150 by a NUL byte), line-max (in case the maximum log line length was
151 reached, as configured with LineMax= in journald.conf(5)) or eof
152 (if this was the last log record of a stream and the stream ended
153 without a final newline character). Note that this record is not
154 generated when a normal newline character was used for marking the
155 log line end.
156
158 Kernel fields are fields that are used by messages originating in the
159 kernel and stored in the journal.
160
161 _KERNEL_DEVICE=
162 The kernel device name. If the entry is associated to a block
163 device, the major and minor of the device node, separated by ":"
164 and prefixed by "b". Similar for character devices but prefixed by
165 "c". For network devices, this is the interface index prefixed by
166 "n". For all other devices, this is the subsystem name prefixed by
167 "+", followed by ":", followed by the kernel device name.
168
169 _KERNEL_SUBSYSTEM=
170 The kernel subsystem name.
171
172 _UDEV_SYSNAME=
173 The kernel device name as it shows up in the device tree below
174 /sys.
175
176 _UDEV_DEVNODE=
177 The device node path of this device in /dev.
178
179 _UDEV_DEVLINK=
180 Additional symlink names pointing to the device node in /dev. This
181 field is frequently set more than once per entry.
182
184 Fields in this section are used by programs to specify that they are
185 logging on behalf of another program or unit.
186
187 Fields used by the systemd-coredump coredump kernel helper:
188
189 COREDUMP_UNIT=, COREDUMP_USER_UNIT=
190 Used to annotate messages containing coredumps from system and
191 session units. See coredumpctl(1).
192
193 Privileged programs (currently UID 0) may attach OBJECT_PID= to a
194 message. This will instruct systemd-journald to attach additional
195 fields on behalf of the caller:
196
197 OBJECT_PID=PID
198 PID of the program that this message pertains to.
199
200 OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
201 OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
202 OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
203 OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
204 These are additional fields added automatically by
205 systemd-journald. Their meaning is the same as _UID=, _GID=,
206 _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
207 _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
208 _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
209 except that the process identified by PID is described, instead of
210 the process which logged the message.
211
213 During serialization into external formats, such as the Journal Export
214 Format[1] or the Journal JSON Format[2], the addresses of journal
215 entries are serialized into fields prefixed with double underscores.
216 Note that these are not proper fields when stored in the journal but
217 for addressing metadata of entries. They cannot be written as part of
218 structured log entries via calls such as sd_journal_send(3). They may
219 also not be used as matches for sd_journal_add_match(3)
220
221 __CURSOR=
222 The cursor for the entry. A cursor is an opaque text string that
223 uniquely describes the position of an entry in the journal and is
224 portable across machines, platforms and journal files.
225
226 __REALTIME_TIMESTAMP=
227 The wallclock time (CLOCK_REALTIME) at the point in time the entry
228 was received by the journal, in microseconds since the epoch UTC,
229 formatted as a decimal string. This has different properties from
230 "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
231 more likely to be monotonic.
232
233 __MONOTONIC_TIMESTAMP=
234 The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
235 was received by the journal in microseconds, formatted as a decimal
236 string. To be useful as an address for the entry, this should be
237 combined with the boot ID in "_BOOT_ID=".
238
240 systemd(1), journalctl(1), journald.conf(5), sd-journal(3),
241 coredumpctl(1), systemd.directives(7)
242
244 1. Journal Export Format
245 https://www.freedesktop.org/wiki/Software/systemd/export
246
247 2. Journal JSON Format
248 https://www.freedesktop.org/wiki/Software/systemd/json
249
250
251
252systemd 239 SYSTEMD.JOURNAL-FIELDS(7)