1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-journald.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 204</span><hr><div class="refentry"><a name="systemd-journald.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-journald.service, systemd-journald.socket, systemd-journald — Journal service</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-journald.service</code></p><p><code class="filename">systemd-journald.socket</code></p><p><code class="filename">/usr/lib/systemd/systemd-journald</code></p></div><div class="refsect1"><a name="idm259777157632"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-journald</code> 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 the kernel, from user processes via the libc
<a href="syslog.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
call, from STDOUT/STDERR of system services or via its
native API. It will implicitly collect numerous meta
data fields for each log messages in a secure and
unfakeable way. See
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
for more information about the collected meta data.
</p><p>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.</p><p>By default the journal stores log data in
<code class="filename">/run/log/journal/</code>. Since
<code class="filename">/run/</code> is volatile log data is
lost at reboot. To make the data persistent it
is sufficient to create
<code class="filename">/var/log/journal/</code> where
<code class="filename">systemd-journald</code> will then store
the data.</p><p><code class="filename">systemd-journald</code> will
forward all received log messages to the AF_UNIX
SOCK_DGRAM socket
<code class="filename">/run/systemd/journal/syslog</code> (if it exists) which
may be used by UNIX syslog daemons to process the data
further.</p><p>See
<a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
for information about the configuration of this
service.</p></div><div class="refsect1"><a name="idm259777146368"></a><h2 id="Signals">Signals<a class="headerlink" title="Permalink to this headline" href="#Signals">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="SIGUSR1"><span class="term">SIGUSR1</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR1">¶</a></dt><dd><p>Request that journal
data from <code class="filename">/run/</code>
is flushed to
<code class="filename">/var/</code> in order to
make it persistent (if this is
enabled). This must be used after
<code class="filename">/var/</code> is mounted,
as otherwise log data from
<code class="filename">/run</code> is never
flushed to <code class="filename">/var</code>
regardless of the
configuration.</p></dd><dt id="SIGUSR2"><span class="term">SIGUSR2</span><a class="headerlink" title="Permalink to this term" href="#SIGUSR2">¶</a></dt><dd><p>Request immediate
rotation of the journal
files.</p></dd></dl></div></div><div class="refsect1"><a name="idm259780805344"></a><h2 id="Kernel Command Line">Kernel Command Line<a class="headerlink" title="Permalink to this headline" href="#Kernel%20Command%20Line">¶</a></h2><p>A few configuration parameters from
<code class="filename">journald.conf</code> may be overridden on
the kernel command line:</p><div class="variablelist"><dl class="variablelist"><dt id="systemd.journald.forward_to_syslog="><span class="term"><code class="varname">systemd.journald.forward_to_syslog=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_kmsg=</code>, </span><span class="term"><code class="varname">systemd.journald.forward_to_console=</code></span><a class="headerlink" title="Permalink to this term" href="#systemd.journald.forward_to_syslog=">¶</a></dt><dd><p>Enables/disables
forwarding of collected log messages
to syslog, the kernel log buffer or
the system console.
</p><p>See
<a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
for information about these settings.</p></dd></dl></div></div><div class="refsect1"><a name="idm259780798608"></a><h2 id="Access Control">Access Control<a class="headerlink" title="Permalink to this headline" href="#Access%20Control">¶</a></h2><p>Journal files are by default owned and readable
by the <code class="literal">systemd-journal</code> system group
(but not writable). Adding a user to this group thus
enables her/him to read the journal files.</p><p>By default, each logged in user will get her/his
own set of journal files in
<code class="filename">/var/log/journal/</code>. 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.</p><p>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
<code class="literal">wheel</code> and <code class="literal">adm</code>
system groups with a command such as the
following:</p><pre class="programlisting"># setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/</pre><p>Note that this command will update the ACLs both
for existing journal files and for future journal
files created in the
<code class="filename">/var/log/journal/</code>
directory.</p></div><div class="refsect1"><a name="idm259780783648"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="setfacl.html"><span class="citerefentry"><span class="refentrytitle">setfacl</span>(1)</span></a>
</p></div></div></body></html>
|