]>
Commit | Line | Data |
---|---|---|
14228c0d | 1 | '\" t |
f47781d8 | 2 | .TH "SYSTEMD\-JOURNALD\&.SERVICE" "8" "" "systemd 218" "systemd-journald.service" |
14228c0d MB |
3 | .\" ----------------------------------------------------------------- |
4 | .\" * Define some portability stuff | |
5 | .\" ----------------------------------------------------------------- | |
6 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
7 | .\" http://bugs.debian.org/507673 | |
8 | .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html | |
9 | .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
10 | .ie \n(.g .ds Aq \(aq | |
11 | .el .ds Aq ' | |
12 | .\" ----------------------------------------------------------------- | |
13 | .\" * set default formatting | |
14 | .\" ----------------------------------------------------------------- | |
15 | .\" disable hyphenation | |
16 | .nh | |
17 | .\" disable justification (adjust text to left margin only) | |
18 | .ad l | |
19 | .\" ----------------------------------------------------------------- | |
20 | .\" * MAIN CONTENT STARTS HERE * | |
21 | .\" ----------------------------------------------------------------- | |
22 | .SH "NAME" | |
60f067b4 | 23 | systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald \- Journal service |
14228c0d MB |
24 | .SH "SYNOPSIS" |
25 | .PP | |
26 | systemd\-journald\&.service | |
27 | .PP | |
28 | systemd\-journald\&.socket | |
29 | .PP | |
60f067b4 JS |
30 | systemd\-journald\-dev\-log\&.socket |
31 | .PP | |
14228c0d MB |
32 | /usr/lib/systemd/systemd\-journald |
33 | .SH "DESCRIPTION" | |
34 | .PP | |
35 | systemd\-journald | |
f47781d8 MP |
36 | is a system service that collects and stores logging data\&. It creates and maintains structured, indexed journals based on logging information that is received from a variety of sources: |
37 | .sp | |
38 | .RS 4 | |
39 | .ie n \{\ | |
40 | \h'-04'\(bu\h'+03'\c | |
41 | .\} | |
42 | .el \{\ | |
43 | .sp -1 | |
44 | .IP \(bu 2.3 | |
45 | .\} | |
46 | Kernel log messages, via kmsg | |
47 | .RE | |
48 | .sp | |
49 | .RS 4 | |
50 | .ie n \{\ | |
51 | \h'-04'\(bu\h'+03'\c | |
52 | .\} | |
53 | .el \{\ | |
54 | .sp -1 | |
55 | .IP \(bu 2.3 | |
56 | .\} | |
57 | Simple system log messages, via the libc | |
14228c0d | 58 | \fBsyslog\fR(3) |
f47781d8 MP |
59 | call |
60 | .RE | |
61 | .sp | |
62 | .RS 4 | |
63 | .ie n \{\ | |
64 | \h'-04'\(bu\h'+03'\c | |
65 | .\} | |
66 | .el \{\ | |
67 | .sp -1 | |
68 | .IP \(bu 2.3 | |
69 | .\} | |
70 | Structured system log messages via the native Journal API, see | |
71 | \fBsd_journal_print\fR(4) | |
72 | .RE | |
73 | .sp | |
74 | .RS 4 | |
75 | .ie n \{\ | |
76 | \h'-04'\(bu\h'+03'\c | |
77 | .\} | |
78 | .el \{\ | |
79 | .sp -1 | |
80 | .IP \(bu 2.3 | |
81 | .\} | |
82 | Standard output and standard error of system services | |
83 | .RE | |
84 | .sp | |
85 | .RS 4 | |
86 | .ie n \{\ | |
87 | \h'-04'\(bu\h'+03'\c | |
88 | .\} | |
89 | .el \{\ | |
90 | .sp -1 | |
91 | .IP \(bu 2.3 | |
92 | .\} | |
93 | Audit records, via the audit subsystem | |
94 | .RE | |
95 | .PP | |
96 | The daemon will implicitly collect numerous metadata fields for each log messages in a secure and unfakeable way\&. See | |
14228c0d | 97 | \fBsystemd.journal-fields\fR(7) |
60f067b4 | 98 | for more information about the collected metadata\&. |
14228c0d MB |
99 | .PP |
100 | Log data collected by the journal is primarily text\-based but can also include binary data where necessary\&. All objects stored in the journal can be up to 2^64\-1 bytes in size\&. | |
101 | .PP | |
102 | By default, the journal stores log data in | |
103 | /run/log/journal/\&. Since | |
104 | /run/ | |
105 | is volatile, log data is lost at reboot\&. To make the data persistent, it is sufficient to create | |
106 | /var/log/journal/ | |
107 | where | |
108 | systemd\-journald | |
109 | will then store the data\&. | |
110 | .PP | |
111 | systemd\-journald | |
112 | will forward all received log messages to the | |
f47781d8 | 113 | \fBAF_UNIX\fR/\fBSOCK_DGRAM\fR |
14228c0d MB |
114 | socket |
115 | /run/systemd/journal/syslog, if it exists, which may be used by Unix syslog daemons to process the data further\&. | |
116 | .PP | |
117 | See | |
118 | \fBjournald.conf\fR(5) | |
119 | for information about the configuration of this service\&. | |
120 | .SH "SIGNALS" | |
121 | .PP | |
122 | SIGUSR1 | |
123 | .RS 4 | |
124 | Request that journal data from | |
125 | /run/ | |
126 | is flushed to | |
127 | /var/ | |
128 | in order to make it persistent (if this is enabled)\&. This must be used after | |
129 | /var/ | |
130 | is mounted, as otherwise log data from | |
131 | /run | |
132 | is never flushed to | |
133 | /var | |
134 | regardless of the configuration\&. | |
135 | .RE | |
136 | .PP | |
137 | SIGUSR2 | |
138 | .RS 4 | |
139 | Request immediate rotation of the journal files\&. | |
140 | .RE | |
141 | .SH "KERNEL COMMAND LINE" | |
142 | .PP | |
143 | A few configuration parameters from | |
144 | journald\&.conf | |
145 | may be overridden on the kernel command line: | |
146 | .PP | |
60f067b4 | 147 | \fIsystemd\&.journald\&.forward_to_syslog=\fR, \fIsystemd\&.journald\&.forward_to_kmsg=\fR, \fIsystemd\&.journald\&.forward_to_console=\fR, \fIsystemd\&.journald\&.forward_to_wall=\fR |
14228c0d | 148 | .RS 4 |
60f067b4 | 149 | Enables/disables forwarding of collected log messages to syslog, the kernel log buffer, the system console or wall\&. |
14228c0d MB |
150 | .sp |
151 | See | |
152 | \fBjournald.conf\fR(5) | |
153 | for information about these settings\&. | |
154 | .RE | |
155 | .SH "ACCESS CONTROL" | |
156 | .PP | |
157 | Journal files are, by default, owned and readable by the | |
158 | "systemd\-journal" | |
159 | system group but are not writable\&. Adding a user to this group thus enables her/him to read the journal files\&. | |
160 | .PP | |
161 | By default, each logged in user will get her/his own set of journal files in | |
162 | /var/log/journal/\&. These files will not be owned by the user, however, in order to avoid that the user can write to them directly\&. Instead, file system ACLs are used to ensure the user gets read access only\&. | |
163 | .PP | |
164 | Additional users and groups may be granted access to journal files via file system access control lists (ACL)\&. Distributions and administrators may choose to grant read access to all members of the | |
165 | "wheel" | |
166 | and | |
167 | "adm" | |
168 | system groups with a command such as the following: | |
169 | .sp | |
170 | .if n \{\ | |
171 | .RS 4 | |
172 | .\} | |
173 | .nf | |
174 | # setfacl \-Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/ | |
175 | .fi | |
176 | .if n \{\ | |
177 | .RE | |
178 | .\} | |
179 | .PP | |
180 | Note that this command will update the ACLs both for existing journal files and for future journal files created in the | |
181 | /var/log/journal/ | |
182 | directory\&. | |
183 | .SH "FILES" | |
184 | .PP | |
185 | /etc/systemd/journald\&.conf | |
186 | .RS 4 | |
187 | Configure | |
188 | \fBsystemd\-journald\fR | |
189 | behaviour\&. See | |
190 | \fBjournald.conf\fR(5)\&. | |
191 | .RE | |
192 | .PP | |
193 | /run/log/journal/\fImachine\-id\fR/*\&.journal, /run/log/journal/\fImachine\-id\fR/*\&.journal~, /var/log/journal/\fImachine\-id\fR/*\&.journal, /var/log/journal/\fImachine\-id\fR/*\&.journal~ | |
194 | .RS 4 | |
195 | \fBsystemd\-journald\fR | |
196 | writes entries to files in | |
197 | /run/log/journal/\fImachine\-id\fR/ | |
198 | or | |
199 | /var/log/journal/\fImachine\-id\fR/ | |
200 | with the | |
201 | "\&.journal" | |
202 | suffix\&. If the daemon is stopped uncleanly, or if the files are found to be corrupted, they are renamed using the | |
203 | "\&.journal~" | |
204 | suffix, and | |
205 | \fBsystemd\-journald\fR | |
206 | starts writing to a new file\&. | |
207 | /run | |
208 | is used when | |
209 | /var/log/journal | |
210 | is not available, or when | |
211 | \fBStorage=volatile\fR | |
212 | is set in the | |
213 | \fBjournald.conf\fR(5) | |
214 | configuration file\&. | |
215 | .RE | |
216 | .SH "SEE ALSO" | |
217 | .PP | |
218 | \fBsystemd\fR(1), | |
219 | \fBjournalctl\fR(1), | |
220 | \fBjournald.conf\fR(5), | |
221 | \fBsystemd.journal-fields\fR(7), | |
222 | \fBsd-journal\fR(3), | |
5eef597e | 223 | \fBsystemd-coredump\fR(8), |
14228c0d | 224 | \fBsetfacl\fR(1), |
f47781d8 | 225 | \fBsd_journal_print\fR(4), |
14228c0d | 226 | \fBpydoc systemd\&.journal\fR\&. |