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 meta data.
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-id.
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.
65
66 _COMM=, _EXE=, _CMDLINE=
67 The name, the executable path, and the command line of the process
68 the journal entry originates from.
69
70 _CAP_EFFECTIVE=
71 The effective capabilities(7) of the process the journal entry
72 originates from.
73
74 _AUDIT_SESSION=, _AUDIT_LOGINUID=
75 The session and login UID of the process the journal entry
76 originates from, as maintained by the kernel audit subsystem.
77
78 _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
79 _SYSTEMD_USER_UNIT=, _SYSTEMD_OWNER_UID=, _SYSTEMD_SLICE=
80 The control group path in the systemd hierarchy, the systemd
81 session ID (if any), the systemd unit name (if any), the systemd
82 user session unit name (if any), the owner UID of the systemd
83 session (if any) and the systemd slice unit of the process the
84 journal entry originates from.
85
86 _SELINUX_CONTEXT=
87 The SELinux security context (label) of the process the journal
88 entry originates from.
89
90 _SOURCE_REALTIME_TIMESTAMP=
91 The earliest trusted timestamp of the message, if any is known that
92 is different from the reception time of the journal. This is the
93 time in microseconds since the epoch UTC, formatted as a decimal
94 string.
95
96 _BOOT_ID=
97 The kernel boot ID for the boot the message was generated in,
98 formatted as a 128-bit hexadecimal string.
99
100 _MACHINE_ID=
101 The machine ID of the originating host, as available in machine-
102 id(5).
103
104 _HOSTNAME=
105 The name of the originating host.
106
107 _TRANSPORT=
108 How the entry was received by the journal service. Valid transports
109 are:
110
111 driver
112 for internally generated messages
113
114 syslog
115 for those received via the local syslog socket with the syslog
116 protocol
117
118 journal
119 for those received via the native journal protocol
120
121 stdout
122 for those read from a service's standard output or error output
123
124 kernel
125 for those read from the kernel
126
127 _STREAM_ID=
128 Only applies to "_TRANSPORT=stream" records: specifies a randomized
129 128bit ID assigned to the stream connection when it was first
130 created. This ID is useful to reconstruct individual log streams
131 from the log records: all log records carrying the same stream ID
132 originate from the same stream.
133
134 _LINE_BREAK=
135 Only applies to "_TRANSPORT=stream" records: indicates that the log
136 message in the standard output/error stream was not terminated with
137 a normal newline character ("\n", i.e. ASCII 10). Specifically,
138 when set this field is one of nul (in case the line was terminated
139 by a NUL byte), line-max (in case the maximum log line length was
140 reached, as configured with LineMax= in journald.conf(5)) or eof
141 (if this was the last log record of a stream and the stream ended
142 without a final newline character). Note that this record is not
143 generated when a normal newline character was used for marking the
144 log line end.
145
147 Kernel fields are fields that are used by messages originating in the
148 kernel and stored in the journal.
149
150 _KERNEL_DEVICE=
151 The kernel device name. If the entry is associated to a block
152 device, the major and minor of the device node, separated by ":"
153 and prefixed by "b". Similar for character devices but prefixed by
154 "c". For network devices, this is the interface index prefixed by
155 "n". For all other devices, this is the subsystem name prefixed by
156 "+", followed by ":", followed by the kernel device name.
157
158 _KERNEL_SUBSYSTEM=
159 The kernel subsystem name.
160
161 _UDEV_SYSNAME=
162 The kernel device name as it shows up in the device tree below
163 /sys.
164
165 _UDEV_DEVNODE=
166 The device node path of this device in /dev.
167
168 _UDEV_DEVLINK=
169 Additional symlink names pointing to the device node in /dev. This
170 field is frequently set more than once per entry.
171
173 Fields in this section are used by programs to specify that they are
174 logging on behalf of another program or unit.
175
176 Fields used by the systemd-coredump coredump kernel helper:
177
178 COREDUMP_UNIT=, COREDUMP_USER_UNIT=
179 Used to annotate messages containing coredumps from system and
180 session units. See coredumpctl(1).
181
182 Priviledged programs (currently UID 0) may attach OBJECT_PID= to a
183 message. This will instruct systemd-journald to attach additional
184 fields on behalf of the caller:
185
186 OBJECT_PID=PID
187 PID of the program that this message pertains to.
188
189 OBJECT_UID=, OBJECT_GID=, OBJECT_COMM=, OBJECT_EXE=, OBJECT_CMDLINE=,
190 OBJECT_AUDIT_SESSION=, OBJECT_AUDIT_LOGINUID=, OBJECT_SYSTEMD_CGROUP=,
191 OBJECT_SYSTEMD_SESSION=, OBJECT_SYSTEMD_OWNER_UID=,
192 OBJECT_SYSTEMD_UNIT=, OBJECT_SYSTEMD_USER_UNIT=
193 These are additional fields added automatically by
194 systemd-journald. Their meaning is the same as _UID=, _GID=,
195 _COMM=, _EXE=, _CMDLINE=, _AUDIT_SESSION=, _AUDIT_LOGINUID=,
196 _SYSTEMD_CGROUP=, _SYSTEMD_SESSION=, _SYSTEMD_UNIT=,
197 _SYSTEMD_USER_UNIT=, and _SYSTEMD_OWNER_UID= as described above,
198 except that the process identified by PID is described, instead of
199 the process which logged the message.
200
202 During serialization into external formats, such as the Journal Export
203 Format[1] or the Journal JSON Format[2], the addresses of journal
204 entries are serialized into fields prefixed with double underscores.
205 Note that these are not proper fields when stored in the journal but
206 for addressing metadata of entries. They cannot be written as part of
207 structured log entries via calls such as sd_journal_send(3). They may
208 also not be used as matches for sd_journal_add_match(3)
209
210 __CURSOR=
211 The cursor for the entry. A cursor is an opaque text string that
212 uniquely describes the position of an entry in the journal and is
213 portable across machines, platforms and journal files.
214
215 __REALTIME_TIMESTAMP=
216 The wallclock time (CLOCK_REALTIME) at the point in time the entry
217 was received by the journal, in microseconds since the epoch UTC,
218 formatted as a decimal string. This has different properties from
219 "_SOURCE_REALTIME_TIMESTAMP=", as it is usually a bit later but
220 more likely to be monotonic.
221
222 __MONOTONIC_TIMESTAMP=
223 The monotonic time (CLOCK_MONOTONIC) at the point in time the entry
224 was received by the journal in microseconds, formatted as a decimal
225 string. To be useful as an address for the entry, this should be
226 combined with the boot ID in "_BOOT_ID=".
227
229 systemd(1), journalctl(1), journald.conf(5), sd-journal(3),
230 coredumpctl(1), systemd.directives(7)
231
233 1. Journal Export Format
234 http://www.freedesktop.org/wiki/Software/systemd/export
235
236 2. Journal JSON Format
237 http://www.freedesktop.org/wiki/Software/systemd/json
238
239
240
241systemd 219 SYSTEMD.JOURNAL-FIELDS(7)