]> git.proxmox.com Git - systemd.git/blame - man/systemd-journald.service.8
Imported Upstream version 219
[systemd.git] / man / systemd-journald.service.8
CommitLineData
14228c0d 1'\" t
e735f4d4 2.TH "SYSTEMD\-JOURNALD\&.SERVICE" "8" "" "systemd 219" "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 23systemd-journald.service, systemd-journald.socket, systemd-journald-dev-log.socket, systemd-journald \- Journal service
14228c0d
MB
24.SH "SYNOPSIS"
25.PP
26systemd\-journald\&.service
27.PP
28systemd\-journald\&.socket
29.PP
60f067b4
JS
30systemd\-journald\-dev\-log\&.socket
31.PP
14228c0d
MB
32/usr/lib/systemd/systemd\-journald
33.SH "DESCRIPTION"
34.PP
35systemd\-journald
f47781d8
MP
36is 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.\}
46Kernel 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.\}
57Simple system log messages, via the libc
14228c0d 58\fBsyslog\fR(3)
f47781d8
MP
59call
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.\}
70Structured 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.\}
82Standard 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.\}
93Audit records, via the audit subsystem
94.RE
95.PP
96The 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 98for more information about the collected metadata\&.
14228c0d
MB
99.PP
100Log 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
102By default, the journal stores log data in
103/run/log/journal/\&. Since
104/run/
105is volatile, log data is lost at reboot\&. To make the data persistent, it is sufficient to create
106/var/log/journal/
107where
108systemd\-journald
109will then store the data\&.
110.PP
111systemd\-journald
112will forward all received log messages to the
f47781d8 113\fBAF_UNIX\fR/\fBSOCK_DGRAM\fR
14228c0d
MB
114socket
115/run/systemd/journal/syslog, if it exists, which may be used by Unix syslog daemons to process the data further\&.
116.PP
117See
118\fBjournald.conf\fR(5)
119for information about the configuration of this service\&.
120.SH "SIGNALS"
121.PP
122SIGUSR1
123.RS 4
124Request that journal data from
125/run/
126is flushed to
127/var/
128in order to make it persistent (if this is enabled)\&. This must be used after
129/var/
130is mounted, as otherwise log data from
131/run
132is never flushed to
133/var
134regardless of the configuration\&.
135.RE
136.PP
137SIGUSR2
138.RS 4
139Request immediate rotation of the journal files\&.
140.RE
141.SH "KERNEL COMMAND LINE"
142.PP
143A few configuration parameters from
144journald\&.conf
145may 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 149Enables/disables forwarding of collected log messages to syslog, the kernel log buffer, the system console or wall\&.
14228c0d
MB
150.sp
151See
152\fBjournald.conf\fR(5)
153for information about these settings\&.
154.RE
155.SH "ACCESS CONTROL"
156.PP
157Journal files are, by default, owned and readable by the
158"systemd\-journal"
159system group but are not writable\&. Adding a user to this group thus enables her/him to read the journal files\&.
160.PP
161By 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
164Additional 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"
166and
167"adm"
168system 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
180Note that this command will update the ACLs both for existing journal files and for future journal files created in the
181/var/log/journal/
182directory\&.
183.SH "FILES"
184.PP
185/etc/systemd/journald\&.conf
186.RS 4
187Configure
188\fBsystemd\-journald\fR
189behaviour\&. 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
196writes entries to files in
197/run/log/journal/\fImachine\-id\fR/
198or
199/var/log/journal/\fImachine\-id\fR/
200with the
201"\&.journal"
202suffix\&. If the daemon is stopped uncleanly, or if the files are found to be corrupted, they are renamed using the
203"\&.journal~"
204suffix, and
205\fBsystemd\-journald\fR
206starts writing to a new file\&.
207/run
208is used when
209/var/log/journal
210is not available, or when
211\fBStorage=volatile\fR
212is set in the
213\fBjournald.conf\fR(5)
214configuration 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\&.