mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00:00
Reindent man pages to 2ch
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
- 8ch indent, no tabs
|
- 8ch indent, no tabs, except for files in man/ which are 2ch indent,
|
||||||
|
and still no tabs
|
||||||
|
|
||||||
- Don't break code lines too eagerly. We do *not* force line breaks at
|
- Don't break code lines too eagerly. We do *not* force line breaks at
|
||||||
80ch, all of today's screens should be much larger than that. But
|
80ch, all of today's screens should be much larger than that. But
|
||||||
|
|||||||
+62
-63
@@ -20,83 +20,82 @@
|
|||||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<refentry id="binfmt.d" conditional='ENABLE_BINFMT'
|
<refentry id="binfmt.d" conditional='ENABLE_BINFMT'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>binfmt.d</title>
|
<title>binfmt.d</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>binfmt.d</refentrytitle>
|
<refentrytitle>binfmt.d</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>binfmt.d</refname>
|
<refname>binfmt.d</refname>
|
||||||
<refpurpose>Configure additional binary formats for
|
<refpurpose>Configure additional binary formats for
|
||||||
executables at boot</refpurpose>
|
executables at boot</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/binfmt.d/*.conf</filename></para>
|
<para><filename>/etc/binfmt.d/*.conf</filename></para>
|
||||||
<para><filename>/run/binfmt.d/*.conf</filename></para>
|
<para><filename>/run/binfmt.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/binfmt.d/*.conf</filename></para>
|
<para><filename>/usr/lib/binfmt.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>At boot,
|
<para>At boot,
|
||||||
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
reads configuration files from the above directories
|
reads configuration files from the above directories to register
|
||||||
to register in the kernel additional binary
|
in the kernel additional binary formats for executables.</para>
|
||||||
formats for executables.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Configuration Format</title>
|
<title>Configuration Format</title>
|
||||||
|
|
||||||
<para>Each file contains a list of binfmt_misc kernel
|
<para>Each file contains a list of binfmt_misc kernel binary
|
||||||
binary format rules. Consult <ulink
|
format rules. Consult <ulink
|
||||||
url="https://www.kernel.org/doc/Documentation/binfmt_misc.txt">binfmt_misc.txt</ulink>
|
url="https://www.kernel.org/doc/Documentation/binfmt_misc.txt">binfmt_misc.txt</ulink>
|
||||||
for more information on registration of additional
|
for more information on registration of additional binary formats
|
||||||
binary formats and how to write rules.</para>
|
and how to write rules.</para>
|
||||||
|
|
||||||
<para>Empty lines and lines beginning with ; and # are
|
<para>Empty lines and lines beginning with ; and # are ignored.
|
||||||
ignored. Note that this means you may not use ; and #
|
Note that this means you may not use ; and # as delimiter in
|
||||||
as delimiter in binary format rules.</para>
|
binary format rules.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
<example>
|
<example>
|
||||||
<title>/etc/binfmt.d/wine.conf example:</title>
|
<title>/etc/binfmt.d/wine.conf example:</title>
|
||||||
|
|
||||||
<programlisting># Start WINE on Windows executables
|
<programlisting># Start WINE on Windows executables
|
||||||
:DOSWin:M::MZ::/usr/bin/wine:</programlisting>
|
:DOSWin:M::MZ::/usr/bin/wine:</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+123
-122
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -26,148 +26,149 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="bootchart.conf" conditional='ENABLE_BOOTCHART'
|
<refentry id="bootchart.conf" conditional='ENABLE_BOOTCHART'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>bootchart.conf</title>
|
<title>bootchart.conf</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Auke</firstname>
|
<firstname>Auke</firstname>
|
||||||
<surname>Kok</surname>
|
<surname>Kok</surname>
|
||||||
<email>auke-jan.h.kok@intel.com</email>
|
<email>auke-jan.h.kok@intel.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>bootchart.conf</refentrytitle>
|
<refentrytitle>bootchart.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>bootchart.conf</refname>
|
<refname>bootchart.conf</refname>
|
||||||
<refname>bootchart.conf.d</refname>
|
<refname>bootchart.conf.d</refname>
|
||||||
<refpurpose>Boot performance analysis graphing tool configuration files</refpurpose>
|
<refpurpose>Boot performance analysis graphing tool configuration files</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/systemd/bootchart.conf</filename></para>
|
<para><filename>/etc/systemd/bootchart.conf</filename></para>
|
||||||
<para><filename>/etc/systemd/bootchart.conf.d/*.conf</filename></para>
|
<para><filename>/etc/systemd/bootchart.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/run/systemd/bootchart.conf.d/*.conf</filename></para>
|
<para><filename>/run/systemd/bootchart.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></para>
|
<para><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>When starting, systemd-bootchart will read the
|
<para>When starting, systemd-bootchart will read the configuration
|
||||||
configuration file
|
file <filename>/etc/systemd/bootchart.conf</filename>, followed by
|
||||||
<filename>/etc/systemd/bootchart.conf</filename>, followed by
|
the files in the <filename>bootchart.conf.d</filename>
|
||||||
the files in the <filename>bootchart.conf.d</filename>
|
directories. These configuration files determine logging
|
||||||
directories. These configuration files determine logging
|
parameters and graph output.</para>
|
||||||
parameters and graph output.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
<xi:include href="standard-conf.xml" xpointer="conf" />
|
<xi:include href="standard-conf.xml" xpointer="conf" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<variablelist class='bootchart-directives'>
|
<variablelist class='bootchart-directives'>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Samples=500</varname></term>
|
<term><varname>Samples=500</varname></term>
|
||||||
<listitem><para>Configure the amount of samples to
|
<listitem><para>Configure the amount of samples to record in
|
||||||
record in total before bootchart exits. Each sample will
|
total before bootchart exits. Each sample will record at
|
||||||
record at intervals defined by Frequency=.</para></listitem>
|
intervals defined by Frequency=.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Frequency=25</varname></term>
|
<term><varname>Frequency=25</varname></term>
|
||||||
<listitem><para>Configure the sample log frequency.
|
<listitem><para>Configure the sample log frequency. This can
|
||||||
This can be a fractional number, but must be larger than
|
be a fractional number, but must be larger than 0.0. Most
|
||||||
0.0. Most systems can cope with values under 25-50 without
|
systems can cope with values under 25-50 without impacting
|
||||||
impacting boot time severely.</para></listitem>
|
boot time severely.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Relative=no</varname></term>
|
<term><varname>Relative=no</varname></term>
|
||||||
<listitem><para>Configures whether the left axis of the
|
<listitem><para>Configures whether the left axis of the output
|
||||||
output graph equals time=0.0 (<constant>CLOCK_MONOTONIC</constant> start). This
|
graph equals time=0.0 (<constant>CLOCK_MONOTONIC</constant>
|
||||||
is useful for using bootchart at post-boot time to profile
|
start). This is useful for using bootchart at post-boot time
|
||||||
an already booted system, otherwise the graph would become
|
to profile an already booted system, otherwise the graph would
|
||||||
extremely large. If set to yes, the horizontal axis starts
|
become extremely large. If set to yes, the horizontal axis
|
||||||
at the first recorded sample instead of time=0.0.
|
starts at the first recorded sample instead of time=0.0.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Filter=no</varname></term>
|
<term><varname>Filter=no</varname></term>
|
||||||
<listitem><para>Configures whether the resulting graph
|
<listitem><para>Configures whether the resulting graph should
|
||||||
should omit tasks that did not contribute significantly
|
omit tasks that did not contribute significantly to the boot.
|
||||||
to the boot. Processes that are too short-lived (only
|
Processes that are too short-lived (only seen in one sample)
|
||||||
seen in one sample) or that do not consume any significant
|
or that do not consume any significant CPU time (less than
|
||||||
CPU time (less than 0.001sec) will not be displayed in
|
0.001sec) will not be displayed in the output
|
||||||
the output graph.</para></listitem>
|
graph.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Output=[path]</varname></term>
|
<term><varname>Output=[path]</varname></term>
|
||||||
<listitem><para>Configures the output directory for writing
|
<listitem><para>Configures the output directory for writing
|
||||||
the graphs. By default, bootchart writes the graphs to
|
the graphs. By default, bootchart writes the graphs to
|
||||||
<filename>/run/log</filename>.</para></listitem>
|
<filename>/run/log</filename>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Init=[path]</varname></term>
|
<term><varname>Init=[path]</varname></term>
|
||||||
<listitem><para>Configures bootchart to run a non-standard
|
<listitem><para>Configures bootchart to run a non-standard
|
||||||
binary instead of <filename>/usr/lib/systemd/systemd</filename>. This
|
binary instead of
|
||||||
option is only relevant if bootchart was invoked from the
|
<filename>/usr/lib/systemd/systemd</filename>. This option is
|
||||||
kernel command line with
|
only relevant if bootchart was invoked from the kernel command
|
||||||
init=/usr/lib/systemd/systemd-bootchart.</para></listitem>
|
line with
|
||||||
</varlistentry>
|
init=/usr/lib/systemd/systemd-bootchart.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>PlotMemoryUsage=no</varname></term>
|
<term><varname>PlotMemoryUsage=no</varname></term>
|
||||||
<listitem><para>If set to yes, enables logging and graphing
|
<listitem><para>If set to yes, enables logging and graphing of
|
||||||
of processes' PSS memory consumption.</para></listitem>
|
processes' PSS memory consumption.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>PlotEntropyGraph=no</varname></term>
|
<term><varname>PlotEntropyGraph=no</varname></term>
|
||||||
<listitem><para>If set to yes, enables logging and graphing
|
<listitem><para>If set to yes, enables logging and graphing of
|
||||||
of the kernel random entropy pool size.</para></listitem>
|
the kernel random entropy pool size.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ScaleX=100</varname></term>
|
<term><varname>ScaleX=100</varname></term>
|
||||||
<listitem><para>Horizontal scaling factor for all variable
|
<listitem><para>Horizontal scaling factor for all variable
|
||||||
graph components.</para></listitem>
|
graph components.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ScaleY=20</varname></term>
|
<term><varname>ScaleY=20</varname></term>
|
||||||
<listitem><para>Vertical scaling factor for all variable
|
<listitem><para>Vertical scaling factor for all variable graph
|
||||||
graph components.</para></listitem>
|
components.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ControlGroup=no</varname></term>
|
<term><varname>ControlGroup=no</varname></term>
|
||||||
<listitem><para>Display process control group.</para></listitem>
|
<listitem><para>Display process control group.
|
||||||
</varlistentry>
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+70
-72
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -20,95 +20,93 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="bootctl" conditional='ENABLE_EFI'
|
<refentry id="bootctl" conditional='ENABLE_EFI'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>bootctl</title>
|
<title>bootctl</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Kay</firstname>
|
<firstname>Kay</firstname>
|
||||||
<surname>Sievers</surname>
|
<surname>Sievers</surname>
|
||||||
<email>kay@vrfy.org</email>
|
<email>kay@vrfy.org</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>bootctl</refentrytitle>
|
<refentrytitle>bootctl</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>bootctl</refname>
|
<refname>bootctl</refname>
|
||||||
<refpurpose>Control the firmware and boot manager settings</refpurpose>
|
<refpurpose>Control the firmware and boot manager settings</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>bootctl</command>
|
<command>bootctl</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="req">COMMAND</arg>
|
<arg choice="req">COMMAND</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>bootctl</command> may be used to
|
<para><command>bootctl</command> may be used to query or (in the
|
||||||
query or (in the future) change the firmware and boot
|
future) change the firmware and boot manager settings.</para>
|
||||||
manager settings.</para>
|
|
||||||
|
|
||||||
<para>Firmware information is available only on EFI
|
<para>Firmware information is available only on EFI systems.
|
||||||
systems.</para>
|
</para>
|
||||||
|
|
||||||
<para>Currently, only the <citerefentry project='gummiboot'><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> boot
|
<para>Currently, only the
|
||||||
manager implements the required boot loader interface
|
<citerefentry project='gummiboot'><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
to provide complete boot manager information.</para>
|
boot manager implements the required boot loader interface to
|
||||||
</refsect1>
|
provide complete boot manager information.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The following commands are understood:</para>
|
<para>The following commands are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>status</command></term>
|
<term><command>status</command></term>
|
||||||
|
|
||||||
<listitem><para>Show firmware and boot
|
<listitem><para>Show firmware and boot manager information
|
||||||
manager information about the system,
|
about the system, including secure boot mode status and
|
||||||
including secure boot mode status and
|
selected firmware entry (where available).</para></listitem>
|
||||||
selected firmware entry (where
|
</varlistentry>
|
||||||
available).</para></listitem>
|
</variablelist>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface">Boot loader interface</ulink>,
|
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface">Boot loader interface</ulink>,
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>,
|
<ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>,
|
||||||
<ulink url="http://www.freedesktop.org/wiki/Software/gummiboot/">gummiboot</ulink>
|
<ulink url="http://www.freedesktop.org/wiki/Software/gummiboot/">gummiboot</ulink>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+248
-270
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,301 +23,279 @@
|
|||||||
|
|
||||||
<refentry id="bootup">
|
<refentry id="bootup">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>bootup</title>
|
<title>bootup</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>bootup</refentrytitle>
|
<refentrytitle>bootup</refentrytitle>
|
||||||
<manvolnum>7</manvolnum>
|
<manvolnum>7</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>bootup</refname>
|
<refname>bootup</refname>
|
||||||
<refpurpose>System bootup process</refpurpose>
|
<refpurpose>System bootup process</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>A number of different components are involved in
|
<para>A number of different components are involved in the system
|
||||||
the system boot. Immediately after power-up, the
|
boot. Immediately after power-up, the system BIOS will do minimal
|
||||||
system BIOS will do minimal hardware initialization,
|
hardware initialization, and hand control over to a boot loader
|
||||||
and hand control over to a boot loader stored on a
|
stored on a persistent storage device. This boot loader will then
|
||||||
persistent storage device. This boot loader will then
|
invoke an OS kernel from disk (or the network). In the Linux case,
|
||||||
invoke an OS kernel from disk (or the network). In the
|
this kernel (optionally) extracts and executes an initial RAM disk
|
||||||
Linux case, this kernel (optionally) extracts and
|
image (initrd), such as generated by
|
||||||
executes an initial RAM disk image (initrd), such as
|
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
generated by
|
which looks for the root file system (possibly using
|
||||||
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
which looks for the root file system (possibly using
|
for this). After the root file system is found and mounted, the
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
initrd hands over control to the host's system manager (such as
|
||||||
for this). After the root file system is found and
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
|
||||||
mounted, the initrd hands over control to the host's
|
stored on the OS image, which is then responsible for probing all
|
||||||
system manager (such as
|
remaining hardware, mounting all necessary file systems and
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
|
spawning all configured services.</para>
|
||||||
stored on the OS image, which is then responsible for
|
|
||||||
probing all remaining hardware, mounting all necessary
|
|
||||||
file systems and spawning all configured
|
|
||||||
services.</para>
|
|
||||||
|
|
||||||
<para>On shutdown, the system manager stops all
|
<para>On shutdown, the system manager stops all services, unmounts
|
||||||
services, unmounts all file systems (detaching the
|
all file systems (detaching the storage technologies backing
|
||||||
storage technologies backing them), and then
|
them), and then (optionally) jumps back into the initrd code which
|
||||||
(optionally) jumps back into the initrd code which
|
unmounts/detaches the root file system and the storage it resides
|
||||||
unmounts/detaches the root file system and the storage
|
on. As a last step, the system is powered down.</para>
|
||||||
it resides on. As a last step, the system is powered down.</para>
|
|
||||||
|
|
||||||
<para>Additional information about the system boot
|
<para>Additional information about the system boot process may be
|
||||||
process may be found in
|
found in
|
||||||
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>System Manager Bootup</title>
|
<title>System Manager Bootup</title>
|
||||||
|
|
||||||
<para>At boot, the system manager on the OS image is
|
<para>At boot, the system manager on the OS image is responsible
|
||||||
responsible for initializing the required file
|
for initializing the required file systems, services and drivers
|
||||||
systems, services and drivers that are necessary for
|
that are necessary for operation of the system. On
|
||||||
operation of the system. On
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
systems, this process is split up in various discrete steps which
|
||||||
systems, this process is split up in various discrete
|
are exposed as target units. (See
|
||||||
steps which are exposed as target units. (See
|
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for detailed information about target units.) The boot-up process
|
||||||
for detailed information about target units.) The
|
is highly parallelized so that the order in which specific target
|
||||||
boot-up process is highly parallelized so that the
|
units are reached is not deterministic, but still adheres to a
|
||||||
order in which specific target units are reached is not
|
limited amount of ordering structure.</para>
|
||||||
deterministic, but still adheres to a limited amount
|
|
||||||
of ordering structure.</para>
|
|
||||||
|
|
||||||
<para>When systemd starts up the system, it will
|
<para>When systemd starts up the system, it will activate all
|
||||||
activate all units that are dependencies of
|
units that are dependencies of <filename>default.target</filename>
|
||||||
<filename>default.target</filename> (as well as
|
(as well as recursively all dependencies of these dependencies).
|
||||||
recursively all dependencies of these
|
Usually, <filename>default.target</filename> is simply an alias of
|
||||||
dependencies). Usually,
|
<filename>graphical.target</filename> or
|
||||||
<filename>default.target</filename> is simply an alias
|
<filename>multi-user.target</filename>, depending on whether the
|
||||||
of <filename>graphical.target</filename> or
|
system is configured for a graphical UI or only for a text
|
||||||
<filename>multi-user.target</filename>, depending on
|
console. To enforce minimal ordering between the units pulled in,
|
||||||
whether the system is configured for a graphical UI or
|
a number of well-known target units are available, as listed on
|
||||||
only for a text console. To enforce minimal ordering
|
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||||
between the units pulled in, a number of well-known
|
|
||||||
target units are available, as listed on
|
|
||||||
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>The following chart is a structural overview of
|
<para>The following chart is a structural overview of these
|
||||||
these well-known units and their position in the
|
well-known units and their position in the boot-up logic. The
|
||||||
boot-up logic. The arrows describe which units are
|
arrows describe which units are pulled in and ordered before which
|
||||||
pulled in and ordered before which other units. Units
|
other units. Units near the top are started before units nearer to
|
||||||
near the top are started before units nearer to the
|
the bottom of the chart.</para>
|
||||||
bottom of the chart.</para>
|
|
||||||
|
|
||||||
<programlisting>local-fs-pre.target
|
<programlisting>local-fs-pre.target
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
(various mounts and (various swap (various cryptsetup
|
(various mounts and (various swap (various cryptsetup
|
||||||
fsck services...) devices...) devices...) (various low-level (various low-level
|
fsck services...) devices...) devices...) (various low-level (various low-level
|
||||||
| | | services: udevd, API VFS mounts:
|
| | | services: udevd, API VFS mounts:
|
||||||
v v v tmpfiles, random mqueue, configfs,
|
v v v tmpfiles, random mqueue, configfs,
|
||||||
local-fs.target swap.target cryptsetup.target seed, sysctl, ...) debugfs, ...)
|
local-fs.target swap.target cryptsetup.target seed, sysctl, ...) debugfs, ...)
|
||||||
| | | | |
|
| | | | |
|
||||||
\__________________|_________________ | ___________________|____________________/
|
\__________________|_________________ | ___________________|____________________/
|
||||||
\|/
|
\|/
|
||||||
v
|
v
|
||||||
sysinit.target
|
sysinit.target
|
||||||
|
|
|
|
||||||
____________________________________/|\________________________________________
|
____________________________________/|\________________________________________
|
||||||
/ | | | \
|
/ | | | \
|
||||||
| | | | |
|
| | | | |
|
||||||
v v | v v
|
v v | v v
|
||||||
(various (various | (various rescue.service
|
(various (various | (various rescue.service
|
||||||
timers...) paths...) | sockets...) |
|
timers...) paths...) | sockets...) |
|
||||||
| | | | v
|
| | | | v
|
||||||
v v | v <emphasis>rescue.target</emphasis>
|
v v | v <emphasis>rescue.target</emphasis>
|
||||||
timers.target paths.target | sockets.target
|
timers.target paths.target | sockets.target
|
||||||
| | | |
|
| | | |
|
||||||
v |_________________ | ___________________/
|
v |_________________ | ___________________/
|
||||||
\|/
|
\|/
|
||||||
v
|
v
|
||||||
basic.target
|
basic.target
|
||||||
|
|
|
|
||||||
____________________________________/| emergency.service
|
____________________________________/| emergency.service
|
||||||
/ | | |
|
/ | | |
|
||||||
| | | v
|
| | | v
|
||||||
v v v <emphasis>emergency.target</emphasis>
|
v v v <emphasis>emergency.target</emphasis>
|
||||||
display- (various system (various system
|
display- (various system (various system
|
||||||
manager.service services services)
|
manager.service services services)
|
||||||
| required for |
|
| required for |
|
||||||
| graphical UIs) v
|
| graphical UIs) v
|
||||||
| | <emphasis>multi-user.target</emphasis>
|
| | <emphasis>multi-user.target</emphasis>
|
||||||
| | |
|
| | |
|
||||||
\_________________ | _________________/
|
\_________________ | _________________/
|
||||||
\|/
|
\|/
|
||||||
v
|
v
|
||||||
<emphasis>graphical.target</emphasis></programlisting>
|
<emphasis>graphical.target</emphasis></programlisting>
|
||||||
|
|
||||||
<para>Target units that are commonly used as boot
|
<para>Target units that are commonly used as boot targets are
|
||||||
targets are <emphasis>emphasized</emphasis>. These
|
<emphasis>emphasized</emphasis>. These units are good choices as
|
||||||
units are good choices as goal targets, for
|
goal targets, for example by passing them to the
|
||||||
example by passing them to the
|
<varname>systemd.unit=</varname> kernel command line option (see
|
||||||
<varname>systemd.unit=</varname> kernel command line
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
|
||||||
option (see
|
or by symlinking <filename>default.target</filename> to
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
|
them.</para>
|
||||||
or by symlinking <filename>default.target</filename>
|
|
||||||
to them.</para>
|
|
||||||
|
|
||||||
<para><filename>timers.target</filename> is pulled-in
|
<para><filename>timers.target</filename> is pulled-in by
|
||||||
by <filename>basic.target</filename> asynchronously.
|
<filename>basic.target</filename> asynchronously. This allows
|
||||||
This allows timers units to depend on services which
|
timers units to depend on services which become only available
|
||||||
become only available later in boot.</para>
|
later in boot.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Bootup in the Initial RAM Disk (initrd)</title>
|
<title>Bootup in the Initial RAM Disk (initrd)</title>
|
||||||
<para>The initial RAM disk implementation (initrd) can
|
<para>The initial RAM disk implementation (initrd) can be set up
|
||||||
be set up using systemd as well. In this case, boot up
|
using systemd as well. In this case, boot up inside the initrd
|
||||||
inside the initrd follows the following
|
follows the following structure.</para>
|
||||||
structure.</para>
|
|
||||||
|
|
||||||
<para>The default target in the initrd is
|
<para>The default target in the initrd is
|
||||||
<filename>initrd.target</filename>. The bootup process
|
<filename>initrd.target</filename>. The bootup process begins
|
||||||
begins identical to the system manager bootup (see
|
identical to the system manager bootup (see above) until it
|
||||||
above) until it reaches
|
reaches <filename>basic.target</filename>. From there, systemd
|
||||||
<filename>basic.target</filename>. From there, systemd
|
approaches the special target <filename>initrd.target</filename>.
|
||||||
approaches the special target
|
If the root device can be mounted at
|
||||||
<filename>initrd.target</filename>. If the root device
|
<filename>/sysroot</filename>, the
|
||||||
can be mounted at <filename>/sysroot</filename>, the
|
<filename>sysroot.mount</filename> unit becomes active and
|
||||||
<filename>sysroot.mount</filename> unit becomes active
|
<filename>initrd-root-fs.target</filename> is reached. The service
|
||||||
and <filename>initrd-root-fs.target</filename> is
|
<filename>initrd-parse-etc.service</filename> scans
|
||||||
reached. The service
|
<filename>/sysroot/etc/fstab</filename> for a possible
|
||||||
<filename>initrd-parse-etc.service</filename> scans
|
<filename>/usr</filename> mount point and additional entries
|
||||||
<filename>/sysroot/etc/fstab</filename> for a possible
|
marked with the <emphasis>x-initrd.mount</emphasis> option. All
|
||||||
<filename>/usr</filename> mount point and additional
|
entries found are mounted below <filename>/sysroot</filename>, and
|
||||||
entries marked with the
|
<filename>initrd-fs.target</filename> is reached. The service
|
||||||
<emphasis>x-initrd.mount</emphasis> option. All
|
<filename>initrd-cleanup.service</filename> isolates to the
|
||||||
entries found are mounted below
|
<filename>initrd-switch-root.target</filename>, where cleanup
|
||||||
<filename>/sysroot</filename>, and
|
services can run. As the very last step, the
|
||||||
<filename>initrd-fs.target</filename> is reached. The
|
<filename>initrd-switch-root.service</filename> is activated,
|
||||||
service <filename>initrd-cleanup.service</filename>
|
which will cause the system to switch its root to
|
||||||
isolates to the
|
<filename>/sysroot</filename>.
|
||||||
<filename>initrd-switch-root.target</filename>, where
|
</para>
|
||||||
cleanup services can run. As the very last step, the
|
|
||||||
<filename>initrd-switch-root.service</filename> is
|
|
||||||
activated, which will cause the system to switch its
|
|
||||||
root to <filename>/sysroot</filename>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<programlisting> : (beginning identical to above)
|
<programlisting> : (beginning identical to above)
|
||||||
:
|
:
|
||||||
v
|
v
|
||||||
basic.target
|
basic.target
|
||||||
| emergency.service
|
| emergency.service
|
||||||
______________________/| |
|
______________________/| |
|
||||||
/ | v
|
/ | v
|
||||||
| sysroot.mount <emphasis>emergency.target</emphasis>
|
| sysroot.mount <emphasis>emergency.target</emphasis>
|
||||||
| |
|
| |
|
||||||
| v
|
| v
|
||||||
| initrd-root-fs.target
|
| initrd-root-fs.target
|
||||||
| |
|
| |
|
||||||
| v
|
| v
|
||||||
v initrd-parse-etc.service
|
v initrd-parse-etc.service
|
||||||
(custom initrd |
|
(custom initrd |
|
||||||
services...) v
|
services...) v
|
||||||
| (sysroot-usr.mount and
|
| (sysroot-usr.mount and
|
||||||
| various mounts marked
|
| various mounts marked
|
||||||
| with fstab option
|
| with fstab option
|
||||||
| x-initrd.mount...)
|
| x-initrd.mount...)
|
||||||
| |
|
| |
|
||||||
| v
|
| v
|
||||||
| initrd-fs.target
|
| initrd-fs.target
|
||||||
\______________________ |
|
\______________________ |
|
||||||
\|
|
\|
|
||||||
v
|
v
|
||||||
initrd.target
|
initrd.target
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
initrd-cleanup.service
|
initrd-cleanup.service
|
||||||
isolates to
|
isolates to
|
||||||
initrd-switch-root.target
|
initrd-switch-root.target
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
______________________/|
|
______________________/|
|
||||||
/ v
|
/ v
|
||||||
| initrd-udevadm-cleanup-db.service
|
| initrd-udevadm-cleanup-db.service
|
||||||
v |
|
v |
|
||||||
(custom initrd |
|
(custom initrd |
|
||||||
services...) |
|
services...) |
|
||||||
\______________________ |
|
\______________________ |
|
||||||
\|
|
\|
|
||||||
v
|
v
|
||||||
initrd-switch-root.target
|
initrd-switch-root.target
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
initrd-switch-root.service
|
initrd-switch-root.service
|
||||||
|
|
|
|
||||||
v
|
v
|
||||||
Transition to Host OS</programlisting>
|
Transition to Host OS</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>System Manager Shutdown</title>
|
<title>System Manager Shutdown</title>
|
||||||
|
|
||||||
<para>System shutdown with systemd also consists of
|
<para>System shutdown with systemd also consists of various target
|
||||||
various target units with some minimal ordering
|
units with some minimal ordering structure applied:</para>
|
||||||
structure applied:</para>
|
|
||||||
|
|
||||||
|
<programlisting> (conflicts with (conflicts with
|
||||||
|
all system all file system
|
||||||
|
services) mounts, swaps,
|
||||||
<programlisting> (conflicts with (conflicts with
|
| cryptsetup
|
||||||
all system all file system
|
| devices, ...)
|
||||||
services) mounts, swaps,
|
| |
|
||||||
| cryptsetup
|
v v
|
||||||
| devices, ...)
|
shutdown.target umount.target
|
||||||
| |
|
| |
|
||||||
v v
|
\_______ ______/
|
||||||
shutdown.target umount.target
|
\ /
|
||||||
| |
|
v
|
||||||
\_______ ______/
|
(various low-level
|
||||||
\ /
|
services)
|
||||||
v
|
|
|
||||||
(various low-level
|
v
|
||||||
services)
|
final.target
|
||||||
|
|
|
|
||||||
v
|
_____________________________________/ \_________________________________
|
||||||
final.target
|
/ | | \
|
||||||
|
|
| | | |
|
||||||
_____________________________________/ \_________________________________
|
v v v v
|
||||||
/ | | \
|
|
||||||
| | | |
|
|
||||||
v v v v
|
|
||||||
systemd-reboot.service systemd-poweroff.service systemd-halt.service systemd-kexec.service
|
systemd-reboot.service systemd-poweroff.service systemd-halt.service systemd-kexec.service
|
||||||
| | | |
|
| | | |
|
||||||
v v v v
|
v v v v
|
||||||
<emphasis>reboot.target</emphasis> <emphasis>poweroff.target</emphasis> <emphasis>halt.target</emphasis> <emphasis>kexec.target</emphasis></programlisting>
|
<emphasis>reboot.target</emphasis> <emphasis>poweroff.target</emphasis> <emphasis>halt.target</emphasis> <emphasis>kexec.target</emphasis></programlisting>
|
||||||
|
|
||||||
<para>Commonly used system shutdown targets are <emphasis>emphasized</emphasis>.</para>
|
<para>Commonly used system shutdown targets are
|
||||||
</refsect1>
|
<emphasis>emphasized</emphasis>.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+161
-172
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,227 +22,216 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
|
<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>coredumpctl</title>
|
<title>coredumpctl</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Zbigniew</firstname>
|
<firstname>Zbigniew</firstname>
|
||||||
<surname>Jędrzejewski-Szmek</surname>
|
<surname>Jędrzejewski-Szmek</surname>
|
||||||
<email>zbyszek@in.waw.pl</email>
|
<email>zbyszek@in.waw.pl</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>coredumpctl</refentrytitle>
|
<refentrytitle>coredumpctl</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>coredumpctl</refname>
|
<refname>coredumpctl</refname>
|
||||||
<refpurpose>Retrieve coredumps from the journal</refpurpose>
|
<refpurpose>Retrieve coredumps from the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>coredumpctl</command>
|
<command>coredumpctl</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="req">COMMAND</arg>
|
<arg choice="req">COMMAND</arg>
|
||||||
<arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
|
<arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>coredumpctl</command> may be used to
|
<para><command>coredumpctl</command> may be used to
|
||||||
retrieve coredumps from
|
retrieve coredumps from
|
||||||
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-legend</option></term>
|
<term><option>--no-legend</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not print column headers.
|
<listitem><para>Do not print column headers.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-1</option></term>
|
<term><option>-1</option></term>
|
||||||
|
|
||||||
<listitem><para>Show information of a
|
<listitem><para>Show information of a single coredump only,
|
||||||
single coredump only, instead of
|
instead of listing all known coredumps. </para></listitem>
|
||||||
listing all known coredumps.
|
</varlistentry>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-F</option></term>
|
<term><option>-F</option></term>
|
||||||
<term><option>--field=</option></term>
|
<term><option>--field=</option></term>
|
||||||
|
|
||||||
<listitem><para>Print all possible
|
<listitem><para>Print all possible data values the specified
|
||||||
data values the specified field
|
field takes in matching coredump entries of the
|
||||||
takes in matching coredump entries of the
|
journal.</para></listitem>
|
||||||
journal.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-o</option></term>
|
<term><option>-o</option></term>
|
||||||
<term><option>--output=FILE</option></term>
|
<term><option>--output=FILE</option></term>
|
||||||
|
|
||||||
<listitem><para>Write the core to
|
<listitem><para>Write the core to <option>FILE</option>.
|
||||||
<option>FILE</option>.</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The following commands are understood:</para>
|
<para>The following commands are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>list</command></term>
|
<term><command>list</command></term>
|
||||||
|
|
||||||
<listitem><para>List coredumps
|
<listitem><para>List coredumps captured in the journal
|
||||||
captured in the journal matching
|
matching specified characteristics. If no command is
|
||||||
specified characteristics. If no
|
specified, this is the implied default.</para></listitem>
|
||||||
command is specified, this is the
|
</varlistentry>
|
||||||
implied default.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>info</command></term>
|
<term><command>info</command></term>
|
||||||
|
|
||||||
<listitem><para>Show detailed
|
<listitem><para>Show detailed information about coredumps
|
||||||
information about coredumps captured
|
captured in the journal.</para></listitem>
|
||||||
in the journal.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>dump</command></term>
|
<term><command>dump</command></term>
|
||||||
|
|
||||||
<listitem><para>Extract the last coredump
|
<listitem><para>Extract the last coredump matching specified
|
||||||
matching specified characteristics.
|
characteristics. The coredump will be written on standard
|
||||||
The coredump will be written on standard output,
|
output, unless an output file is specified with
|
||||||
unless an output file is specified with
|
<option>-o/--output</option>. </para></listitem>
|
||||||
<option>-o/--output</option>.
|
</varlistentry>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>gdb</command></term>
|
<term><command>gdb</command></term>
|
||||||
|
|
||||||
<listitem><para>Invoke the GNU
|
<listitem><para>Invoke the GNU debugger on the last coredump
|
||||||
debugger on the last coredump matching
|
matching specified characteristics. </para></listitem>
|
||||||
specified characteristics.
|
</varlistentry>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Matching</title>
|
<title>Matching</title>
|
||||||
|
|
||||||
<para>A match can be:</para>
|
<para>A match can be:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>PID</replaceable></term>
|
<term><replaceable>PID</replaceable></term>
|
||||||
|
|
||||||
<listitem><para>Process ID of the
|
<listitem><para>Process ID of the
|
||||||
process that dumped
|
process that dumped
|
||||||
core. An integer.</para></listitem>
|
core. An integer.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>COMM</replaceable></term>
|
<term><replaceable>COMM</replaceable></term>
|
||||||
|
|
||||||
<listitem><para>Name of the executable
|
<listitem><para>Name of the executable (matches
|
||||||
(matches <option>COREDUMP_COMM=</option>).
|
<option>COREDUMP_COMM=</option>). Must not contain slashes.
|
||||||
Must not contain slashes.
|
</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>EXE</replaceable></term>
|
<term><replaceable>EXE</replaceable></term>
|
||||||
|
|
||||||
<listitem><para>Path to the executable
|
<listitem><para>Path to the executable (matches
|
||||||
(matches <option>COREDUMP_EXE=</option>).
|
<option>COREDUMP_EXE=</option>). Must contain at least one
|
||||||
Must contain at least one slash.
|
slash. </para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>MATCH</replaceable></term>
|
<term><replaceable>MATCH</replaceable></term>
|
||||||
|
|
||||||
<listitem><para>General journalctl predicates
|
<listitem><para>General journalctl predicates (see
|
||||||
(see <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
|
||||||
Must contain an equal sign.
|
Must contain an equal sign. </para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
</variablelist>
|
||||||
</variablelist>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
<para>On success, 0 is returned; otherwise, a non-zero failure
|
<para>On success, 0 is returned; otherwise, a non-zero failure
|
||||||
code is returned. Not finding any matching coredumps is treated
|
code is returned. Not finding any matching coredumps is treated as
|
||||||
as failure.
|
failure.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>List all the coredumps of a program named foo</title>
|
<title>List all the coredumps of a program named foo</title>
|
||||||
|
|
||||||
<programlisting># coredumpctl list foo</programlisting>
|
<programlisting># coredumpctl list foo</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Invoke gdb on the last coredump</title>
|
<title>Invoke gdb on the last coredump</title>
|
||||||
|
|
||||||
<programlisting># coredumpctl gdb</programlisting>
|
<programlisting># coredumpctl gdb</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Show information about a process that dumped core, matching by its PID 6654</title>
|
<title>Show information about a process that dumped core,
|
||||||
|
matching by its PID 6654</title>
|
||||||
|
|
||||||
<programlisting># coredumpctl info 6654</programlisting>
|
<programlisting># coredumpctl info 6654</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Extract the last coredump of /usr/bin/bar to a file named bar.coredump</title>
|
<title>Extract the last coredump of /usr/bin/bar to a file named
|
||||||
|
<filename noindex="true">bar.coredump</filename></title>
|
||||||
|
|
||||||
<programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
|
<programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+359
-382
@@ -27,389 +27,366 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="crypttab" conditional='HAVE_LIBCRYPTSETUP'>
|
<refentry id="crypttab" conditional='HAVE_LIBCRYPTSETUP'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>crypttab</title>
|
<title>crypttab</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Documentation</contrib>
|
<contrib>Documentation</contrib>
|
||||||
<firstname>Miloslav</firstname>
|
<firstname>Miloslav</firstname>
|
||||||
<surname>Trmac</surname>
|
<surname>Trmac</surname>
|
||||||
<email>mitr@redhat.com</email>
|
<email>mitr@redhat.com</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Documentation</contrib>
|
<contrib>Documentation</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>crypttab</refentrytitle>
|
<refentrytitle>crypttab</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>crypttab</refname>
|
<refname>crypttab</refname>
|
||||||
<refpurpose>Configuration for encrypted block devices</refpurpose>
|
<refpurpose>Configuration for encrypted block devices</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/crypttab</filename></para>
|
<para><filename>/etc/crypttab</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/crypttab</filename> file
|
<para>The <filename>/etc/crypttab</filename> file describes
|
||||||
describes encrypted block devices that are set up
|
encrypted block devices that are set up during system boot.</para>
|
||||||
during system boot.</para>
|
|
||||||
|
<para>Empty lines and lines starting with the <literal>#</literal>
|
||||||
<para>Empty lines and lines starting with the <literal>#</literal>
|
character are ignored. Each of the remaining lines describes one
|
||||||
character are ignored. Each of the remaining lines
|
encrypted block device, fields on the line are delimited by white
|
||||||
describes one encrypted block device, fields on the
|
space. The first two fields are mandatory, the remaining two are
|
||||||
line are delimited by white space. The first two
|
optional.</para>
|
||||||
fields are mandatory, the remaining two are
|
|
||||||
optional.</para>
|
<para>Setting up encrypted block devices using this file supports
|
||||||
|
three encryption modes: LUKS, TrueCrypt and plain. See
|
||||||
<para>Setting up encrypted block devices using this file
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
supports three encryption modes: LUKS, TrueCrypt and plain.
|
for more information about each mode. When no mode is specified in
|
||||||
See <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
the options field and the block device contains a LUKS signature,
|
||||||
for more information about each mode. When no mode is specified
|
it is opened as a LUKS device; otherwise, it is assumed to be in
|
||||||
in the options field and the block device contains a LUKS
|
raw dm-crypt (plain mode) format.</para>
|
||||||
signature, it is opened as a LUKS device; otherwise, it is
|
|
||||||
assumed to be in raw dm-crypt (plain mode) format.</para>
|
<para>The first field contains the name of the resulting encrypted
|
||||||
|
block device; the device is set up within
|
||||||
<para>The first field contains the name of the
|
<filename>/dev/mapper/</filename>.</para>
|
||||||
resulting encrypted block device; the device is set up
|
|
||||||
within <filename>/dev/mapper/</filename>.</para>
|
<para>The second field contains a path to the underlying block
|
||||||
|
device or file, or a specification of a block device via
|
||||||
<para>The second field contains a path to the
|
<literal>UUID=</literal> followed by the UUID.</para>
|
||||||
underlying block device or file, or a specification of a block
|
|
||||||
device via <literal>UUID=</literal> followed by the
|
<para>The third field specifies the encryption password. If the
|
||||||
UUID.</para>
|
field is not present or the password is set to
|
||||||
|
<literal>none</literal> or <literal>-</literal>, the password has
|
||||||
<para>The third field specifies the encryption
|
to be manually entered during system boot. Otherwise, the field is
|
||||||
password. If the field is not present or the password
|
interpreted as a absolute path to a file containing the encryption
|
||||||
is set to <literal>none</literal> or <literal>-</literal>,
|
password. For swap encryption, <filename>/dev/urandom</filename>
|
||||||
the password has to be manually entered during system boot.
|
or the hardware device <filename>/dev/hw_random</filename> can be
|
||||||
Otherwise, the field is interpreted as a absolute path to
|
used as the password file; using <filename>/dev/random</filename>
|
||||||
a file containing the encryption password. For swap encryption,
|
may prevent boot completion if the system does not have enough
|
||||||
<filename>/dev/urandom</filename> or the hardware
|
entropy to generate a truly random encryption key.</para>
|
||||||
device <filename>/dev/hw_random</filename> can be used
|
|
||||||
as the password file; using
|
<para>The fourth field, if present, is a comma-delimited list of
|
||||||
<filename>/dev/random</filename> may prevent boot
|
options. The following options are recognized:</para>
|
||||||
completion if the system does not have enough entropy
|
|
||||||
to generate a truly random encryption key.</para>
|
<variablelist class='fstab-options'>
|
||||||
|
|
||||||
<para>The fourth field, if present, is a
|
<varlistentry>
|
||||||
comma-delimited list of options. The following
|
<term><option>discard</option></term>
|
||||||
options are recognized:</para>
|
|
||||||
|
<listitem><para>Allow discard requests to be passed through
|
||||||
<variablelist class='fstab-options'>
|
the encrypted block device. This improves performance on SSD
|
||||||
|
storage but has security implications.</para></listitem>
|
||||||
<varlistentry>
|
</varlistentry>
|
||||||
<term><option>discard</option></term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>Allow discard requests to be
|
<term><option>cipher=</option></term>
|
||||||
passed through the encrypted block device. This
|
|
||||||
improves performance on SSD storage but has
|
<listitem><para>Specifies the cipher to use. See
|
||||||
security implications.</para></listitem>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</varlistentry>
|
for possible values and the default value of this option. A
|
||||||
|
cipher with unpredictable IV values, such as
|
||||||
<varlistentry>
|
<literal>aes-cbc-essiv:sha256</literal>, is
|
||||||
<term><option>cipher=</option></term>
|
recommended.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Specifies the cipher to use. See
|
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<varlistentry>
|
||||||
for possible values and the default value of
|
<term><option>hash=</option></term>
|
||||||
this option. A cipher with unpredictable IV
|
|
||||||
values, such as <literal>aes-cbc-essiv:sha256</literal>,
|
<listitem><para>Specifies the hash to use for password
|
||||||
is recommended.</para></listitem>
|
hashing. See
|
||||||
</varlistentry>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
|
for possible values and the default value of this
|
||||||
<varlistentry>
|
option.</para></listitem>
|
||||||
<term><option>hash=</option></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>Specifies the hash to use for
|
<varlistentry>
|
||||||
password hashing. See
|
<term><option>header=</option></term>
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
||||||
for possible values and the default value of
|
<listitem><para>Use a detached (separated) metadata device or
|
||||||
this option.</para></listitem>
|
file where the LUKS header is stored. This option is only
|
||||||
</varlistentry>
|
relevant for LUKS devices. See
|
||||||
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<varlistentry>
|
for possible values and the default value of this
|
||||||
<term><option>header=</option></term>
|
option.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Use a detached (separated)
|
|
||||||
metadata device or file where the LUKS header
|
<varlistentry>
|
||||||
is stored. This option is only relevant for
|
<term><option>keyfile-offset=</option></term>
|
||||||
LUKS devices. See
|
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<listitem><para>Specifies the number of bytes to skip at the
|
||||||
for possible values and the default value of
|
start of the key file. See
|
||||||
this option.</para></listitem>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</varlistentry>
|
for possible values and the default value of this
|
||||||
|
option.</para></listitem>
|
||||||
<varlistentry>
|
</varlistentry>
|
||||||
<term><option>keyfile-offset=</option></term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>Specifies the number of bytes to
|
<term><option>keyfile-size=</option></term>
|
||||||
skip at the start of the key file. See
|
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<listitem><para>Specifies the maximum number of bytes to read
|
||||||
for possible values and the default value of
|
from the key file. See
|
||||||
this option.</para></listitem>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</varlistentry>
|
for possible values and the default value of this option. This
|
||||||
|
option is ignored in plain encryption mode, as the key file
|
||||||
<varlistentry>
|
size is then given by the key size.</para></listitem>
|
||||||
<term><option>keyfile-size=</option></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>Specifies the maximum number
|
<varlistentry>
|
||||||
of bytes to read from the key file. See
|
<term><option>key-slot=</option></term>
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
||||||
for possible values and the default value of
|
<listitem><para>Specifies the key slot to compare the
|
||||||
this option. This option is ignored in plain
|
passphrase or key against. If the key slot does not match the
|
||||||
encryption mode, as the key file size is then
|
given passphrase or key, but another would, the setup of the
|
||||||
given by the key size.</para></listitem>
|
device will fail regardless. This option implies
|
||||||
</varlistentry>
|
<option>luks</option>. See
|
||||||
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<varlistentry>
|
for possible values. The default is to try all key slots in
|
||||||
<term><option>key-slot=</option></term>
|
sequential order.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Specifies the key slot to
|
|
||||||
compare the passphrase or key against.
|
<varlistentry>
|
||||||
If the key slot does not match the given
|
<term><option>luks</option></term>
|
||||||
passphrase or key, but another would, the
|
|
||||||
setup of the device will fail regardless.
|
<listitem><para>Force LUKS mode. When this mode is used, the
|
||||||
This option implies <option>luks</option>. See
|
following options are ignored since they are provided by the
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
LUKS header on the device: <option>cipher=</option>,
|
||||||
for possible values. The default is to try
|
<option>hash=</option>,
|
||||||
all key slots in sequential order.</para></listitem>
|
<option>size=</option>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>luks</option></term>
|
<term><option>noauto</option></term>
|
||||||
|
|
||||||
<listitem><para>Force LUKS mode. When this mode
|
<listitem><para>This device will not be automatically unlocked
|
||||||
is used, the following options are ignored since
|
on boot.</para></listitem>
|
||||||
they are provided by the LUKS header on the
|
</varlistentry>
|
||||||
device: <option>cipher=</option>,
|
|
||||||
<option>hash=</option>,
|
<varlistentry>
|
||||||
<option>size=</option>.</para></listitem>
|
<term><option>nofail</option></term>
|
||||||
</varlistentry>
|
|
||||||
|
<listitem><para>The system will not wait for the device to
|
||||||
<varlistentry>
|
show up and be unlocked at boot, and not fail the boot if it
|
||||||
<term><option>noauto</option></term>
|
does not show up.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>This device will not be
|
|
||||||
automatically unlocked on boot.</para></listitem>
|
<varlistentry>
|
||||||
</varlistentry>
|
<term><option>plain</option></term>
|
||||||
|
|
||||||
<varlistentry>
|
<listitem><para>Force plain encryption mode.</para></listitem>
|
||||||
<term><option>nofail</option></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>The system will not wait for the
|
<varlistentry>
|
||||||
device to show up and be unlocked at boot, and
|
<term><option>read-only</option></term><term><option>readonly</option></term>
|
||||||
not fail the boot if it does not show up.</para></listitem>
|
|
||||||
</varlistentry>
|
<listitem><para>Set up the encrypted block device in read-only
|
||||||
|
mode.</para></listitem>
|
||||||
<varlistentry>
|
</varlistentry>
|
||||||
<term><option>plain</option></term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>Force plain encryption mode.</para></listitem>
|
<term><option>size=</option></term>
|
||||||
</varlistentry>
|
|
||||||
|
<listitem><para>Specifies the key size in bits. See
|
||||||
<varlistentry>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<term><option>read-only</option></term><term><option>readonly</option></term>
|
for possible values and the default value of this
|
||||||
|
option.</para></listitem>
|
||||||
<listitem><para>Set up the encrypted block
|
</varlistentry>
|
||||||
device in read-only mode.</para></listitem>
|
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
|
<term><option>swap</option></term>
|
||||||
<varlistentry>
|
|
||||||
<term><option>size=</option></term>
|
<listitem><para>The encrypted block device will be used as a
|
||||||
|
swap device, and will be formatted accordingly after setting
|
||||||
<listitem><para>Specifies the key size
|
up the encrypted block device, with
|
||||||
in bits. See
|
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
This option implies <option>plain</option>.</para>
|
||||||
for possible values and the default value of
|
|
||||||
this option.</para></listitem>
|
<para>WARNING: Using the <option>swap</option> option will
|
||||||
</varlistentry>
|
destroy the contents of the named partition during every boot,
|
||||||
|
so make sure the underlying block device is specified
|
||||||
<varlistentry>
|
correctly.</para></listitem>
|
||||||
<term><option>swap</option></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>The encrypted block device will
|
<varlistentry>
|
||||||
be used as a swap device, and will be formatted
|
<term><option>tcrypt</option></term>
|
||||||
accordingly after setting up the encrypted
|
|
||||||
block device, with
|
<listitem><para>Use TrueCrypt encryption mode. When this mode
|
||||||
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
is used, the following options are ignored since they are
|
||||||
This option implies <option>plain</option>.</para>
|
provided by the TrueCrypt header on the device or do not
|
||||||
|
apply:
|
||||||
<para>WARNING: Using the <option>swap</option>
|
<option>cipher=</option>,
|
||||||
option will destroy the contents of the named
|
<option>hash=</option>,
|
||||||
partition during every boot, so make sure the
|
<option>keyfile-offset=</option>,
|
||||||
underlying block device is specified correctly.</para></listitem>
|
<option>keyfile-size=</option>,
|
||||||
</varlistentry>
|
<option>size=</option>.</para>
|
||||||
|
|
||||||
<varlistentry>
|
<para>When this mode is used, the passphrase is read from the
|
||||||
<term><option>tcrypt</option></term>
|
key file given in the third field. Only the first line of this
|
||||||
|
file is read, excluding the new line character.</para>
|
||||||
<listitem><para>Use TrueCrypt encryption mode.
|
|
||||||
When this mode is used, the following options are
|
<para>Note that the TrueCrypt format uses both passphrase and
|
||||||
ignored since they are provided by the TrueCrypt
|
key files to derive a password for the volume. Therefore, the
|
||||||
header on the device or do not apply:
|
passphrase and all key files need to be provided. Use
|
||||||
<option>cipher=</option>,
|
<option>tcrypt-keyfile=</option> to provide the absolute path
|
||||||
<option>hash=</option>,
|
to all key files. When using an empty passphrase in
|
||||||
<option>keyfile-offset=</option>,
|
combination with one or more key files, use
|
||||||
<option>keyfile-size=</option>,
|
<literal>/dev/null</literal> as the password file in the third
|
||||||
<option>size=</option>.</para>
|
field.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<para>When this mode is used, the passphrase is
|
|
||||||
read from the key file given in the third field.
|
<varlistentry>
|
||||||
Only the first line of this file is read,
|
<term><option>tcrypt-hidden</option></term>
|
||||||
excluding the new line character.</para>
|
|
||||||
|
<listitem><para>Use the hidden TrueCrypt volume. This option
|
||||||
<para>Note that the TrueCrypt format uses both
|
implies <option>tcrypt</option>.</para>
|
||||||
passphrase and key files to derive a password
|
|
||||||
for the volume. Therefore, the passphrase and
|
<para>This will map the hidden volume that is inside of the
|
||||||
all key files need to be provided. Use
|
volume provided in the second field. Please note that there is
|
||||||
<option>tcrypt-keyfile=</option> to provide
|
no protection for the hidden volume if the outer volume is
|
||||||
the absolute path to all key files. When using
|
mounted instead. See
|
||||||
an empty passphrase in combination with one or
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
more key files, use <literal>/dev/null</literal>
|
for more information on this limitation.</para></listitem>
|
||||||
as the password file in the third field.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><option>tcrypt-keyfile=</option></term>
|
||||||
<term><option>tcrypt-hidden</option></term>
|
|
||||||
|
<listitem><para>Specifies the absolute path to a key file to
|
||||||
<listitem><para>Use the hidden TrueCrypt volume.
|
use for a TrueCrypt volume. This implies
|
||||||
This option implies <option>tcrypt</option>.</para>
|
<option>tcrypt</option> and can be used more than once to
|
||||||
|
provide several key files.</para>
|
||||||
<para>This will map the hidden volume that is
|
|
||||||
inside of the volume provided in the second
|
<para>See the entry for <option>tcrypt</option> on the
|
||||||
field. Please note that there is no protection
|
behavior of the passphrase and key files when using TrueCrypt
|
||||||
for the hidden volume if the outer volume is
|
encryption mode.</para></listitem>
|
||||||
mounted instead. See
|
</varlistentry>
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
||||||
for more information on this limitation.</para></listitem>
|
<varlistentry>
|
||||||
</varlistentry>
|
<term><option>tcrypt-system</option></term>
|
||||||
|
|
||||||
<varlistentry>
|
<listitem><para>Use TrueCrypt in system encryption mode. This
|
||||||
<term><option>tcrypt-keyfile=</option></term>
|
option implies <option>tcrypt</option>.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Specifies the absolute path to a
|
|
||||||
key file to use for a TrueCrypt volume. This
|
<varlistentry>
|
||||||
implies <option>tcrypt</option> and can be
|
<term><option>timeout=</option></term>
|
||||||
used more than once to provide several key
|
|
||||||
files.</para>
|
<listitem><para>Specifies the timeout for querying for a
|
||||||
|
password. If no unit is specified, seconds is used. Supported
|
||||||
<para>See the entry for <option>tcrypt</option>
|
units are s, ms, us, min, h, d. A timeout of 0 waits
|
||||||
on the behavior of the passphrase and key files
|
indefinitely (which is the default).</para></listitem>
|
||||||
when using TrueCrypt encryption mode.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><option>x-systemd.device-timeout=</option></term>
|
||||||
<term><option>tcrypt-system</option></term>
|
|
||||||
|
<listitem><para>Specifies how long systemd should wait for a
|
||||||
<listitem><para>Use TrueCrypt in system
|
device to show up before giving up on the entry. The argument
|
||||||
encryption mode. This option implies
|
is a time in seconds or explicitly specified units of
|
||||||
<option>tcrypt</option>.</para></listitem>
|
<literal>s</literal>,
|
||||||
</varlistentry>
|
<literal>min</literal>,
|
||||||
|
<literal>h</literal>,
|
||||||
<varlistentry>
|
<literal>ms</literal>.
|
||||||
<term><option>timeout=</option></term>
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Specifies the timeout for
|
|
||||||
querying for a password. If no unit is
|
<varlistentry>
|
||||||
specified, seconds is used. Supported units are
|
<term><option>tmp</option></term>
|
||||||
s, ms, us, min, h, d. A timeout of 0 waits
|
|
||||||
indefinitely (which is the default).</para></listitem>
|
<listitem><para>The encrypted block device will be prepared
|
||||||
</varlistentry>
|
for using it as <filename>/tmp</filename>; it will be
|
||||||
|
formatted using
|
||||||
<varlistentry>
|
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
<term><option>x-systemd.device-timeout=</option></term>
|
This option implies <option>plain</option>.</para>
|
||||||
|
|
||||||
<listitem><para>Specifies how long
|
<para>WARNING: Using the <option>tmp</option> option will
|
||||||
systemd should wait for a device to
|
destroy the contents of the named partition during every boot,
|
||||||
show up before giving up on the
|
so make sure the underlying block device is specified
|
||||||
entry. The argument is a time in
|
correctly.</para></listitem>
|
||||||
seconds or explicitly specified
|
</varlistentry>
|
||||||
units of <literal>s</literal>,
|
|
||||||
<literal>min</literal>,
|
<varlistentry>
|
||||||
<literal>h</literal>,
|
<term><option>tries=</option></term>
|
||||||
<literal>ms</literal>.
|
|
||||||
</para></listitem>
|
<listitem><para>Specifies the maximum number of times the user
|
||||||
</varlistentry>
|
is queried for a password. The default is 3. If set to 0, the
|
||||||
|
user is queried for a password indefinitely.</para></listitem>
|
||||||
<varlistentry>
|
</varlistentry>
|
||||||
<term><option>tmp</option></term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>The encrypted block device will
|
<term><option>verify</option></term>
|
||||||
be prepared for using it as <filename>/tmp</filename>;
|
|
||||||
it will be formatted using
|
<listitem><para> If the encryption password is read from
|
||||||
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
console, it has to be entered twice to prevent
|
||||||
This option implies <option>plain</option>.</para>
|
typos.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<para>WARNING: Using the <option>tmp</option>
|
|
||||||
option will destroy the contents of the named
|
</variablelist>
|
||||||
partition during every boot, so make sure the
|
|
||||||
underlying block device is specified correctly.</para></listitem>
|
<para>At early boot and when the system manager configuration is
|
||||||
</varlistentry>
|
reloaded, this file is translated into native systemd units by
|
||||||
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<varlistentry>
|
</refsect1>
|
||||||
<term><option>tries=</option></term>
|
|
||||||
|
<refsect1>
|
||||||
<listitem><para>Specifies the maximum number of
|
<title>Example</title>
|
||||||
times the user is queried for a password.
|
<example>
|
||||||
The default is 3. If set to 0, the user is
|
<title>/etc/crypttab example</title>
|
||||||
queried for a password indefinitely.</para></listitem>
|
<para>Set up four encrypted block devices. One using LUKS for
|
||||||
</varlistentry>
|
normal storage, another one for usage as a swap device and two
|
||||||
|
TrueCrypt volumes.</para>
|
||||||
<varlistentry>
|
|
||||||
<term><option>verify</option></term>
|
<programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
|
||||||
|
swap /dev/sda7 /dev/urandom swap
|
||||||
<listitem><para> If the encryption password is
|
|
||||||
read from console, it has to be entered twice to
|
|
||||||
prevent typos.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
<para>At early boot and when the system manager
|
|
||||||
configuration is reloaded, this file is translated into
|
|
||||||
native systemd units
|
|
||||||
by <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
|
||||||
<title>Example</title>
|
|
||||||
<example>
|
|
||||||
<title>/etc/crypttab example</title>
|
|
||||||
<para>Set up four encrypted block devices. One using
|
|
||||||
LUKS for normal storage, another one for usage as a swap
|
|
||||||
device and two TrueCrypt volumes.</para>
|
|
||||||
|
|
||||||
<programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
|
|
||||||
swap /dev/sda7 /dev/urandom swap
|
|
||||||
truecrypt /dev/sda2 /etc/container_password tcrypt
|
truecrypt /dev/sda2 /etc/container_password tcrypt
|
||||||
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
|
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+690
-882
File diff suppressed because it is too large
Load Diff
+790
-952
File diff suppressed because it is too large
Load Diff
+112
-116
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,151 +22,147 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="halt"
|
<refentry id="halt"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>halt</title>
|
<title>halt</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>halt</refentrytitle>
|
<refentrytitle>halt</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>halt</refname>
|
<refname>halt</refname>
|
||||||
<refname>poweroff</refname>
|
<refname>poweroff</refname>
|
||||||
<refname>reboot</refname>
|
<refname>reboot</refname>
|
||||||
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
|
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>halt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
<command>halt</command>
|
||||||
</cmdsynopsis>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<command>poweroff <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
<cmdsynopsis>
|
||||||
</cmdsynopsis>
|
<command>poweroff</command>
|
||||||
<cmdsynopsis>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<command>reboot <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
</cmdsynopsis>
|
||||||
</cmdsynopsis>
|
<cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
<command>reboot</command>
|
||||||
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>halt</command>,
|
<para><command>halt</command>, <command>poweroff</command>,
|
||||||
<command>poweroff</command>, <command>reboot</command>
|
<command>reboot</command> may be used to halt, power-off or reboot
|
||||||
may be used to halt, power-off or reboot the
|
the machine.</para>
|
||||||
machine.</para>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--help</option></term>
|
<term><option>--help</option></term>
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help-text" />
|
<xi:include href="standard-options.xml" xpointer="help-text" />
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--halt</option></term>
|
<term><option>--halt</option></term>
|
||||||
|
|
||||||
<listitem><para>Halt the machine,
|
<listitem><para>Halt the machine, regardless of which one of
|
||||||
regardless of which one of the three
|
the three commands is invoked.</para></listitem>
|
||||||
commands is invoked.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
<term><option>--poweroff</option></term>
|
<term><option>--poweroff</option></term>
|
||||||
|
|
||||||
<listitem><para>Power-off the machine,
|
<listitem><para>Power-off the machine, regardless of which one
|
||||||
regardless of which one of the three
|
of the three commands is invoked.</para></listitem>
|
||||||
commands is invoked.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--reboot</option></term>
|
<term><option>--reboot</option></term>
|
||||||
|
|
||||||
<listitem><para>Reboot the machine,
|
<listitem><para>Reboot the machine, regardless of which one of
|
||||||
regardless of which one of the three
|
the three commands is invoked.</para></listitem>
|
||||||
commands is invoked.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-f</option></term>
|
<term><option>-f</option></term>
|
||||||
<term><option>--force</option></term>
|
<term><option>--force</option></term>
|
||||||
|
|
||||||
<listitem><para>Force immediate halt,
|
<listitem><para>Force immediate halt, power-off, reboot. Do
|
||||||
power-off, reboot. Do not contact the
|
not contact the init system.</para></listitem>
|
||||||
init system.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-w</option></term>
|
<term><option>-w</option></term>
|
||||||
<term><option>--wtmp-only</option></term>
|
<term><option>--wtmp-only</option></term>
|
||||||
|
|
||||||
<listitem><para>Only write wtmp
|
<listitem><para>Only write wtmp shutdown entry, do not
|
||||||
shutdown entry, do not actually halt,
|
actually halt, power-off, reboot.</para></listitem>
|
||||||
power-off, reboot.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-d</option></term>
|
<term><option>-d</option></term>
|
||||||
<term><option>--no-wtmp</option></term>
|
<term><option>--no-wtmp</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not write wtmp
|
<listitem><para>Do not write wtmp shutdown
|
||||||
shutdown entry.</para></listitem>
|
entry.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-wall</option></term>
|
<term><option>--no-wall</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not send wall
|
<listitem><para>Do not send wall message before halt,
|
||||||
message before
|
power-off, reboot.</para></listitem>
|
||||||
halt, power-off, reboot.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
</variablelist>
|
||||||
</variablelist>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>These are legacy commands available for
|
<para>These are legacy commands available for compatibility
|
||||||
compatibility only.</para>
|
only.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+65
-69
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,84 +23,80 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="hostname">
|
<refentry id="hostname">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>hostname</title>
|
<title>hostname</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>hostname</refentrytitle>
|
<refentrytitle>hostname</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>hostname</refname>
|
<refname>hostname</refname>
|
||||||
<refpurpose>Local hostname configuration file</refpurpose>
|
<refpurpose>Local hostname configuration file</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/hostname</filename></para>
|
<para><filename>/etc/hostname</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/hostname</filename> file
|
<para>The <filename>/etc/hostname</filename> file configures the
|
||||||
configures the name of the local system that is set
|
name of the local system that is set during boot using the
|
||||||
during boot using the
|
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
system call. It should contain a single newline-terminated
|
||||||
system call. It should contain a single
|
hostname string. The hostname may be a free-form string up to 64
|
||||||
newline-terminated hostname string. The
|
characters in length; however, it is recommended that it consists
|
||||||
hostname may be a free-form string up to 64 characters
|
only of 7-bit ASCII lower-case characters and no spaces or dots,
|
||||||
in length; however, it is recommended that it consists
|
and limits itself to the format allowed for DNS domain name
|
||||||
only of 7-bit ASCII lower-case characters and no spaces or dots,
|
labels, even though this is not a strict requirement.</para>
|
||||||
and limits itself to the format allowed for DNS domain
|
|
||||||
name labels, even though this is not a
|
|
||||||
strict requirement.</para>
|
|
||||||
|
|
||||||
<para>Depending on the operating system, other
|
<para>Depending on the operating system, other configuration files
|
||||||
configuration files might be checked for configuration
|
might be checked for configuration of the hostname as well,
|
||||||
of the hostname as well, however only as fallback.</para>
|
however only as fallback.</para>
|
||||||
|
|
||||||
<para>You may use
|
<para>You may use
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to change the value of this file during runtime from
|
to change the value of this file during runtime from the command
|
||||||
the command line. Use
|
line. Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize it on mounted (but not booted) system
|
to initialize it on mounted (but not booted) system images.</para>
|
||||||
images.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para>The simple configuration file format of
|
<para>The simple configuration file format of
|
||||||
<filename>/etc/hostname</filename> originates from
|
<filename>/etc/hostname</filename> originates from Debian
|
||||||
Debian GNU/Linux.</para>
|
GNU/Linux.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+194
-231
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,276 +22,239 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="hostnamectl" conditional='ENABLE_HOSTNAMED'
|
<refentry id="hostnamectl" conditional='ENABLE_HOSTNAMED'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>hostnamectl</title>
|
<title>hostnamectl</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>hostnamectl</refentrytitle>
|
<refentrytitle>hostnamectl</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>hostnamectl</refname>
|
<refname>hostnamectl</refname>
|
||||||
<refpurpose>Control the system hostname</refpurpose>
|
<refpurpose>Control the system hostname</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>hostnamectl</command>
|
<command>hostnamectl</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="req">COMMAND</arg>
|
<arg choice="req">COMMAND</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>hostnamectl</command> may be used to
|
<para><command>hostnamectl</command> may be used to query and
|
||||||
query and change the system hostname and related
|
change the system hostname and related settings.</para>
|
||||||
settings.</para>
|
|
||||||
|
|
||||||
<para>This tool distinguishes three different
|
<para>This tool distinguishes three different hostnames: the
|
||||||
hostnames: the high-level "pretty" hostname which
|
high-level "pretty" hostname which might include all kinds of
|
||||||
might include all kinds of special characters
|
special characters (e.g. "Lennart's Laptop"), the static hostname
|
||||||
(e.g. "Lennart's Laptop"), the static hostname which
|
which is used to initialize the kernel hostname at boot (e.g.
|
||||||
is used to initialize the kernel hostname at boot
|
"lennarts-laptop"), and the transient hostname which is a default
|
||||||
(e.g. "lennarts-laptop"), and the transient hostname
|
received from network configuration. If a static hostname is set,
|
||||||
which is a default received from network configuration.
|
and is valid (something other than localhost), then the transient
|
||||||
If a static hostname is set, and is valid (something other
|
hostname is not used.</para>
|
||||||
than localhost), then the transient hostname is not used.</para>
|
|
||||||
|
|
||||||
<para>Note that the pretty hostname has little
|
<para>Note that the pretty hostname has little restrictions on the
|
||||||
restrictions on the characters used, while the static
|
characters used, while the static and transient hostnames are
|
||||||
and transient hostnames are limited to the usually
|
limited to the usually accepted characters of Internet domain
|
||||||
accepted characters of Internet domain names.</para>
|
names.</para>
|
||||||
|
|
||||||
<para>The static hostname is stored in
|
<para>The static hostname is stored in
|
||||||
<filename>/etc/hostname</filename>, see
|
<filename>/etc/hostname</filename>, see
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for more information. The pretty hostname, chassis
|
for more information. The pretty hostname, chassis type, and icon
|
||||||
type, and icon name are stored in
|
name are stored in <filename>/etc/machine-info</filename>, see
|
||||||
<filename>/etc/machine-info</filename>, see
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>Use
|
<para>Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the system host name for mounted (but
|
to initialize the system host name for mounted (but not booted)
|
||||||
not booted) system images.</para>
|
system images.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-ask-password</option></term>
|
<term><option>--no-ask-password</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not query the user
|
<listitem><para>Do not query the user for authentication for
|
||||||
for authentication for privileged
|
privileged operations.</para></listitem>
|
||||||
operations.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--static</option></term>
|
<term><option>--static</option></term>
|
||||||
<term><option>--transient</option></term>
|
<term><option>--transient</option></term>
|
||||||
<term><option>--pretty</option></term>
|
<term><option>--pretty</option></term>
|
||||||
|
|
||||||
<listitem><para>If
|
<listitem><para>If <command>status</command> is used (or no
|
||||||
<command>status</command> is used (or
|
explicit command is given) and one of those fields is given,
|
||||||
no explicit command is given) and one
|
<command>hostnamectl</command> will print out just this
|
||||||
of those fields is given,
|
selected hostname.</para>
|
||||||
<command>hostnamectl</command> will
|
|
||||||
print out just this selected
|
|
||||||
hostname.</para>
|
|
||||||
|
|
||||||
<para>If used with
|
<para>If used with <command>set-hostname</command>, only the
|
||||||
<command>set-hostname</command>, only
|
selected hostname(s) will be updated. When more than one of
|
||||||
the selected hostname(s) will be
|
those options is used, all the specified hostnames will be
|
||||||
updated. When more than one of those
|
updated. </para></listitem>
|
||||||
options is used, all the specified
|
</varlistentry>
|
||||||
hostnames will be updated.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="host" />
|
<xi:include href="user-system-options.xml" xpointer="host" />
|
||||||
<xi:include href="user-system-options.xml" xpointer="machine" />
|
<xi:include href="user-system-options.xml" xpointer="machine" />
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The following commands are understood:</para>
|
<para>The following commands are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>status</command></term>
|
<term><command>status</command></term>
|
||||||
|
|
||||||
<listitem><para>Show current system
|
<listitem><para>Show current system
|
||||||
hostname and related
|
hostname and related
|
||||||
information.</para></listitem>
|
information.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-hostname <replaceable>NAME</replaceable></command></term>
|
<term><command>set-hostname <replaceable>NAME</replaceable></command></term>
|
||||||
|
|
||||||
<listitem><para>Set the system
|
<listitem><para>Set the system hostname to
|
||||||
hostname to
|
<replaceable>NAME</replaceable>. By default, this will alter
|
||||||
<replaceable>NAME</replaceable>. By
|
the pretty, the static, and the transient hostname alike;
|
||||||
default, this will alter the pretty,
|
however, if one or more of <option>--static</option>,
|
||||||
the static, and the transient hostname
|
<option>--transient</option>, <option>--pretty</option> are
|
||||||
alike; however, if one or more of
|
used, only the selected hostnames are changed. If the pretty
|
||||||
<option>--static</option>,
|
hostname is being set, and static or transient are being set
|
||||||
<option>--transient</option>,
|
as well, the specified hostname will be simplified in regards
|
||||||
<option>--pretty</option> are used,
|
to the character set used before the latter are updated. This
|
||||||
only the selected hostnames are
|
is done by replacing spaces with <literal>-</literal> and
|
||||||
changed. If the pretty hostname is
|
removing special characters. This ensures that the pretty and
|
||||||
being set, and static or transient are
|
the static hostname are always closely related while still
|
||||||
being set as well, the specified
|
following the validity rules of the specific name. This
|
||||||
hostname will be simplified in regards
|
simplification of the hostname string is not done if only the
|
||||||
to the character set used before the
|
transient and/or static host names are set, and the pretty
|
||||||
latter are updated. This is done by
|
host name is left untouched.</para>
|
||||||
replacing spaces with
|
|
||||||
<literal>-</literal> and removing
|
|
||||||
special characters. This ensures that
|
|
||||||
the pretty and the static hostname are
|
|
||||||
always closely related while still
|
|
||||||
following the validity rules of the
|
|
||||||
specific name. This simplification of
|
|
||||||
the hostname string is not done if
|
|
||||||
only the transient and/or static host
|
|
||||||
names are set, and the pretty host
|
|
||||||
name is left untouched.</para>
|
|
||||||
|
|
||||||
<para>Pass the empty string
|
<para>Pass the empty string <literal></literal> as the
|
||||||
<literal></literal> as the hostname to
|
hostname to reset the selected hostnames to their default
|
||||||
reset the selected hostnames to their
|
(usually <literal>localhost</literal>).</para></listitem>
|
||||||
default (usually
|
</varlistentry>
|
||||||
<literal>localhost</literal>).</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
|
<term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
|
||||||
|
|
||||||
<listitem><para>Set the system icon
|
<listitem><para>Set the system icon name to
|
||||||
name to
|
<replaceable>NAME</replaceable>. The icon name is used by some
|
||||||
<replaceable>NAME</replaceable>. The
|
graphical applications to visualize this host. The icon name
|
||||||
icon name is used by some graphical
|
should follow the <ulink
|
||||||
applications to visualize this host.
|
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
|
||||||
The icon name should follow the <ulink
|
Naming Specification</ulink>.</para>
|
||||||
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
|
|
||||||
Naming Specification</ulink>.</para>
|
|
||||||
|
|
||||||
<para>Pass an empty string to reset
|
<para>Pass an empty string to reset the icon name to the
|
||||||
the icon name to the default value,
|
default value, which is determined from chassis type (see
|
||||||
which is determined from chassis type
|
below) and possibly other parameters.</para></listitem>
|
||||||
(see below) and possibly other
|
</varlistentry>
|
||||||
parameters.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
|
<term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
|
||||||
|
|
||||||
<listitem><para>Set the chassis type
|
<listitem><para>Set the chassis type to
|
||||||
to <replaceable>TYPE</replaceable>.
|
<replaceable>TYPE</replaceable>. The chassis type is used by
|
||||||
The chassis type is used by some
|
some graphical applications to visualize the host or alter
|
||||||
graphical applications to visualize
|
user interaction. Currently, the following chassis types are
|
||||||
the host or alter user interaction.
|
defined:
|
||||||
Currently, the following chassis types
|
<literal>desktop</literal>,
|
||||||
are defined:
|
<literal>laptop</literal>,
|
||||||
<literal>desktop</literal>,
|
<literal>server</literal>,
|
||||||
<literal>laptop</literal>,
|
<literal>tablet</literal>,
|
||||||
<literal>server</literal>,
|
<literal>handset</literal>,
|
||||||
<literal>tablet</literal>,
|
<literal>watch</literal>,
|
||||||
<literal>handset</literal>,
|
<literal>embedded</literal>,
|
||||||
<literal>watch</literal>,
|
as well as the special chassis types
|
||||||
<literal>embedded</literal> as well as
|
<literal>vm</literal> and
|
||||||
the special chassis types
|
<literal>container</literal> for virtualized systems that lack
|
||||||
<literal>vm</literal> and
|
an immediate physical chassis.</para>
|
||||||
<literal>container</literal> for
|
|
||||||
virtualized systems that lack an
|
|
||||||
immediate physical chassis.</para>
|
|
||||||
|
|
||||||
<para>Pass an empty string to reset
|
<para>Pass an empty string to reset the chassis type to the
|
||||||
the chassis type to the default value
|
default value which is determined from the firmware and
|
||||||
which is determined from the firmware
|
possibly other parameters.</para>
|
||||||
and possibly other parameters.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-deployment <replaceable>ENVIRONMENT</replaceable></command></term>
|
<term><command>set-deployment <replaceable>ENVIRONMENT</replaceable></command></term>
|
||||||
|
|
||||||
<listitem><para>Set the deployment
|
<listitem><para>Set the deployment environment description.
|
||||||
environment
|
<replaceable>ENVIRONMENT</replaceable> must be a single word
|
||||||
description. <replaceable>ENVIRONMENT</replaceable>
|
without any control characters. One of the following is
|
||||||
must be a single word without any
|
suggested:
|
||||||
control characters. One of the
|
<literal>development</literal>,
|
||||||
following is suggested:
|
<literal>integration</literal>,
|
||||||
<literal>development</literal>,
|
<literal>staging</literal>,
|
||||||
<literal>integration</literal>,
|
<literal>production</literal>.
|
||||||
<literal>staging</literal>,
|
</para>
|
||||||
<literal>production</literal>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>Pass an empty string to reset to
|
<para>Pass an empty string to reset to the default empty
|
||||||
the default empty value.</para>
|
value.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-location <replaceable>LOCATION</replaceable></command></term>
|
<term><command>set-location <replaceable>LOCATION</replaceable></command></term>
|
||||||
|
|
||||||
<listitem><para>Set the location
|
<listitem><para>Set the location string for the system, if it
|
||||||
string for the system, if it is
|
is known. <replaceable>LOCATION</replaceable> should be a
|
||||||
known. <replaceable>LOCATION</replaceable>
|
human-friendly, free-form string describing the physical
|
||||||
should be a human-friendly, free-form
|
location of the system, if it is known and applicable. This
|
||||||
string describing the physical
|
may be as generic as <literal>Berlin, Germany</literal> or as
|
||||||
location of the system, if it is known
|
specific as <literal>Left Rack, 2nd Shelf</literal>.</para>
|
||||||
and applicable. This may be as generic
|
|
||||||
as <literal>Berlin, Germany</literal>
|
|
||||||
or as specific as <literal>Left Rack,
|
|
||||||
2nd Shelf</literal>.</para>
|
|
||||||
|
|
||||||
<para>Pass an empty string to reset to
|
<para>Pass an empty string to reset to the default empty
|
||||||
the default empty value.</para>
|
value.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+313
-417
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,463 +23,359 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="journald.conf"
|
<refentry id="journald.conf"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>journald.conf</title>
|
<title>journald.conf</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>journald.conf</refentrytitle>
|
<refentrytitle>journald.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>journald.conf</refname>
|
<refname>journald.conf</refname>
|
||||||
<refname>journald.conf.d</refname>
|
<refname>journald.conf.d</refname>
|
||||||
<refpurpose>Journal service configuration files</refpurpose>
|
<refpurpose>Journal service configuration files</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/systemd/journald.conf</filename></para>
|
<para><filename>/etc/systemd/journald.conf</filename></para>
|
||||||
<para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
|
<para><filename>/etc/systemd/journald.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
|
<para><filename>/run/systemd/journald.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
|
<para><filename>/usr/lib/systemd/journald.conf.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>These files configure various parameters of the
|
<para>These files configure various parameters of the systemd
|
||||||
systemd journal service,
|
journal service,
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
<xi:include href="standard-conf.xml" xpointer="conf" />
|
<xi:include href="standard-conf.xml" xpointer="conf" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>All options are configured in the
|
<para>All options are configured in the
|
||||||
<literal>[Journal]</literal> section:</para>
|
<literal>[Journal]</literal> section:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Storage=</varname></term>
|
<term><varname>Storage=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls where to
|
<listitem><para>Controls where to store journal data. One of
|
||||||
store journal data. One of
|
<literal>volatile</literal>,
|
||||||
<literal>volatile</literal>,
|
<literal>persistent</literal>,
|
||||||
<literal>persistent</literal>,
|
<literal>auto</literal> and
|
||||||
<literal>auto</literal> and
|
<literal>none</literal>. If
|
||||||
<literal>none</literal>. If
|
<literal>volatile</literal>, journal
|
||||||
<literal>volatile</literal>, journal
|
log data will be stored only in memory, i.e. below the
|
||||||
log data will be stored only in
|
<filename>/run/log/journal</filename> hierarchy (which is
|
||||||
memory, i.e. below the
|
created if needed). If <literal>persistent</literal>, data
|
||||||
<filename>/run/log/journal</filename>
|
will be stored preferably on disk, i.e. below the
|
||||||
hierarchy (which is created if
|
<filename>/var/log/journal</filename> hierarchy (which is
|
||||||
needed). If
|
created if needed), with a fallback to
|
||||||
<literal>persistent</literal>, data will
|
<filename>/run/log/journal</filename> (which is created if
|
||||||
be stored preferably on disk,
|
needed), during early boot and if the disk is not writable.
|
||||||
i.e. below the
|
<literal>auto</literal> is similar to
|
||||||
<filename>/var/log/journal</filename>
|
<literal>persistent</literal> but the directory
|
||||||
hierarchy (which is created if
|
<filename>/var/log/journal</filename> is not created if
|
||||||
needed), with a fallback to
|
needed, so that its existence controls where log data goes.
|
||||||
<filename>/run/log/journal</filename>
|
<literal>none</literal> turns off all storage, all log data
|
||||||
(which is created if needed), during
|
received will be dropped. Forwarding to other targets, such as
|
||||||
early boot and if the disk is not
|
the console, the kernel log buffer or a syslog daemon will
|
||||||
writable. <literal>auto</literal> is
|
still work however. Defaults to
|
||||||
similar to
|
<literal>auto</literal>.</para></listitem>
|
||||||
<literal>persistent</literal> but the
|
</varlistentry>
|
||||||
directory
|
|
||||||
<filename>/var/log/journal</filename>
|
|
||||||
is not created if needed, so that its
|
|
||||||
existence controls where log data
|
|
||||||
goes. <literal>none</literal> turns
|
|
||||||
off all storage, all log data received
|
|
||||||
will be dropped. Forwarding to other
|
|
||||||
targets, such as the console, the
|
|
||||||
kernel log buffer or a syslog daemon
|
|
||||||
will still work however. Defaults to
|
|
||||||
<literal>auto</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Compress=</varname></term>
|
<term><varname>Compress=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean value. If enabled (the
|
||||||
value. If enabled (the default), data
|
default), data objects that shall be stored in the journal and
|
||||||
objects that shall be stored in the
|
are larger than a certain threshold are compressed before they
|
||||||
journal and are larger than a certain
|
are written to the file system.</para></listitem>
|
||||||
threshold are compressed before they
|
</varlistentry>
|
||||||
are written to the file
|
|
||||||
system.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>Seal=</varname></term>
|
<term><varname>Seal=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean value. If enabled (the
|
||||||
value. If enabled (the default), and a
|
default), and a sealing key is available (as created by
|
||||||
sealing key is available (as created
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
||||||
by
|
<option>--setup-keys</option> command), Forward Secure Sealing
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
(FSS) for all persistent journal files is enabled. FSS is
|
||||||
<option>--setup-keys</option>
|
based on <ulink
|
||||||
command), Forward Secure Sealing (FSS)
|
url="https://eprint.iacr.org/2013/397">Seekable Sequential Key
|
||||||
for all persistent journal files is
|
Generators</ulink> by G. A. Marson and B. Poettering
|
||||||
enabled. FSS is based on <ulink
|
(doi:10.1007/978-3-642-40203-6_7) and may be used to protect
|
||||||
url="https://eprint.iacr.org/2013/397">Seekable
|
journal files from unnoticed alteration.</para></listitem>
|
||||||
Sequential Key Generators</ulink> by
|
</varlistentry>
|
||||||
G. A. Marson and B. Poettering
|
|
||||||
(doi:10.1007/978-3-642-40203-6_7)
|
|
||||||
and may be used to protect journal files
|
|
||||||
from unnoticed alteration.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SplitMode=</varname></term>
|
<term><varname>SplitMode=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls whether to
|
<listitem><para>Controls whether to split up journal files per
|
||||||
split up journal files per user. One
|
user. One of <literal>uid</literal>, <literal>login</literal>
|
||||||
of <literal>uid</literal>,
|
and <literal>none</literal>. If <literal>uid</literal>, all
|
||||||
<literal>login</literal> and
|
users will get each their own journal files regardless of
|
||||||
<literal>none</literal>. If
|
whether they possess a login session or not, however system
|
||||||
<literal>uid</literal>, all users will
|
users will log into the system journal. If
|
||||||
get each their own journal files
|
<literal>login</literal>, actually logged-in users will get
|
||||||
regardless of whether they possess a
|
each their own journal files, but users without login session
|
||||||
login session or not, however system
|
and system users will log into the system journal. If
|
||||||
users will log into the system
|
<literal>none</literal>, journal files are not split up by
|
||||||
journal. If <literal>login</literal>,
|
user and all messages are instead stored in the single system
|
||||||
actually logged-in users will get each
|
journal. Note that splitting up journal files by user is only
|
||||||
their own journal files, but users
|
available for journals stored persistently. If journals are
|
||||||
without login session and system users
|
stored on volatile storage (see above), only a single journal
|
||||||
will log into the system journal. If
|
file for all user IDs is kept. Defaults to
|
||||||
<literal>none</literal>, journal files
|
<literal>uid</literal>.</para></listitem>
|
||||||
are not split up by user and all
|
</varlistentry>
|
||||||
messages are instead stored in the
|
|
||||||
single system journal. Note that
|
|
||||||
splitting up journal files by user is
|
|
||||||
only available for journals stored
|
|
||||||
persistently. If journals are stored
|
|
||||||
on volatile storage (see above), only
|
|
||||||
a single journal file for all user IDs
|
|
||||||
is kept. Defaults to
|
|
||||||
<literal>uid</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>RateLimitInterval=</varname></term>
|
<term><varname>RateLimitInterval=</varname></term>
|
||||||
<term><varname>RateLimitBurst=</varname></term>
|
<term><varname>RateLimitBurst=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Configures the rate
|
<listitem><para>Configures the rate limiting that is applied
|
||||||
limiting that is applied to all
|
to all messages generated on the system. If, in the time
|
||||||
messages generated on the system. If,
|
interval defined by <varname>RateLimitInterval=</varname>,
|
||||||
in the time interval defined by
|
more messages than specified in
|
||||||
<varname>RateLimitInterval=</varname>,
|
<varname>RateLimitBurst=</varname> are logged by a service,
|
||||||
more messages than specified in
|
all further messages within the interval are dropped until the
|
||||||
<varname>RateLimitBurst=</varname> are
|
interval is over. A message about the number of dropped
|
||||||
logged by a service, all further
|
messages is generated. This rate limiting is applied
|
||||||
messages within the interval are
|
per-service, so that two services which log do not interfere
|
||||||
dropped until the interval is over. A
|
with each other's limits. Defaults to 1000 messages in 30s.
|
||||||
message about the number of dropped
|
The time specification for
|
||||||
messages is generated. This rate
|
<varname>RateLimitInterval=</varname> may be specified in the
|
||||||
limiting is applied per-service, so
|
following units: <literal>s</literal>, <literal>min</literal>,
|
||||||
that two services which log do not
|
<literal>h</literal>, <literal>ms</literal>,
|
||||||
interfere with each other's
|
<literal>us</literal>. To turn off any kind of rate limiting,
|
||||||
limits. Defaults to 1000 messages in
|
set either value to 0.</para></listitem>
|
||||||
30s. The time specification for
|
</varlistentry>
|
||||||
<varname>RateLimitInterval=</varname>
|
|
||||||
may be specified in the following
|
|
||||||
units: <literal>s</literal>,
|
|
||||||
<literal>min</literal>,
|
|
||||||
<literal>h</literal>,
|
|
||||||
<literal>ms</literal>,
|
|
||||||
<literal>us</literal>. To turn off any
|
|
||||||
kind of rate limiting, set either
|
|
||||||
value to 0.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SystemMaxUse=</varname></term>
|
<term><varname>SystemMaxUse=</varname></term>
|
||||||
<term><varname>SystemKeepFree=</varname></term>
|
<term><varname>SystemKeepFree=</varname></term>
|
||||||
<term><varname>SystemMaxFileSize=</varname></term>
|
<term><varname>SystemMaxFileSize=</varname></term>
|
||||||
<term><varname>RuntimeMaxUse=</varname></term>
|
<term><varname>RuntimeMaxUse=</varname></term>
|
||||||
<term><varname>RuntimeKeepFree=</varname></term>
|
<term><varname>RuntimeKeepFree=</varname></term>
|
||||||
<term><varname>RuntimeMaxFileSize=</varname></term>
|
<term><varname>RuntimeMaxFileSize=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Enforce size limits on
|
<listitem><para>Enforce size limits on the journal files
|
||||||
the journal files stored. The options
|
stored. The options prefixed with <literal>System</literal>
|
||||||
prefixed with
|
apply to the journal files when stored on a persistent file
|
||||||
<literal>System</literal> apply to the
|
system, more specifically
|
||||||
journal files when stored on a
|
<filename>/var/log/journal</filename>. The options prefixed
|
||||||
persistent file system, more
|
with <literal>Runtime</literal> apply to the journal files
|
||||||
specifically
|
when stored on a volatile in-memory file system, more
|
||||||
<filename>/var/log/journal</filename>. The
|
specifically <filename>/run/log/journal</filename>. The former
|
||||||
options prefixed with
|
is used only when <filename>/var</filename> is mounted,
|
||||||
<literal>Runtime</literal> apply to
|
writable, and the directory
|
||||||
the journal files when stored on a
|
<filename>/var/log/journal</filename> exists. Otherwise, only
|
||||||
volatile in-memory file system, more
|
the latter applies. Note that this means that during early
|
||||||
specifically
|
boot and if the administrator disabled persistent logging,
|
||||||
<filename>/run/log/journal</filename>. The
|
only the latter options apply, while the former apply if
|
||||||
former is used only when
|
persistent logging is enabled and the system is fully booted
|
||||||
<filename>/var</filename> is mounted,
|
up. <command>journalctl</command> and
|
||||||
writable, and the directory
|
<command>systemd-journald</command> ignore all files with
|
||||||
<filename>/var/log/journal</filename>
|
names not ending with <literal>.journal</literal> or
|
||||||
exists. Otherwise, only the latter
|
<literal>.journal~</literal>, so only such files, located in
|
||||||
applies. Note that this means that
|
the appropriate directories, are taken into account when
|
||||||
during early boot and if the
|
calculating current disk usage.
|
||||||
administrator disabled persistent
|
</para>
|
||||||
logging, only the latter options apply,
|
|
||||||
while the former apply if persistent
|
|
||||||
logging is enabled and the system is
|
|
||||||
fully booted
|
|
||||||
up. <command>journalctl</command> and
|
|
||||||
<command>systemd-journald</command>
|
|
||||||
ignore all files with names not ending
|
|
||||||
with <literal>.journal</literal> or
|
|
||||||
<literal>.journal~</literal>, so only
|
|
||||||
such files, located in the appropriate
|
|
||||||
directories, are taken into account
|
|
||||||
when calculating current disk usage.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para><varname>SystemMaxUse=</varname>
|
<para><varname>SystemMaxUse=</varname> and
|
||||||
and <varname>RuntimeMaxUse=</varname>
|
<varname>RuntimeMaxUse=</varname> control how much disk space
|
||||||
control how much disk space the
|
the journal may use up at maximum.
|
||||||
journal may use up at maximum.
|
<varname>SystemKeepFree=</varname> and
|
||||||
<varname>SystemKeepFree=</varname> and
|
<varname>RuntimeKeepFree=</varname> control how much disk
|
||||||
<varname>RuntimeKeepFree=</varname>
|
space systemd-journald shall leave free for other uses.
|
||||||
control how much disk space
|
<command>systemd-journald</command> will respect both limits
|
||||||
systemd-journald shall leave free for
|
and use the smaller of the two values.</para>
|
||||||
other uses.
|
|
||||||
<command>systemd-journald</command>
|
|
||||||
will respect both limits and use the
|
|
||||||
smaller of the two values.</para>
|
|
||||||
|
|
||||||
<para>The first pair defaults to 10%
|
<para>The first pair defaults to 10% and the second to 15% of
|
||||||
and the second to 15% of the size of
|
the size of the respective file system. If the file system is
|
||||||
the respective file system. If the
|
nearly full and either <varname>SystemKeepFree=</varname> or
|
||||||
file system is nearly full and either
|
<varname>RuntimeKeepFree=</varname> is violated when
|
||||||
<varname>SystemKeepFree=</varname> or
|
systemd-journald is started, the value will be raised to
|
||||||
<varname>RuntimeKeepFree=</varname> is
|
percentage that is actually free. This means that if there was
|
||||||
violated when systemd-journald is
|
enough free space before and journal files were created, and
|
||||||
started, the value will be raised to
|
subsequently something else causes the file system to fill up,
|
||||||
percentage that is actually free. This
|
journald will stop using more space, but it will not be
|
||||||
means that if there was enough
|
removing existing files to go reduce footprint either.</para>
|
||||||
free space before and journal files were
|
|
||||||
created, and subsequently something
|
|
||||||
else causes the file system to fill
|
|
||||||
up, journald will stop using more
|
|
||||||
space, but it will not be removing
|
|
||||||
existing files to go reduce footprint
|
|
||||||
either.</para>
|
|
||||||
|
|
||||||
<para><varname>SystemMaxFileSize=</varname>
|
<para><varname>SystemMaxFileSize=</varname>
|
||||||
and
|
and
|
||||||
<varname>RuntimeMaxFileSize=</varname>
|
<varname>RuntimeMaxFileSize=</varname>
|
||||||
control how large individual journal
|
control how large individual journal
|
||||||
files may grow at maximum. This
|
files may grow at maximum. This
|
||||||
influences the granularity in which
|
influences the granularity in which
|
||||||
disk space is made available through
|
disk space is made available through
|
||||||
rotation, i.e. deletion of historic
|
rotation, i.e. deletion of historic
|
||||||
data. Defaults to one eighth of the
|
data. Defaults to one eighth of the
|
||||||
values configured with
|
values configured with
|
||||||
<varname>SystemMaxUse=</varname> and
|
<varname>SystemMaxUse=</varname> and
|
||||||
<varname>RuntimeMaxUse=</varname>, so
|
<varname>RuntimeMaxUse=</varname>, so
|
||||||
that usually seven rotated journal
|
that usually seven rotated journal
|
||||||
files are kept as history. Specify
|
files are kept as history. Specify
|
||||||
values in bytes or use K, M, G, T, P,
|
values in bytes or use K, M, G, T, P,
|
||||||
E as units for the specified sizes
|
E as units for the specified sizes
|
||||||
(equal to 1024, 1024²,... bytes).
|
(equal to 1024, 1024²,... bytes).
|
||||||
Note that size limits are enforced
|
Note that size limits are enforced
|
||||||
synchronously when journal files are
|
synchronously when journal files are
|
||||||
extended, and no explicit rotation
|
extended, and no explicit rotation
|
||||||
step triggered by time is
|
step triggered by time is
|
||||||
needed.</para></listitem>
|
needed.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>MaxFileSec=</varname></term>
|
<term><varname>MaxFileSec=</varname></term>
|
||||||
|
|
||||||
<listitem><para>The maximum time to
|
<listitem><para>The maximum time to store entries in a single
|
||||||
store entries in a single journal
|
journal file before rotating to the next one. Normally,
|
||||||
file before rotating to the next
|
time-based rotation should not be required as size-based
|
||||||
one. Normally, time-based rotation
|
rotation with options such as
|
||||||
should not be required as size-based
|
<varname>SystemMaxFileSize=</varname> should be sufficient to
|
||||||
rotation with options such as
|
ensure that journal files do not grow without bounds. However,
|
||||||
<varname>SystemMaxFileSize=</varname>
|
to ensure that not too much data is lost at once when old
|
||||||
should be sufficient to ensure that
|
journal files are deleted, it might make sense to change this
|
||||||
journal files do not grow without
|
value from the default of one month. Set to 0 to turn off this
|
||||||
bounds. However, to ensure that not
|
feature. This setting takes time values which may be suffixed
|
||||||
too much data is lost at once when old
|
with the units <literal>year</literal>,
|
||||||
journal files are deleted, it might
|
<literal>month</literal>, <literal>week</literal>,
|
||||||
make sense to change this value from
|
<literal>day</literal>, <literal>h</literal> or
|
||||||
the default of one month. Set to 0 to
|
<literal>m</literal> to override the default time unit of
|
||||||
turn off this feature. This setting
|
seconds.</para></listitem>
|
||||||
takes time values which may be
|
</varlistentry>
|
||||||
suffixed with the units
|
|
||||||
<literal>year</literal>,
|
|
||||||
<literal>month</literal>,
|
|
||||||
<literal>week</literal>, <literal>day</literal>,
|
|
||||||
<literal>h</literal> or <literal>m</literal>
|
|
||||||
to override the default time unit of
|
|
||||||
seconds.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>MaxRetentionSec=</varname></term>
|
<term><varname>MaxRetentionSec=</varname></term>
|
||||||
|
|
||||||
<listitem><para>The maximum time to
|
<listitem><para>The maximum time to store journal entries.
|
||||||
store journal entries. This
|
This controls whether journal files containing entries older
|
||||||
controls whether journal files
|
then the specified time span are deleted. Normally, time-based
|
||||||
containing entries older then the
|
deletion of old journal files should not be required as
|
||||||
specified time span are
|
size-based deletion with options such as
|
||||||
deleted. Normally, time-based deletion
|
<varname>SystemMaxUse=</varname> should be sufficient to
|
||||||
of old journal files should not be
|
ensure that journal files do not grow without bounds. However,
|
||||||
required as size-based deletion with
|
to enforce data retention policies, it might make sense to
|
||||||
options such as
|
change this value from the default of 0 (which turns off this
|
||||||
<varname>SystemMaxUse=</varname>
|
feature). This setting also takes time values which may be
|
||||||
should be sufficient to ensure that
|
suffixed with the units <literal>year</literal>,
|
||||||
journal files do not grow without
|
<literal>month</literal>, <literal>week</literal>,
|
||||||
bounds. However, to enforce data
|
<literal>day</literal>, <literal>h</literal> or <literal>
|
||||||
retention policies, it might make sense
|
m</literal> to override the default time unit of
|
||||||
to change this value from the
|
seconds.</para></listitem>
|
||||||
default of 0 (which turns off this
|
</varlistentry>
|
||||||
feature). This setting also takes
|
|
||||||
time values which may be suffixed with
|
|
||||||
the units <literal>year</literal>,
|
|
||||||
<literal>month</literal>,
|
|
||||||
<literal>week</literal>, <literal>day</literal>,
|
|
||||||
<literal>h</literal> or <literal> m</literal>
|
|
||||||
to override the default time unit of
|
|
||||||
seconds.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SyncIntervalSec=</varname></term>
|
<term><varname>SyncIntervalSec=</varname></term>
|
||||||
|
|
||||||
<listitem><para>The timeout before
|
<listitem><para>The timeout before synchronizing journal files
|
||||||
synchronizing journal files to
|
to disk. After syncing, journal files are placed in the
|
||||||
disk. After syncing, journal files are
|
OFFLINE state. Note that syncing is unconditionally done
|
||||||
placed in the OFFLINE state. Note that
|
immediately after a log message of priority CRIT, ALERT or
|
||||||
syncing is unconditionally done
|
EMERG has been logged. This setting hence applies only to
|
||||||
immediately after a log message of
|
messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The
|
||||||
priority CRIT, ALERT or EMERG has been
|
default timeout is 5 minutes. </para></listitem>
|
||||||
logged. This setting hence applies
|
</varlistentry>
|
||||||
only to messages of the levels ERR,
|
|
||||||
WARNING, NOTICE, INFO, DEBUG. The
|
|
||||||
default timeout is 5 minutes.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ForwardToSyslog=</varname></term>
|
<term><varname>ForwardToSyslog=</varname></term>
|
||||||
<term><varname>ForwardToKMsg=</varname></term>
|
<term><varname>ForwardToKMsg=</varname></term>
|
||||||
<term><varname>ForwardToConsole=</varname></term>
|
<term><varname>ForwardToConsole=</varname></term>
|
||||||
<term><varname>ForwardToWall=</varname></term>
|
<term><varname>ForwardToWall=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Control whether log
|
<listitem><para>Control whether log messages received by the
|
||||||
messages received by the journal
|
journal daemon shall be forwarded to a traditional syslog
|
||||||
daemon shall be forwarded to a
|
daemon, to the kernel log buffer (kmsg), to the system
|
||||||
traditional syslog daemon, to the
|
console, or sent as wall messages to all logged-in users.
|
||||||
kernel log buffer (kmsg), to the
|
These options take boolean arguments. If forwarding to syslog
|
||||||
system console, or sent as wall
|
is enabled but no syslog daemon is running, the respective
|
||||||
messages to all logged-in users. These
|
option has no effect. By default, only forwarding wall is
|
||||||
options take boolean arguments. If
|
enabled. These settings may be overridden at boot time with
|
||||||
forwarding to syslog is enabled but no
|
the kernel command line options
|
||||||
syslog daemon is running, the
|
<literal>systemd.journald.forward_to_syslog=</literal>,
|
||||||
respective option has no effect. By
|
<literal>systemd.journald.forward_to_kmsg=</literal>,
|
||||||
default, only forwarding wall is
|
<literal>systemd.journald.forward_to_console=</literal> and
|
||||||
enabled. These settings may be
|
<literal>systemd.journald.forward_to_wall=</literal>. When
|
||||||
overridden at boot time with the
|
forwarding to the console, the TTY to log to can be changed
|
||||||
kernel command line options
|
with <varname>TTYPath=</varname>, described
|
||||||
<literal>systemd.journald.forward_to_syslog=</literal>,
|
below.</para></listitem>
|
||||||
<literal>systemd.journald.forward_to_kmsg=</literal>,
|
</varlistentry>
|
||||||
<literal>systemd.journald.forward_to_console=</literal>
|
|
||||||
and
|
|
||||||
<literal>systemd.journald.forward_to_wall=</literal>.
|
|
||||||
When forwarding to the console, the
|
|
||||||
TTY to log to can be changed with
|
|
||||||
<varname>TTYPath=</varname>, described
|
|
||||||
below.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>MaxLevelStore=</varname></term>
|
<term><varname>MaxLevelStore=</varname></term>
|
||||||
<term><varname>MaxLevelSyslog=</varname></term>
|
<term><varname>MaxLevelSyslog=</varname></term>
|
||||||
<term><varname>MaxLevelKMsg=</varname></term>
|
<term><varname>MaxLevelKMsg=</varname></term>
|
||||||
<term><varname>MaxLevelConsole=</varname></term>
|
<term><varname>MaxLevelConsole=</varname></term>
|
||||||
<term><varname>MaxLevelWall=</varname></term>
|
<term><varname>MaxLevelWall=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls the maximum
|
<listitem><para>Controls the maximum log level of messages
|
||||||
log level of messages that are stored
|
that are stored on disk, forwarded to syslog, kmsg, the
|
||||||
on disk, forwarded to syslog, kmsg,
|
console or wall (if that is enabled, see above). As argument,
|
||||||
the console or wall (if that is
|
takes one of
|
||||||
enabled, see above). As argument,
|
<literal>emerg</literal>,
|
||||||
takes one of
|
<literal>alert</literal>,
|
||||||
<literal>emerg</literal>,
|
<literal>crit</literal>,
|
||||||
<literal>alert</literal>,
|
<literal>err</literal>,
|
||||||
<literal>crit</literal>,
|
<literal>warning</literal>,
|
||||||
<literal>err</literal>,
|
<literal>notice</literal>,
|
||||||
<literal>warning</literal>,
|
<literal>info</literal>,
|
||||||
<literal>notice</literal>,
|
<literal>debug</literal>,
|
||||||
<literal>info</literal>,
|
or integer values in the range of 0..7 (corresponding to the
|
||||||
<literal>debug</literal> or integer
|
same levels). Messages equal or below the log level specified
|
||||||
values in the range of 0..7 (corresponding
|
are stored/forwarded, messages above are dropped. Defaults to
|
||||||
to the same levels). Messages equal or below
|
<literal>debug</literal> for <varname>MaxLevelStore=</varname>
|
||||||
the log level specified are
|
and <varname>MaxLevelSyslog=</varname>, to ensure that the all
|
||||||
stored/forwarded, messages above are
|
messages are written to disk and forwarded to syslog. Defaults
|
||||||
dropped. Defaults to
|
to
|
||||||
<literal>debug</literal> for
|
<literal>notice</literal> for <varname>MaxLevelKMsg=</varname>,
|
||||||
<varname>MaxLevelStore=</varname> and
|
<literal>info</literal> for <varname>MaxLevelConsole=</varname>,
|
||||||
<varname>MaxLevelSyslog=</varname>, to
|
and <literal>emerg</literal> for
|
||||||
ensure that the all messages are
|
<varname>MaxLevelWall=</varname>.</para></listitem>
|
||||||
written to disk and forwarded to
|
</varlistentry>
|
||||||
syslog. Defaults to
|
|
||||||
<literal>notice</literal> for
|
|
||||||
<varname>MaxLevelKMsg=</varname>,
|
|
||||||
<literal>info</literal> for
|
|
||||||
<varname>MaxLevelConsole=</varname> and
|
|
||||||
<literal>emerg</literal> for
|
|
||||||
<varname>MaxLevelWall=</varname>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>TTYPath=</varname></term>
|
<term><varname>TTYPath=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Change the console TTY
|
<listitem><para>Change the console TTY to use if
|
||||||
to use if
|
<varname>ForwardToConsole=yes</varname> is used. Defaults to
|
||||||
<varname>ForwardToConsole=yes</varname>
|
<filename>/dev/console</filename>.</para></listitem>
|
||||||
is used. Defaults to
|
</varlistentry>
|
||||||
<filename>/dev/console</filename>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+303
-329
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,375 +23,349 @@
|
|||||||
|
|
||||||
<refentry id="kernel-command-line">
|
<refentry id="kernel-command-line">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>kernel-command-line</title>
|
<title>kernel-command-line</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>kernel-command-line</refentrytitle>
|
<refentrytitle>kernel-command-line</refentrytitle>
|
||||||
<manvolnum>7</manvolnum>
|
<manvolnum>7</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>kernel-command-line</refname>
|
<refname>kernel-command-line</refname>
|
||||||
<refpurpose>Kernel command line parameters</refpurpose>
|
<refpurpose>Kernel command line parameters</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/proc/cmdline</filename></para>
|
<para><filename>/proc/cmdline</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The kernel, the initial RAM disk (initrd) and
|
<para>The kernel, the initial RAM disk (initrd) and
|
||||||
basic userspace functionality may be configured at boot via
|
basic userspace functionality may be configured at boot via
|
||||||
kernel command line arguments.</para>
|
kernel command line arguments.</para>
|
||||||
|
|
||||||
<para>For command line parameters understood by the
|
<para>For command line parameters understood by the kernel, please
|
||||||
kernel, please see <ulink
|
see <ulink
|
||||||
url="https://www.kernel.org/doc/Documentation/kernel-parameters.txt"><filename>kernel-parameters.txt</filename></ulink>
|
url="https://www.kernel.org/doc/Documentation/kernel-parameters.txt"><filename>kernel-parameters.txt</filename></ulink>
|
||||||
and
|
and
|
||||||
<citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
<citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para>For command line parameters understood by the
|
<para>For command line parameters understood by the initial RAM
|
||||||
initial RAM disk, please see
|
disk, please see
|
||||||
<citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
or the documentation of the specific initrd
|
or the documentation of the specific initrd implementation of your
|
||||||
implementation of your installation.</para>
|
installation.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Core OS Command Line Arguments</title>
|
<title>Core OS Command Line Arguments</title>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.unit=</varname></term>
|
<term><varname>systemd.unit=</varname></term>
|
||||||
<term><varname>rd.systemd.unit=</varname></term>
|
<term><varname>rd.systemd.unit=</varname></term>
|
||||||
<term><varname>systemd.dump_core=</varname></term>
|
<term><varname>systemd.dump_core=</varname></term>
|
||||||
<term><varname>systemd.crash_shell=</varname></term>
|
<term><varname>systemd.crash_shell=</varname></term>
|
||||||
<term><varname>systemd.crash_chvt=</varname></term>
|
<term><varname>systemd.crash_chvt=</varname></term>
|
||||||
<term><varname>systemd.confirm_spawn=</varname></term>
|
<term><varname>systemd.confirm_spawn=</varname></term>
|
||||||
<term><varname>systemd.show_status=</varname></term>
|
<term><varname>systemd.show_status=</varname></term>
|
||||||
<term><varname>systemd.log_target=</varname></term>
|
<term><varname>systemd.log_target=</varname></term>
|
||||||
<term><varname>systemd.log_level=</varname></term>
|
<term><varname>systemd.log_level=</varname></term>
|
||||||
<term><varname>systemd.log_color=</varname></term>
|
<term><varname>systemd.log_color=</varname></term>
|
||||||
<term><varname>systemd.log_location=</varname></term>
|
<term><varname>systemd.log_location=</varname></term>
|
||||||
<term><varname>systemd.default_standard_output=</varname></term>
|
<term><varname>systemd.default_standard_output=</varname></term>
|
||||||
<term><varname>systemd.default_standard_error=</varname></term>
|
<term><varname>systemd.default_standard_error=</varname></term>
|
||||||
<term><varname>systemd.setenv=</varname></term>
|
<term><varname>systemd.setenv=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the system and service
|
||||||
the system and service manager
|
manager to control system behavior. For details, see
|
||||||
to control system behavior. For details, see
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.mask=</varname></term>
|
<term><varname>systemd.mask=</varname></term>
|
||||||
<term><varname>systemd.wants=</varname></term>
|
<term><varname>systemd.wants=</varname></term>
|
||||||
<term><varname>systemd.debug-shell</varname></term>
|
<term><varname>systemd.debug-shell</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Additional parameters
|
<para>Additional parameters understood by
|
||||||
understood by
|
<citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
to mask or start specific units at boot, or invoke a debug
|
||||||
to mask or start specific
|
shell on tty9.</para>
|
||||||
units at boot, or invoke a
|
</listitem>
|
||||||
debug shell on tty9.</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.restore_state=</varname></term>
|
<term><varname>systemd.restore_state=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This parameter is understood by
|
<para>This parameter is understood by several system tools
|
||||||
several system tools to control
|
to control whether or not they should restore system state
|
||||||
whether or not they should restore
|
from the previous boot. For details, see
|
||||||
system state from the previous boot.
|
<citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
For details, see
|
and
|
||||||
<citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
and
|
</para>
|
||||||
<citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
</listitem>
|
||||||
</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>quiet</varname></term>
|
<term><varname>quiet</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameter understood by
|
<para>Parameter understood by both the kernel and the system
|
||||||
both the kernel and the system
|
and service manager to control console log verbosity. For
|
||||||
and service manager to control
|
details, see
|
||||||
console log verbosity. For
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
details, see
|
</listitem>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>debug</varname></term>
|
<term><varname>debug</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameter understood by
|
<para>Parameter understood by both the kernel and the system
|
||||||
both the kernel and the system
|
and service manager to control console log verbosity. For
|
||||||
and service manager to control
|
details, see
|
||||||
console log verbosity. For
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
details, see
|
</listitem>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>-b</varname></term>
|
<term><varname>-b</varname></term>
|
||||||
<term><varname>emergency</varname></term>
|
<term><varname>emergency</varname></term>
|
||||||
<term><varname>rescue</varname></term>
|
<term><varname>rescue</varname></term>
|
||||||
<term><varname>single</varname></term>
|
<term><varname>single</varname></term>
|
||||||
<term><varname>s</varname></term>
|
<term><varname>s</varname></term>
|
||||||
<term><varname>S</varname></term>
|
<term><varname>S</varname></term>
|
||||||
<term><varname>1</varname></term>
|
<term><varname>1</varname></term>
|
||||||
<term><varname>2</varname></term>
|
<term><varname>2</varname></term>
|
||||||
<term><varname>3</varname></term>
|
<term><varname>3</varname></term>
|
||||||
<term><varname>4</varname></term>
|
<term><varname>4</varname></term>
|
||||||
<term><varname>5</varname></term>
|
<term><varname>5</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the system and service
|
||||||
the system and service
|
manager, as compatibility options. For details, see
|
||||||
manager, as compatibility
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
options. For details, see
|
</listitem>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>locale.LANG=</varname></term>
|
<term><varname>locale.LANG=</varname></term>
|
||||||
<term><varname>locale.LANGUAGE=</varname></term>
|
<term><varname>locale.LANGUAGE=</varname></term>
|
||||||
<term><varname>locale.LC_CTYPE=</varname></term>
|
<term><varname>locale.LC_CTYPE=</varname></term>
|
||||||
<term><varname>locale.LC_NUMERIC=</varname></term>
|
<term><varname>locale.LC_NUMERIC=</varname></term>
|
||||||
<term><varname>locale.LC_TIME=</varname></term>
|
<term><varname>locale.LC_TIME=</varname></term>
|
||||||
<term><varname>locale.LC_COLLATE=</varname></term>
|
<term><varname>locale.LC_COLLATE=</varname></term>
|
||||||
<term><varname>locale.LC_MONETARY=</varname></term>
|
<term><varname>locale.LC_MONETARY=</varname></term>
|
||||||
<term><varname>locale.LC_MESSAGES=</varname></term>
|
<term><varname>locale.LC_MESSAGES=</varname></term>
|
||||||
<term><varname>locale.LC_PAPER=</varname></term>
|
<term><varname>locale.LC_PAPER=</varname></term>
|
||||||
<term><varname>locale.LC_NAME=</varname></term>
|
<term><varname>locale.LC_NAME=</varname></term>
|
||||||
<term><varname>locale.LC_ADDRESS=</varname></term>
|
<term><varname>locale.LC_ADDRESS=</varname></term>
|
||||||
<term><varname>locale.LC_TELEPHONE=</varname></term>
|
<term><varname>locale.LC_TELEPHONE=</varname></term>
|
||||||
<term><varname>locale.LC_MEASUREMENT=</varname></term>
|
<term><varname>locale.LC_MEASUREMENT=</varname></term>
|
||||||
<term><varname>locale.LC_IDENTIFICATION=</varname></term>
|
<term><varname>locale.LC_IDENTIFICATION=</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the system and service
|
||||||
the system and service manager
|
manager to control locale and language settings. For
|
||||||
to control locale and language
|
details, see
|
||||||
settings. For details, see
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>fsck.mode=</varname></term>
|
<term><varname>fsck.mode=</varname></term>
|
||||||
<term><varname>fsck.repair=</varname></term>
|
<term><varname>fsck.repair=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the file system checker
|
||||||
the file system checker
|
services. For details, see
|
||||||
services. For details, see
|
<citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>quotacheck.mode=</varname></term>
|
<term><varname>quotacheck.mode=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameter understood by
|
<para>Parameter understood by the file quota checker
|
||||||
the file quota checker
|
service. For details, see
|
||||||
service. For details, see
|
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.journald.forward_to_syslog=</varname></term>
|
<term><varname>systemd.journald.forward_to_syslog=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_kmsg=</varname></term>
|
<term><varname>systemd.journald.forward_to_kmsg=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_console=</varname></term>
|
<term><varname>systemd.journald.forward_to_console=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_wall=</varname></term>
|
<term><varname>systemd.journald.forward_to_wall=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the journal service. For
|
||||||
the journal service. For
|
details, see
|
||||||
details, see
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>vconsole.keymap=</varname></term>
|
<term><varname>vconsole.keymap=</varname></term>
|
||||||
<term><varname>vconsole.keymap.toggle=</varname></term>
|
<term><varname>vconsole.keymap.toggle=</varname></term>
|
||||||
<term><varname>vconsole.font=</varname></term>
|
<term><varname>vconsole.font=</varname></term>
|
||||||
<term><varname>vconsole.font.map=</varname></term>
|
<term><varname>vconsole.font.map=</varname></term>
|
||||||
<term><varname>vconsole.font.unimap=</varname></term>
|
<term><varname>vconsole.font.unimap=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the virtual console setup
|
||||||
the virtual console setup logic. For
|
logic. For details, see
|
||||||
details, see
|
<citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>udev.log-priority=</varname></term>
|
<term><varname>udev.log-priority=</varname></term>
|
||||||
<term><varname>rd.udev.log-priority=</varname></term>
|
<term><varname>rd.udev.log-priority=</varname></term>
|
||||||
<term><varname>udev.children-max=</varname></term>
|
<term><varname>udev.children-max=</varname></term>
|
||||||
<term><varname>rd.udev.children-max=</varname></term>
|
<term><varname>rd.udev.children-max=</varname></term>
|
||||||
<term><varname>udev.exec-delay=</varname></term>
|
<term><varname>udev.exec-delay=</varname></term>
|
||||||
<term><varname>rd.udev.exec-delay=</varname></term>
|
<term><varname>rd.udev.exec-delay=</varname></term>
|
||||||
<term><varname>udev.event-timeout=</varname></term>
|
<term><varname>udev.event-timeout=</varname></term>
|
||||||
<term><varname>rd.udev.event-timeout=</varname></term>
|
<term><varname>rd.udev.event-timeout=</varname></term>
|
||||||
<term><varname>net.ifnames=</varname></term>
|
<term><varname>net.ifnames=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Parameters understood by
|
<para>Parameters understood by the device event managing
|
||||||
the device event managing daemon. For
|
daemon. For details, see
|
||||||
details, see
|
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>plymouth.enable=</varname></term>
|
<term><varname>plymouth.enable=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>May be used to disable
|
<para>May be used to disable the Plymouth boot splash. For
|
||||||
the Plymouth boot splash. For
|
details, see
|
||||||
details, see
|
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks=</varname></term>
|
<term><varname>luks=</varname></term>
|
||||||
<term><varname>rd.luks=</varname></term>
|
<term><varname>rd.luks=</varname></term>
|
||||||
<term><varname>luks.crypttab=</varname></term>
|
<term><varname>luks.crypttab=</varname></term>
|
||||||
<term><varname>rd.luks.crypttab=</varname></term>
|
<term><varname>rd.luks.crypttab=</varname></term>
|
||||||
<term><varname>luks.name=</varname></term>
|
<term><varname>luks.name=</varname></term>
|
||||||
<term><varname>rd.luks.name=</varname></term>
|
<term><varname>rd.luks.name=</varname></term>
|
||||||
<term><varname>luks.uuid=</varname></term>
|
<term><varname>luks.uuid=</varname></term>
|
||||||
<term><varname>rd.luks.uuid=</varname></term>
|
<term><varname>rd.luks.uuid=</varname></term>
|
||||||
<term><varname>luks.options=</varname></term>
|
<term><varname>luks.options=</varname></term>
|
||||||
<term><varname>rd.luks.options=</varname></term>
|
<term><varname>rd.luks.options=</varname></term>
|
||||||
<term><varname>luks.key=</varname></term>
|
<term><varname>luks.key=</varname></term>
|
||||||
<term><varname>rd.luks.key=</varname></term>
|
<term><varname>rd.luks.key=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Configures the LUKS
|
<para>Configures the LUKS full-disk encryption logic at
|
||||||
full-disk encryption logic at
|
boot. For details, see
|
||||||
boot. For details, see
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>fstab=</varname></term>
|
<term><varname>fstab=</varname></term>
|
||||||
<term><varname>rd.fstab=</varname></term>
|
<term><varname>rd.fstab=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Configures the
|
<para>Configures the <filename>/etc/fstab</filename> logic
|
||||||
<filename>/etc/fstab</filename>
|
at boot. For details, see
|
||||||
logic at boot. For details, see
|
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>root=</varname></term>
|
<term><varname>root=</varname></term>
|
||||||
<term><varname>rootfstype=</varname></term>
|
<term><varname>rootfstype=</varname></term>
|
||||||
<term><varname>rootfsflags=</varname></term>
|
<term><varname>rootfsflags=</varname></term>
|
||||||
<term><varname>ro</varname></term>
|
<term><varname>ro</varname></term>
|
||||||
<term><varname>rw</varname></term>
|
<term><varname>rw</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Configures the root file
|
<para>Configures the root file system and its file system
|
||||||
system and its file system
|
type and mount options, as well as whether it shall be
|
||||||
type and mount options, as
|
mounted read-only or read-writable initially. For details,
|
||||||
well as whether it shall be
|
see
|
||||||
mounted read-only or
|
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
read-writable initially. For
|
</listitem>
|
||||||
details, see
|
</varlistentry>
|
||||||
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.gpt_auto=</varname></term>
|
<term><varname>systemd.gpt_auto=</varname></term>
|
||||||
<term><varname>rd.systemd.gpt_auto=</varname></term>
|
<term><varname>rd.systemd.gpt_auto=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Configures whether GPT
|
<para>Configures whether GPT based partition auto-discovery
|
||||||
based partition auto-discovery
|
shall be attempted. For details, see
|
||||||
shall be attempted. For
|
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
details, see
|
</listitem>
|
||||||
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</varlistentry>
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>modules-load=</varname></term>
|
<term><varname>modules-load=</varname></term>
|
||||||
<term><varname>rd.modules-load=</varname></term>
|
<term><varname>rd.modules-load=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Load a specific kernel
|
<para>Load a specific kernel module early at boot. For
|
||||||
module early at boot. For
|
details, see
|
||||||
details, see
|
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>resume=</varname></term>
|
<term><varname>resume=</varname></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Enables resume from hibernation
|
<para>Enables resume from hibernation using the specified
|
||||||
using the specified device.
|
device. All
|
||||||
All <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-like
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-like
|
||||||
paths are supported. For details, see
|
paths are supported. For details, see
|
||||||
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>bootparam</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry project='die-net'><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-debug-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-fsck@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-vconsole-setup.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-udevd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-backlight@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-rfkill@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+107
-112
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,136 +23,131 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="locale.conf">
|
<refentry id="locale.conf">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>locale.conf</title>
|
<title>locale.conf</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>locale.conf</refentrytitle>
|
<refentrytitle>locale.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>locale.conf</refname>
|
<refname>locale.conf</refname>
|
||||||
<refpurpose>Configuration file for locale settings</refpurpose>
|
<refpurpose>Configuration file for locale settings</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/locale.conf</filename></para>
|
<para><filename>/etc/locale.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/locale.conf</filename> file
|
<para>The <filename>/etc/locale.conf</filename> file configures
|
||||||
configures system-wide locale settings. It is read at
|
system-wide locale settings. It is read at early-boot by
|
||||||
early-boot by
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>The basic file format of
|
<para>The basic file format of <filename>locale.conf</filename> is
|
||||||
<filename>locale.conf</filename> is a
|
a newline-separated list of environment-like shell-compatible
|
||||||
newline-separated list of environment-like
|
variable assignments. It is possible to source the configuration
|
||||||
shell-compatible variable assignments. It is possible
|
from shell scripts, however, beyond mere variable assignments, no
|
||||||
to source the configuration from shell scripts,
|
shell features are supported, allowing applications to read the
|
||||||
however, beyond mere variable assignments, no shell
|
file without implementing a shell compatible execution
|
||||||
features are supported, allowing applications to read
|
engine.</para>
|
||||||
the file without implementing a shell compatible
|
|
||||||
execution engine.</para>
|
|
||||||
|
|
||||||
<para>Note that the kernel command line options
|
<para>Note that the kernel command line options
|
||||||
<varname>locale.LANG=</varname>,
|
<varname>locale.LANG=</varname>,
|
||||||
<varname>locale.LANGUAGE=</varname>,
|
<varname>locale.LANGUAGE=</varname>,
|
||||||
<varname>locale.LC_CTYPE=</varname>,
|
<varname>locale.LC_CTYPE=</varname>,
|
||||||
<varname>locale.LC_NUMERIC=</varname>,
|
<varname>locale.LC_NUMERIC=</varname>,
|
||||||
<varname>locale.LC_TIME=</varname>,
|
<varname>locale.LC_TIME=</varname>,
|
||||||
<varname>locale.LC_COLLATE=</varname>,
|
<varname>locale.LC_COLLATE=</varname>,
|
||||||
<varname>locale.LC_MONETARY=</varname>,
|
<varname>locale.LC_MONETARY=</varname>,
|
||||||
<varname>locale.LC_MESSAGES=</varname>,
|
<varname>locale.LC_MESSAGES=</varname>,
|
||||||
<varname>locale.LC_PAPER=</varname>,
|
<varname>locale.LC_PAPER=</varname>,
|
||||||
<varname>locale.LC_NAME=</varname>,
|
<varname>locale.LC_NAME=</varname>,
|
||||||
<varname>locale.LC_ADDRESS=</varname>,
|
<varname>locale.LC_ADDRESS=</varname>,
|
||||||
<varname>locale.LC_TELEPHONE=</varname>,
|
<varname>locale.LC_TELEPHONE=</varname>,
|
||||||
<varname>locale.LC_MEASUREMENT=</varname>,
|
<varname>locale.LC_MEASUREMENT=</varname>,
|
||||||
<varname>locale.LC_IDENTIFICATION=</varname> may be
|
<varname>locale.LC_IDENTIFICATION=</varname> may be
|
||||||
used to override the locale settings at boot.</para>
|
used to override the locale settings at boot.</para>
|
||||||
|
|
||||||
<para>The locale settings configured in
|
<para>The locale settings configured in
|
||||||
<filename>/etc/locale.conf</filename> are system-wide
|
<filename>/etc/locale.conf</filename> are system-wide and are
|
||||||
and are inherited by every service or user, unless
|
inherited by every service or user, unless overridden or unset by
|
||||||
overridden or unset by individual programs or
|
individual programs or individual users.</para>
|
||||||
individual users.</para>
|
|
||||||
|
|
||||||
<para>Depending on the operating system, other
|
<para>Depending on the operating system, other configuration files
|
||||||
configuration files might be checked for locale
|
might be checked for locale configuration as well, however only as
|
||||||
configuration as well, however only as
|
fallback.</para>
|
||||||
fallback.</para>
|
|
||||||
|
|
||||||
<para><citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<para><citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
may be used to alter the settings in this file during
|
may be used to alter the settings in this file during runtime from
|
||||||
runtime from the command line. Use
|
the command line. Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize them on mounted (but not booted) system
|
to initialize them on mounted (but not booted) system
|
||||||
images.</para>
|
images.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following locale settings may be set using
|
<para>The following locale settings may be set using
|
||||||
<filename>/etc/locale.conf</filename>:
|
<filename>/etc/locale.conf</filename>:
|
||||||
<varname>LANG=</varname>,
|
<varname>LANG=</varname>,
|
||||||
<varname>LANGUAGE=</varname>,
|
<varname>LANGUAGE=</varname>,
|
||||||
<varname>LC_CTYPE=</varname>,
|
<varname>LC_CTYPE=</varname>,
|
||||||
<varname>LC_NUMERIC=</varname>,
|
<varname>LC_NUMERIC=</varname>,
|
||||||
<varname>LC_TIME=</varname>,
|
<varname>LC_TIME=</varname>,
|
||||||
<varname>LC_COLLATE=</varname>,
|
<varname>LC_COLLATE=</varname>,
|
||||||
<varname>LC_MONETARY=</varname>,
|
<varname>LC_MONETARY=</varname>,
|
||||||
<varname>LC_MESSAGES=</varname>,
|
<varname>LC_MESSAGES=</varname>,
|
||||||
<varname>LC_PAPER=</varname>,
|
<varname>LC_PAPER=</varname>,
|
||||||
<varname>LC_NAME=</varname>,
|
<varname>LC_NAME=</varname>,
|
||||||
<varname>LC_ADDRESS=</varname>,
|
<varname>LC_ADDRESS=</varname>,
|
||||||
<varname>LC_TELEPHONE=</varname>,
|
<varname>LC_TELEPHONE=</varname>,
|
||||||
<varname>LC_MEASUREMENT=</varname>,
|
<varname>LC_MEASUREMENT=</varname>,
|
||||||
<varname>LC_IDENTIFICATION=</varname>. Note that
|
<varname>LC_IDENTIFICATION=</varname>.
|
||||||
<varname>LC_ALL</varname> may not be configured in
|
Note that <varname>LC_ALL</varname> may not be configured in this
|
||||||
this file. For details about the meaning and semantics
|
file. For details about the meaning and semantics of these
|
||||||
of these settings, refer to
|
settings, refer to
|
||||||
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>German locale with English messages</title>
|
<title>German locale with English messages</title>
|
||||||
|
|
||||||
<para><filename>/etc/locale.conf</filename>:</para>
|
<para><filename>/etc/locale.conf</filename>:</para>
|
||||||
|
|
||||||
<programlisting>LANG=de_DE.UTF-8
|
<programlisting>LANG=de_DE.UTF-8
|
||||||
LC_MESSAGES=en_US.UTF-8</programlisting>
|
LC_MESSAGES=en_US.UTF-8</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+158
-185
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,227 +22,200 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="localectl" conditional='ENABLE_LOCALED'
|
<refentry id="localectl" conditional='ENABLE_LOCALED'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>localectl</title>
|
<title>localectl</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>localectl</refentrytitle>
|
<refentrytitle>localectl</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>localectl</refname>
|
<refname>localectl</refname>
|
||||||
<refpurpose>Control the system locale and keyboard layout settings</refpurpose>
|
<refpurpose>Control the system locale and keyboard layout settings</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>localectl</command>
|
<command>localectl</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="req">COMMAND</arg>
|
<arg choice="req">COMMAND</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>localectl</command> may be used to
|
<para><command>localectl</command> may be used to query and change
|
||||||
query and change the system locale and keyboard layout
|
the system locale and keyboard layout settings.</para>
|
||||||
settings.</para>
|
|
||||||
|
|
||||||
<para>The system locale controls the language settings
|
<para>The system locale controls the language settings of system
|
||||||
of system services and of the UI before the user logs
|
services and of the UI before the user logs in, such as the
|
||||||
in, such as the display manager, as well as the
|
display manager, as well as the default for users after
|
||||||
default for users after login.</para>
|
login.</para>
|
||||||
|
|
||||||
<para>The keyboard settings control the keyboard
|
<para>The keyboard settings control the keyboard layout used on
|
||||||
layout used on the text console and of the graphical
|
the text console and of the graphical UI before the user logs in,
|
||||||
UI before the user logs in, such as the display
|
such as the display manager, as well as the default for users
|
||||||
manager, as well as the default for users after
|
after login.</para>
|
||||||
login.</para>
|
|
||||||
|
|
||||||
<para>Use
|
<para>Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the system locale for mounted (but not
|
to initialize the system locale for mounted (but not booted)
|
||||||
booted) system images.</para>
|
system images.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-ask-password</option></term>
|
<term><option>--no-ask-password</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not query the user
|
<listitem><para>Do not query the user for authentication for
|
||||||
for authentication for privileged
|
privileged operations.</para></listitem>
|
||||||
operations.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-convert</option></term>
|
<term><option>--no-convert</option></term>
|
||||||
|
|
||||||
<listitem><para>If
|
<listitem><para>If <command>set-keymap</command> or
|
||||||
<command>set-keymap</command> or
|
<command>set-x11-keymap</command> is invoked and this option
|
||||||
<command>set-x11-keymap</command> is
|
is passed, then the keymap will not be converted from the
|
||||||
invoked and this option is passed, then
|
console to X11, or X11 to console,
|
||||||
the keymap will not be converted from
|
respectively.</para></listitem>
|
||||||
the console to X11, or X11 to console,
|
</varlistentry>
|
||||||
respectively.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="host" />
|
<xi:include href="user-system-options.xml" xpointer="host" />
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The following commands are understood:</para>
|
<para>The following commands are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>status</command></term>
|
<term><command>status</command></term>
|
||||||
|
|
||||||
<listitem><para>Show current settings
|
<listitem><para>Show current settings of the system locale and
|
||||||
of the system locale and keyboard
|
keyboard mapping.</para></listitem>
|
||||||
mapping.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-locale LOCALE...</command></term>
|
<term><command>set-locale LOCALE...</command></term>
|
||||||
|
|
||||||
<listitem><para>Set the system
|
<listitem><para>Set the system locale. This takes one or more
|
||||||
locale. This takes one or more
|
assignments such as "LANG=de_DE.utf8",
|
||||||
assignments such as "LANG=de_DE.utf8",
|
"LC_MESSAGES=en_GB.utf8", and so on. See
|
||||||
"LC_MESSAGES=en_GB.utf8", and so
|
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
on. See
|
for details on the available settings and their meanings. Use
|
||||||
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<command>list-locales</command> for a list of available
|
||||||
for details on the available settings
|
locales (see below). </para></listitem>
|
||||||
and their meanings. Use
|
</varlistentry>
|
||||||
<command>list-locales</command> for a
|
|
||||||
list of available locales (see below).
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>list-locales</command></term>
|
<term><command>list-locales</command></term>
|
||||||
|
|
||||||
<listitem><para>List available locales
|
<listitem><para>List available locales useful for
|
||||||
useful for configuration with
|
configuration with
|
||||||
<command>set-locale</command>.</para></listitem>
|
<command>set-locale</command>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-keymap MAP [TOGGLEMAP]</command></term>
|
<term><command>set-keymap MAP [TOGGLEMAP]</command></term>
|
||||||
|
|
||||||
<listitem><para>Set the system
|
<listitem><para>Set the system keyboard mapping for the
|
||||||
keyboard mapping for the console and
|
console and X11. This takes a mapping name (such as "de" or
|
||||||
X11. This takes a mapping name (such
|
"us"), and possibly a second one to define a toggle keyboard
|
||||||
as "de" or "us"), and possibly a
|
mapping. Unless <option>--no-convert</option> is passed, the
|
||||||
second one to define a toggle keyboard
|
selected setting is also applied as the default system
|
||||||
mapping. Unless
|
keyboard mapping of X11, after converting it to the closest
|
||||||
<option>--no-convert</option> is
|
matching X11 keyboard mapping. Use
|
||||||
passed, the selected setting is also
|
<command>list-keymaps</command> for a list of available
|
||||||
applied as the default system keyboard
|
keyboard mappings (see below).</para></listitem>
|
||||||
mapping of X11, after converting it to
|
</varlistentry>
|
||||||
the closest matching X11 keyboard
|
|
||||||
mapping. Use
|
|
||||||
<command>list-keymaps</command> for a
|
|
||||||
list of available keyboard mappings
|
|
||||||
(see below).</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>list-keymaps</command></term>
|
<term><command>list-keymaps</command></term>
|
||||||
|
|
||||||
<listitem><para>List available
|
<listitem><para>List available keyboard mappings for the
|
||||||
keyboard mappings for the console,
|
console, useful for configuration with
|
||||||
useful for configuration with
|
<command>set-keymap</command>.</para></listitem>
|
||||||
<command>set-keymap</command>.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
|
<term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
|
||||||
|
|
||||||
<listitem><para>Set the system default
|
<listitem><para>Set the system default keyboard mapping for
|
||||||
keyboard mapping for X11 and the
|
X11 and the virtual console. This takes a keyboard mapping
|
||||||
virtual console. This takes a keyboard
|
name (such as <literal>de</literal> or <literal>us</literal>),
|
||||||
mapping name (such as
|
and possibly a model, variant, and options, see
|
||||||
<literal>de</literal> or
|
<citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
||||||
<literal>us</literal>), and possibly a
|
for details. Unless <option>--no-convert</option> is passed,
|
||||||
model, variant, and options, see
|
the selected setting is also applied as the system console
|
||||||
<citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
keyboard mapping, after converting it to the closest matching
|
||||||
for details. Unless
|
console keyboard mapping.</para></listitem>
|
||||||
<option>--no-convert</option> is
|
</varlistentry>
|
||||||
passed, the selected setting is also
|
|
||||||
applied as the system console keyboard
|
|
||||||
mapping, after converting it to the
|
|
||||||
closest matching console keyboard
|
|
||||||
mapping.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>list-x11-keymap-models</command></term>
|
<term><command>list-x11-keymap-models</command></term>
|
||||||
<term><command>list-x11-keymap-layouts</command></term>
|
<term><command>list-x11-keymap-layouts</command></term>
|
||||||
<term><command>list-x11-keymap-variants [LAYOUT]</command></term>
|
<term><command>list-x11-keymap-variants [LAYOUT]</command></term>
|
||||||
<term><command>list-x11-keymap-options</command></term>
|
<term><command>list-x11-keymap-options</command></term>
|
||||||
|
|
||||||
<listitem><para>List available X11
|
<listitem><para>List available X11 keymap models, layouts,
|
||||||
keymap models, layouts, variants and
|
variants and options, useful for configuration with
|
||||||
options, useful for configuration with
|
<command>set-keymap</command>. The command
|
||||||
<command>set-keymap</command>. The
|
<command>list-x11-keymap-variants</command> optionally takes a
|
||||||
command
|
layout parameter to limit the output to the variants suitable
|
||||||
<command>list-x11-keymap-variants</command>
|
for the specific layout.</para></listitem>
|
||||||
optionally takes a layout parameter to
|
</varlistentry>
|
||||||
limit the output to the variants
|
</variablelist>
|
||||||
suitable for the specific
|
|
||||||
layout.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="less-variables.xml" />
|
<xi:include href="less-variables.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
||||||
<ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
|
<ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
|
||||||
The XKB Configuration Guide
|
The XKB Configuration Guide
|
||||||
</ulink>,
|
</ulink>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+67
-70
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -24,84 +24,81 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="localtime">
|
<refentry id="localtime">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>localtime</title>
|
<title>localtime</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Shawn</firstname>
|
<firstname>Shawn</firstname>
|
||||||
<surname>Landden</surname>
|
<surname>Landden</surname>
|
||||||
<email>shawnlandden@gmail.com</email>
|
<email>shawnlandden@gmail.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>localtime</refentrytitle>
|
<refentrytitle>localtime</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>localtime</refname>
|
<refname>localtime</refname>
|
||||||
<refpurpose>Local timezone configuration file</refpurpose>
|
<refpurpose>Local timezone configuration file</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/localtime</filename> -> <filename>../usr/share/zoneinfo/…</filename></para>
|
<para><filename>/etc/localtime</filename> -> <filename>../usr/share/zoneinfo/…</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/localtime</filename> file
|
<para>The <filename>/etc/localtime</filename> file configures the
|
||||||
configures the system-wide timezone of the local
|
system-wide timezone of the local system that is used by
|
||||||
system that is used by applications for presentation
|
applications for presentation to the user. It should be an
|
||||||
to the user. It should be an absolute or relative
|
absolute or relative symbolic link pointing to
|
||||||
symbolic link pointing to
|
<filename>/usr/share/zoneinfo/</filename>, followed by a timezone
|
||||||
<filename>/usr/share/zoneinfo/</filename>, followed by
|
identifier such as <literal>Europe/Berlin</literal> or
|
||||||
a timezone identifier such as
|
<literal>Etc/UTC</literal>. The resulting link should lead to the
|
||||||
<literal>Europe/Berlin</literal> or
|
corresponding binary
|
||||||
<literal>Etc/UTC</literal>. The resulting link should
|
<citerefentry project='man-pages'><refentrytitle>tzfile</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
lead to the corresponding binary
|
timezone data for the configured timezone.</para>
|
||||||
<citerefentry project='man-pages'><refentrytitle>tzfile</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
timezone data for the configured timezone.</para>
|
|
||||||
|
|
||||||
<para>Because the timezone identifier is extracted from
|
<para>Because the timezone identifier is extracted from the
|
||||||
the symlink target name of
|
symlink target name of <filename>/etc/localtime</filename>, this
|
||||||
<filename>/etc/localtime</filename>, this file may not
|
file may not be a normal file or hardlink.</para>
|
||||||
be a normal file or hardlink.</para>
|
|
||||||
|
|
||||||
<para>The timezone may be overridden for individual
|
<para>The timezone may be overridden for individual programs by
|
||||||
programs by using the TZ environment variable. See
|
using the <varname>$TZ</varname> environment variable. See
|
||||||
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
<citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para>You may use
|
<para>You may use
|
||||||
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to change the settings of this file from the command
|
to change the settings of this file from the command line during
|
||||||
line during runtime. Use
|
runtime. Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the time zone on mounted (but not
|
to initialize the time zone on mounted (but not booted) system
|
||||||
booted) system images.</para>
|
images.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>tzset</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>tzset</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-timedated.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+390
-481
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,485 +22,394 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="loginctl" conditional='ENABLE_LOGIND'
|
<refentry id="loginctl" conditional='ENABLE_LOGIND'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>loginctl</title>
|
<title>loginctl</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>loginctl</refentrytitle>
|
<refentrytitle>loginctl</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>loginctl</refname>
|
<refname>loginctl</refname>
|
||||||
<refpurpose>Control the systemd login manager</refpurpose>
|
<refpurpose>Control the systemd login manager</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>loginctl</command>
|
<command>loginctl</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="req">COMMAND</arg>
|
<arg choice="req">COMMAND</arg>
|
||||||
<arg choice="opt" rep="repeat">NAME</arg>
|
<arg choice="opt" rep="repeat">NAME</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>loginctl</command> may be used to
|
<para><command>loginctl</command> may be used to introspect and
|
||||||
introspect and control the state of the
|
control the state of the
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
login manager
|
||||||
</refsect1>
|
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
|
</refsect1>
|
||||||
<refsect1>
|
|
||||||
<title>Options</title>
|
<refsect1>
|
||||||
|
<title>Options</title>
|
||||||
<para>The following options are understood:</para>
|
|
||||||
|
<para>The following options are understood:</para>
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
<variablelist>
|
||||||
<term><option>--no-ask-password</option></term>
|
<varlistentry>
|
||||||
|
<term><option>--no-ask-password</option></term>
|
||||||
<listitem><para>Do not query the user
|
|
||||||
for authentication for privileged
|
<listitem><para>Do not query the user for authentication for
|
||||||
operations.</para></listitem>
|
privileged operations.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
<term><option>--property=</option></term>
|
<term><option>--property=</option></term>
|
||||||
|
|
||||||
<listitem><para>When showing
|
<listitem><para>When showing session/user/seat properties,
|
||||||
session/user/seat properties, limit
|
limit display to certain properties as specified as argument.
|
||||||
display to certain properties as
|
If not specified, all set properties are shown. The argument
|
||||||
specified as argument. If not
|
should be a property name, such as
|
||||||
specified, all set properties are
|
<literal>Sessions</literal>. If specified more than once, all
|
||||||
shown. The argument should be a
|
properties with the specified names are
|
||||||
property name, such as
|
shown.</para></listitem>
|
||||||
<literal>Sessions</literal>. If
|
</varlistentry>
|
||||||
specified more than once, all
|
|
||||||
properties with the specified names
|
<varlistentry>
|
||||||
are shown.</para></listitem>
|
<term><option>-a</option></term>
|
||||||
</varlistentry>
|
<term><option>--all</option></term>
|
||||||
|
|
||||||
<varlistentry>
|
<listitem><para>When showing session/user/seat properties,
|
||||||
<term><option>-a</option></term>
|
show all properties regardless of whether they are set or
|
||||||
<term><option>--all</option></term>
|
not.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>When showing
|
|
||||||
session/user/seat properties, show all
|
<varlistentry>
|
||||||
properties regardless of whether they are
|
<term><option>-l</option></term>
|
||||||
set or not.</para></listitem>
|
<term><option>--full</option></term>
|
||||||
</varlistentry>
|
|
||||||
|
<listitem><para>Do not ellipsize process tree entries.</para>
|
||||||
<varlistentry>
|
</listitem>
|
||||||
<term><option>-l</option></term>
|
</varlistentry>
|
||||||
<term><option>--full</option></term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>Do not ellipsize
|
<term><option>--kill-who=</option></term>
|
||||||
process tree entries.</para>
|
|
||||||
</listitem>
|
<listitem><para>When used with
|
||||||
</varlistentry>
|
<command>kill-session</command>, choose which processes to
|
||||||
|
kill. Must be one of <option>leader</option>, or
|
||||||
<varlistentry>
|
<option>all</option> to select whether to kill only the leader
|
||||||
<term><option>--kill-who=</option></term>
|
process of the session or all processes of the session. If
|
||||||
|
omitted, defaults to <option>all</option>.</para></listitem>
|
||||||
<listitem><para>When used with
|
</varlistentry>
|
||||||
<command>kill-session</command>,
|
|
||||||
choose which processes to kill. Must
|
<varlistentry>
|
||||||
be one of <option>leader</option>, or
|
<term><option>-s</option></term>
|
||||||
<option>all</option> to select whether
|
<term><option>--signal=</option></term>
|
||||||
to kill only the leader process of the
|
|
||||||
session or all processes of the
|
<listitem><para>When used with <command>kill-session</command>
|
||||||
session. If omitted, defaults to
|
or <command>kill-user</command>, choose which signal to send
|
||||||
<option>all</option>.</para></listitem>
|
to selected processes. Must be one of the well known signal
|
||||||
</varlistentry>
|
specifiers, such as <constant>SIGTERM</constant>,
|
||||||
|
<constant>SIGINT</constant> or <constant>SIGSTOP</constant>.
|
||||||
<varlistentry>
|
If omitted, defaults to
|
||||||
<term><option>-s</option></term>
|
<constant>SIGTERM</constant>.</para></listitem>
|
||||||
<term><option>--signal=</option></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>When used with
|
<varlistentry>
|
||||||
<command>kill-session</command> or
|
<term><option>-n</option></term>
|
||||||
<command>kill-user</command>, choose
|
<term><option>--lines=</option></term>
|
||||||
which signal to send to selected
|
|
||||||
processes. Must be one of the well
|
<listitem><para>When used with <command>user-status</command>
|
||||||
known signal specifiers, such as
|
and <command>session-status</command>, controls the number of
|
||||||
<constant>SIGTERM</constant>,
|
journal lines to show, counting from the most recent ones.
|
||||||
<constant>SIGINT</constant> or
|
Takes a positive integer argument. Defaults to 10.</para>
|
||||||
<constant>SIGSTOP</constant>. If
|
</listitem>
|
||||||
omitted, defaults to
|
</varlistentry>
|
||||||
<constant>SIGTERM</constant>.</para></listitem>
|
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
|
<term><option>-o</option></term>
|
||||||
<varlistentry>
|
<term><option>--output=</option></term>
|
||||||
<term><option>-n</option></term>
|
|
||||||
<term><option>--lines=</option></term>
|
<listitem><para>When used with <command>user-status</command>
|
||||||
|
and <command>session-status</command>, controls the formatting
|
||||||
<listitem><para>When used with
|
of the journal entries that are shown. For the available
|
||||||
<command>user-status</command> and
|
choices, see
|
||||||
<command>session-status</command>,
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
||||||
controls the number of journal lines
|
Defaults to <literal>short</literal>.</para></listitem>
|
||||||
to show, counting from the most recent
|
</varlistentry>
|
||||||
ones. Takes a positive integer
|
|
||||||
argument. Defaults to 10.</para>
|
<xi:include href="user-system-options.xml" xpointer="host" />
|
||||||
</listitem>
|
<xi:include href="user-system-options.xml" xpointer="machine" />
|
||||||
</varlistentry>
|
|
||||||
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
<varlistentry>
|
<xi:include href="standard-options.xml" xpointer="no-legend" />
|
||||||
<term><option>-o</option></term>
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<term><option>--output=</option></term>
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
|
</variablelist>
|
||||||
<listitem><para>When used with
|
</refsect1>
|
||||||
<command>user-status</command> and
|
|
||||||
<command>session-status</command>,
|
<refsect1>
|
||||||
controls the formatting of the journal
|
<title>Commands</title>
|
||||||
entries that are shown. For the
|
|
||||||
available choices, see
|
<para>The following commands are understood:</para>
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
|
||||||
Defaults to
|
<refsect2><title>Session Commands</title><variablelist>
|
||||||
<literal>short</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
|
<term><command>list-sessions</command></term>
|
||||||
<xi:include href="user-system-options.xml" xpointer="host" />
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="machine" />
|
<listitem><para>List current sessions.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
|
||||||
<xi:include href="standard-options.xml" xpointer="no-legend" />
|
<varlistentry>
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<term><command>session-status</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
|
||||||
</variablelist>
|
<listitem><para>Show terse runtime status information about
|
||||||
</refsect1>
|
one or more sessions, followed by the most recent log data
|
||||||
|
from the journal. Takes one or more session identifiers as
|
||||||
<refsect1>
|
parameters. If no session identifiers are passed the status of
|
||||||
<title>Commands</title>
|
the caller's session is shown. This function is intended to
|
||||||
|
generate human-readable output. If you are looking for
|
||||||
<para>The following commands are understood:</para>
|
computer-parsable output, use <command>show-session</command>
|
||||||
|
instead.</para></listitem>
|
||||||
<refsect2><title>Session Commands</title><variablelist>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><command>list-sessions</command></term>
|
<term><command>show-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
||||||
|
|
||||||
<listitem><para>List current sessions.</para></listitem>
|
<listitem><para>Show properties of one or more sessions or the
|
||||||
</varlistentry>
|
manager itself. If no argument is specified, properties of the
|
||||||
|
manager will be shown. If a session ID is specified,
|
||||||
<varlistentry>
|
properties of the session are shown. By default, empty
|
||||||
<term><command>session-status</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
properties are suppressed. Use <option>--all</option> to show
|
||||||
|
those too. To select specific properties to show, use
|
||||||
<listitem><para>Show terse runtime
|
<option>--property=</option>. This command is intended to be
|
||||||
status information about one or more
|
used whenever computer-parsable output is required. Use
|
||||||
sessions, followed by the most recent
|
<command>session-status</command> if you are looking for
|
||||||
log data from the journal. Takes one
|
formatted human-readable output.</para></listitem>
|
||||||
or more session identifiers as
|
</varlistentry>
|
||||||
parameters. If no session identifiers
|
|
||||||
are passed the status of the caller's
|
<varlistentry>
|
||||||
session is shown. This function is
|
<term><command>activate</command> <optional><replaceable>ID</replaceable></optional></term>
|
||||||
intended to generate human-readable
|
|
||||||
output. If you are looking for
|
<listitem><para>Activate a session. This brings a session into
|
||||||
computer-parsable output, use
|
the foreground, if another session is currently in the
|
||||||
<command>show-session</command>
|
foreground on the respective seat. Takes a session identifier
|
||||||
instead.</para></listitem>
|
as argument. If no argument is specified the session of the
|
||||||
</varlistentry>
|
caller is put into foreground.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
|
||||||
<term><command>show-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
<varlistentry>
|
||||||
|
<term><command>lock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
||||||
<listitem><para>Show properties of one
|
<term><command>unlock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
||||||
or more sessions or the manager
|
|
||||||
itself. If no argument is specified,
|
<listitem><para>Activates/deactivates the screen lock on one
|
||||||
properties of the manager will be
|
or more sessions, if the session supports it. Takes one or
|
||||||
shown. If a session ID is specified,
|
more session identifiers as arguments. If no argument is
|
||||||
properties of the session are shown. By
|
specified the session of the caller is locked/unlocked.
|
||||||
default, empty properties are
|
</para></listitem>
|
||||||
suppressed. Use <option>--all</option>
|
</varlistentry>
|
||||||
to show those too. To select specific
|
|
||||||
properties to show, use
|
<varlistentry>
|
||||||
<option>--property=</option>. This
|
<term><command>lock-sessions</command></term>
|
||||||
command is intended to be used
|
<term><command>unlock-sessions</command></term>
|
||||||
whenever computer-parsable output is
|
|
||||||
required. Use
|
<listitem><para>Activates/deactivates the screen lock on all
|
||||||
<command>session-status</command> if
|
current sessions supporting it. </para></listitem>
|
||||||
you are looking for formatted
|
</varlistentry>
|
||||||
human-readable
|
|
||||||
output.</para></listitem>
|
<varlistentry>
|
||||||
</varlistentry>
|
<term><command>terminate-session</command> <replaceable>ID</replaceable>...</term>
|
||||||
|
|
||||||
<varlistentry>
|
<listitem><para>Terminates a session. This kills all processes
|
||||||
<term><command>activate</command> <optional><replaceable>ID</replaceable></optional></term>
|
of the session and deallocates all resources attached to the
|
||||||
|
session. </para></listitem>
|
||||||
<listitem><para>Activate a
|
</varlistentry>
|
||||||
session. This brings a session into
|
|
||||||
the foreground, if another session is
|
<varlistentry>
|
||||||
currently in the foreground on the
|
<term><command>kill-session</command> <replaceable>ID</replaceable>...</term>
|
||||||
respective seat. Takes a session
|
|
||||||
identifier as argument. If no argument
|
<listitem><para>Send a signal to one or more processes of the
|
||||||
is specified the session of the caller
|
session. Use <option>--kill-who=</option> to select which
|
||||||
is put into
|
process to kill. Use <option>--signal=</option> to select the
|
||||||
foreground.</para></listitem>
|
signal to send.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
</variablelist></refsect2>
|
||||||
<varlistentry>
|
|
||||||
<term><command>lock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
<refsect2><title>User Commands</title><variablelist>
|
||||||
<term><command>unlock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
|
<varlistentry>
|
||||||
|
<term><command>list-users</command></term>
|
||||||
<listitem><para>Activates/deactivates
|
|
||||||
the screen lock on one or more
|
<listitem><para>List currently logged in users.
|
||||||
sessions, if the session supports
|
</para></listitem>
|
||||||
it. Takes one or more session
|
</varlistentry>
|
||||||
identifiers as arguments. If no
|
|
||||||
argument is specified the session of
|
<varlistentry>
|
||||||
the caller is locked/unlocked.
|
<term><command>user-status</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
<listitem><para>Show terse runtime status information about
|
||||||
|
one or more logged in users, followed by the most recent log
|
||||||
<varlistentry>
|
data from the journal. Takes one or more user names or numeric
|
||||||
<term><command>lock-sessions</command></term>
|
user IDs as parameters. If no parameters are passed the status
|
||||||
<term><command>unlock-sessions</command></term>
|
of the caller's user is shown. This function is intended to
|
||||||
|
generate human-readable output. If you are looking for
|
||||||
<listitem><para>Activates/deactivates
|
computer-parsable output, use <command>show-user</command>
|
||||||
the screen lock on all current
|
instead. Users may be specified by their usernames or numeric
|
||||||
sessions supporting it.
|
user IDs. </para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><command>show-user</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
||||||
<term><command>terminate-session</command> <replaceable>ID</replaceable>...</term>
|
|
||||||
|
<listitem><para>Show properties of one or more users or the
|
||||||
<listitem><para>Terminates a session.
|
manager itself. If no argument is specified, properties of the
|
||||||
This kills all processes of the
|
manager will be shown. If a user is specified, properties of
|
||||||
session and deallocates all resources
|
the user are shown. By default, empty properties are
|
||||||
attached to the session.
|
suppressed. Use <option>--all</option> to show those too. To
|
||||||
</para></listitem>
|
select specific properties to show, use
|
||||||
</varlistentry>
|
<option>--property=</option>. This command is intended to be
|
||||||
|
used whenever computer-parsable output is required. Use
|
||||||
<varlistentry>
|
<command>user-status</command> if you are looking for
|
||||||
<term><command>kill-session</command> <replaceable>ID</replaceable>...</term>
|
formatted human-readable output.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Send a signal to one
|
|
||||||
or more processes of the session. Use
|
<varlistentry>
|
||||||
<option>--kill-who=</option> to select
|
<term><command>enable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
||||||
which process to kill. Use
|
<term><command>disable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
||||||
<option>--signal=</option> to select
|
|
||||||
the signal to send.</para></listitem>
|
<listitem><para>Enable/disable user lingering for one or more
|
||||||
</varlistentry>
|
users. If enabled for a specific user, a user manager is
|
||||||
</variablelist></refsect2>
|
spawned for the user at boot and kept around after logouts.
|
||||||
|
This allows users who are not logged in to run long-running
|
||||||
<refsect2><title>User Commands</title><variablelist>
|
services. Takes one or more user names or numeric UIDs as
|
||||||
<varlistentry>
|
argument. If no argument is specified enables/disables
|
||||||
<term><command>list-users</command></term>
|
lingering for the user of the session of the caller.
|
||||||
|
</para></listitem>
|
||||||
<listitem><para>List currently logged
|
</varlistentry>
|
||||||
in users.</para></listitem>
|
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
|
<term><command>terminate-user</command> <replaceable>USER</replaceable>...</term>
|
||||||
<varlistentry>
|
|
||||||
<term><command>user-status</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
<listitem><para>Terminates all sessions of a user. This kills
|
||||||
|
all processes of all sessions of the user and deallocates all
|
||||||
<listitem><para>Show terse runtime
|
runtime resources attached to the user.</para></listitem>
|
||||||
status information about one or more
|
</varlistentry>
|
||||||
logged in users, followed by the most
|
|
||||||
recent log data from the
|
<varlistentry>
|
||||||
journal. Takes one or more user names
|
<term><command>kill-user</command> <replaceable>USER</replaceable>...</term>
|
||||||
or numeric user IDs as parameters. If
|
|
||||||
no parameters are passed the status of
|
<listitem><para>Send a signal to all processes of a user. Use
|
||||||
the caller's user is shown. This
|
<option>--signal=</option> to select the signal to send.
|
||||||
function is intended to generate
|
</para></listitem>
|
||||||
human-readable output. If you are
|
</varlistentry>
|
||||||
looking for computer-parsable output,
|
</variablelist></refsect2>
|
||||||
use <command>show-user</command>
|
|
||||||
instead. Users may be specified by
|
<refsect2><title>Seat Commands</title><variablelist>
|
||||||
their usernames or numeric user IDs.
|
<varlistentry>
|
||||||
</para></listitem>
|
<term><command>list-seats</command></term>
|
||||||
</varlistentry>
|
|
||||||
|
<listitem><para>List currently available seats on the local
|
||||||
<varlistentry>
|
system.</para></listitem>
|
||||||
<term><command>show-user</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
</varlistentry>
|
||||||
|
|
||||||
<listitem><para>Show properties of one
|
<varlistentry>
|
||||||
or more users or the manager
|
<term><command>seat-status</command> <optional><replaceable>NAME</replaceable>...</optional></term>
|
||||||
itself. If no argument is specified,
|
|
||||||
properties of the manager will be
|
<listitem><para>Show terse runtime status information about
|
||||||
shown. If a user is specified,
|
one or more seats. Takes one or more seat names as parameters.
|
||||||
properties of the user are shown. By
|
If no seat names are passed the status of the caller's
|
||||||
default, empty properties are
|
session's seat is shown. This function is intended to generate
|
||||||
suppressed. Use <option>--all</option>
|
human-readable output. If you are looking for
|
||||||
to show those too. To select specific
|
computer-parsable output, use <command>show-seat</command>
|
||||||
properties to show, use
|
instead.</para></listitem>
|
||||||
<option>--property=</option>. This
|
</varlistentry>
|
||||||
command is intended to be used
|
|
||||||
whenever computer-parsable output is
|
<varlistentry>
|
||||||
required. Use
|
<term><command>show-seat</command> <optional><replaceable>NAME</replaceable>...</optional></term>
|
||||||
<command>user-status</command> if
|
|
||||||
you are looking for formatted
|
<listitem><para>Show properties of one or more seats or the
|
||||||
human-readable
|
manager itself. If no argument is specified, properties of the
|
||||||
output.</para></listitem>
|
manager will be shown. If a seat is specified, properties of
|
||||||
</varlistentry>
|
the seat are shown. By default, empty properties are
|
||||||
|
suppressed. Use <option>--all</option> to show those too. To
|
||||||
<varlistentry>
|
select specific properties to show, use
|
||||||
<term><command>enable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
<option>--property=</option>. This command is intended to be
|
||||||
<term><command>disable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
|
used whenever computer-parsable output is required. Use
|
||||||
|
<command>seat-status</command> if you are looking for
|
||||||
<listitem><para>Enable/disable user
|
formatted human-readable output.</para></listitem>
|
||||||
lingering for one or more users. If
|
</varlistentry>
|
||||||
enabled for a specific user, a user
|
|
||||||
manager is spawned for the user at
|
<varlistentry>
|
||||||
boot and kept around after
|
<term><command>attach</command> <replaceable>NAME</replaceable> <replaceable>DEVICE</replaceable>...</term>
|
||||||
logouts. This allows users who are not
|
|
||||||
logged in to run long-running
|
<listitem><para>Persistently attach one or more devices to a
|
||||||
services. Takes one or more user names
|
seat. The devices should be specified via device paths in the
|
||||||
or numeric UIDs as argument. If no
|
<filename>/sys</filename> file system. To create a new seat,
|
||||||
argument is specified enables/disables
|
attach at least one graphics card to a previously unused seat
|
||||||
lingering for the user of the session
|
name. Seat names may consist only of a-z, A-Z, 0-9,
|
||||||
of the caller.</para></listitem>
|
<literal>-</literal> and <literal>_</literal> and must be
|
||||||
</varlistentry>
|
prefixed with <literal>seat</literal>. To drop assignment of a
|
||||||
|
device to a specific seat, just reassign it to a different
|
||||||
<varlistentry>
|
seat, or use <command>flush-devices</command>.
|
||||||
<term><command>terminate-user</command> <replaceable>USER</replaceable>...</term>
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<listitem><para>Terminates all
|
|
||||||
sessions of a user. This kills all
|
<varlistentry>
|
||||||
processes of all sessions of the user
|
<term><command>flush-devices</command></term>
|
||||||
and deallocates all runtime resources
|
|
||||||
attached to the user.
|
<listitem><para>Removes all device assignments previously
|
||||||
</para></listitem>
|
created with <command>attach</command>. After this call, only
|
||||||
</varlistentry>
|
automatically generated seats will remain, and all seat
|
||||||
|
hardware is assigned to them.</para></listitem>
|
||||||
<varlistentry>
|
</varlistentry>
|
||||||
<term><command>kill-user</command> <replaceable>USER</replaceable>...</term>
|
|
||||||
|
<varlistentry>
|
||||||
<listitem><para>Send a signal to all
|
<term><command>terminate-seat</command> <replaceable>NAME</replaceable>...</term>
|
||||||
processes of a user. Use
|
|
||||||
<option>--signal=</option> to select
|
<listitem><para>Terminates all sessions on a seat. This kills
|
||||||
the signal to send.</para></listitem>
|
all processes of all sessions on the seat and deallocates all
|
||||||
</varlistentry>
|
runtime resources attached to them.</para></listitem>
|
||||||
</variablelist></refsect2>
|
</varlistentry>
|
||||||
|
</variablelist></refsect2>
|
||||||
<refsect2><title>Seat Commands</title><variablelist>
|
|
||||||
<varlistentry>
|
</refsect1>
|
||||||
<term><command>list-seats</command></term>
|
|
||||||
|
<refsect1>
|
||||||
<listitem><para>List currently
|
<title>Exit status</title>
|
||||||
available seats on the local
|
|
||||||
system.</para></listitem>
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
</varlistentry>
|
otherwise.</para>
|
||||||
|
</refsect1>
|
||||||
<varlistentry>
|
|
||||||
<term><command>seat-status</command> <optional><replaceable>NAME</replaceable>...</optional></term>
|
<xi:include href="less-variables.xml" />
|
||||||
|
|
||||||
<listitem><para>Show terse runtime
|
<refsect1>
|
||||||
status information about one or more
|
<title>See Also</title>
|
||||||
seats. Takes one or more seat names as
|
<para>
|
||||||
parameters. If no seat names are
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
passed the status of the caller's
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
session's seat is shown. This function
|
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
is intended to generate human-readable
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
output. If you are looking for
|
</para>
|
||||||
computer-parsable output, use
|
</refsect1>
|
||||||
<command>show-seat</command>
|
|
||||||
instead.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><command>show-seat</command> <optional><replaceable>NAME</replaceable>...</optional></term>
|
|
||||||
|
|
||||||
<listitem><para>Show properties of one
|
|
||||||
or more seats or the manager
|
|
||||||
itself. If no argument is specified,
|
|
||||||
properties of the manager will be
|
|
||||||
shown. If a seat is specified,
|
|
||||||
properties of the seat are shown. By
|
|
||||||
default, empty properties are
|
|
||||||
suppressed. Use <option>--all</option>
|
|
||||||
to show those too. To select specific
|
|
||||||
properties to show, use
|
|
||||||
<option>--property=</option>. This
|
|
||||||
command is intended to be used
|
|
||||||
whenever computer-parsable output is
|
|
||||||
required. Use
|
|
||||||
<command>seat-status</command> if you
|
|
||||||
are looking for formatted
|
|
||||||
human-readable
|
|
||||||
output.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><command>attach</command> <replaceable>NAME</replaceable> <replaceable>DEVICE</replaceable>...</term>
|
|
||||||
|
|
||||||
<listitem><para>Persistently attach
|
|
||||||
one or more devices to a seat. The
|
|
||||||
devices should be specified via device
|
|
||||||
paths in the <filename>/sys</filename>
|
|
||||||
file system. To create a new seat,
|
|
||||||
attach at least one graphics card to a
|
|
||||||
previously unused seat name. Seat
|
|
||||||
names may consist only of a-z, A-Z,
|
|
||||||
0-9, <literal>-</literal> and
|
|
||||||
<literal>_</literal> and must be
|
|
||||||
prefixed with <literal>seat</literal>.
|
|
||||||
To drop assignment of a device to a
|
|
||||||
specific seat, just reassign it to a
|
|
||||||
different seat, or use
|
|
||||||
<command>flush-devices</command>.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><command>flush-devices</command></term>
|
|
||||||
|
|
||||||
<listitem><para>Removes all device
|
|
||||||
assignments previously created with
|
|
||||||
<command>attach</command>. After this
|
|
||||||
call, only automatically generated
|
|
||||||
seats will remain, and all seat
|
|
||||||
hardware is assigned to
|
|
||||||
them.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><command>terminate-seat</command> <replaceable>NAME</replaceable>...</term>
|
|
||||||
|
|
||||||
<listitem><para>Terminates all
|
|
||||||
sessions on a seat. This kills all
|
|
||||||
processes of all sessions on the seat
|
|
||||||
and deallocates all runtime resources
|
|
||||||
attached to them.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist></refsect2>
|
|
||||||
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
|
||||||
<title>Exit status</title>
|
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
|
||||||
code otherwise.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<xi:include href="less-variables.xml" />
|
|
||||||
|
|
||||||
<refsect1>
|
|
||||||
<title>See Also</title>
|
|
||||||
<para>
|
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
||||||
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+232
-304
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,344 +23,272 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="logind.conf" conditional='ENABLE_LOGIND'
|
<refentry id="logind.conf" conditional='ENABLE_LOGIND'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>logind.conf</title>
|
<title>logind.conf</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>logind.conf</refentrytitle>
|
<refentrytitle>logind.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>logind.conf</refname>
|
<refname>logind.conf</refname>
|
||||||
<refname>logind.conf.d</refname>
|
<refname>logind.conf.d</refname>
|
||||||
<refpurpose>Login manager configuration files</refpurpose>
|
<refpurpose>Login manager configuration files</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/systemd/logind.conf</filename></para>
|
<para><filename>/etc/systemd/logind.conf</filename></para>
|
||||||
<para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
|
<para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
|
<para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
|
<para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>These files configure various parameters of the systemd login manager, <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
<para>These files configure various parameters of the systemd login manager, <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
<xi:include href="standard-conf.xml" xpointer="conf" />
|
<xi:include href="standard-conf.xml" xpointer="conf" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>All options are configured in the
|
<para>All options are configured in the
|
||||||
<literal>[Login]</literal> section:</para>
|
<literal>[Login]</literal> section:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>NAutoVTs=</varname></term>
|
<term><varname>NAutoVTs=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a positive
|
<listitem><para>Takes a positive integer. Configures how many
|
||||||
integer. Configures how many virtual
|
virtual terminals (VTs) to allocate by default that, when
|
||||||
terminals (VTs) to allocate by default
|
switched to and are previously unused,
|
||||||
that, when switched to and are
|
<literal>autovt</literal> services are automatically spawned
|
||||||
previously unused,
|
on. These services are instantiated from the template unit
|
||||||
<literal>autovt</literal> services are
|
<filename>autovt@.service</filename> for the respective VT TTY
|
||||||
automatically spawned on. These
|
name, for example, <filename>autovt@tty4.service</filename>.
|
||||||
services are instantiated from the
|
By default, <filename>autovt@.service</filename> is linked to
|
||||||
template unit
|
<filename>getty@.service</filename>. In other words, login
|
||||||
<filename>autovt@.service</filename>
|
prompts are started dynamically as the user switches to unused
|
||||||
for the respective VT TTY name,
|
virtual terminals. Hence, this parameter controls how many
|
||||||
for example, <filename>autovt@tty4.service</filename>. By
|
login <literal>gettys</literal> are available on the VTs. If a
|
||||||
default,
|
VT is already used by some other subsystem (for example, a
|
||||||
<filename>autovt@.service</filename>
|
graphical login), this kind of activation will not be
|
||||||
is linked to
|
attempted. Note that the VT configured in
|
||||||
<filename>getty@.service</filename>.
|
<varname>ReserveVT=</varname> is always subject to this kind
|
||||||
In other words, login prompts are started
|
of activation, even if it is not one of the VTs configured
|
||||||
dynamically as the user switches to
|
with the <varname>NAutoVTs=</varname> directive. Defaults to
|
||||||
unused virtual terminals. Hence, this
|
6. When set to 0, automatic spawning of
|
||||||
parameter controls how many login
|
<literal>autovt</literal> services is
|
||||||
<literal>gettys</literal> are
|
disabled.</para></listitem>
|
||||||
available on the VTs. If a VT is
|
</varlistentry>
|
||||||
already used by some other subsystem
|
|
||||||
(for example, a graphical login), this
|
|
||||||
kind of activation will not be
|
|
||||||
attempted. Note that the VT configured
|
|
||||||
in <varname>ReserveVT=</varname> is
|
|
||||||
always subject to this kind of
|
|
||||||
activation, even if it is not one of
|
|
||||||
the VTs configured with the
|
|
||||||
<varname>NAutoVTs=</varname>
|
|
||||||
directive. Defaults to 6. When set to
|
|
||||||
0, automatic spawning of
|
|
||||||
<literal>autovt</literal> services is
|
|
||||||
disabled.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ReserveVT=</varname></term>
|
<term><varname>ReserveVT=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a positive
|
<listitem><para>Takes a positive integer. Identifies one
|
||||||
integer. Identifies one
|
virtual terminal that shall unconditionally be reserved for
|
||||||
virtual terminal that shall
|
<filename>autovt@.service</filename> activation (see above).
|
||||||
unconditionally be reserved for
|
The VT selected with this option will be marked busy
|
||||||
<filename>autovt@.service</filename>
|
unconditionally, so that no other subsystem will allocate it.
|
||||||
activation (see above). The VT
|
This functionality is useful to ensure that, regardless of how
|
||||||
selected with this option will be
|
many VTs are allocated by other subsystems, one login
|
||||||
marked busy unconditionally, so that no
|
<literal>getty</literal> is always available. Defaults to 6
|
||||||
other subsystem will allocate it. This
|
(in other words, there will always be a
|
||||||
functionality is useful to ensure that,
|
<literal>getty</literal> available on Alt-F6.). When set to 0,
|
||||||
regardless of how many VTs are allocated
|
VT reservation is disabled.</para></listitem>
|
||||||
by other subsystems, one login
|
</varlistentry>
|
||||||
<literal>getty</literal> is always
|
|
||||||
available. Defaults to 6 (in other
|
|
||||||
words, there will always be a
|
|
||||||
<literal>getty</literal> available on
|
|
||||||
Alt-F6.). When set to 0, VT
|
|
||||||
reservation is
|
|
||||||
disabled.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>KillUserProcesses=</varname></term>
|
<term><varname>KillUserProcesses=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument. Configures whether
|
||||||
argument. Configures whether the
|
the processes of a user should be killed when the user
|
||||||
processes of a user should be killed
|
completely logs out (i.e. after the user's last session
|
||||||
when the user completely logs out (i.e. after
|
ended). Defaults to <literal>no</literal>.</para>
|
||||||
the user's last session ended). Defaults to
|
|
||||||
<literal>no</literal>.</para>
|
|
||||||
|
|
||||||
<para>Note that setting
|
<para>Note that setting <varname>KillUserProcesses=1</varname>
|
||||||
<varname>KillUserProcesses=1</varname>
|
will break tools like
|
||||||
will break tools like
|
<citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
|
||||||
<citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>KillOnlyUsers=</varname></term>
|
<term><varname>KillOnlyUsers=</varname></term>
|
||||||
<term><varname>KillExcludeUsers=</varname></term>
|
<term><varname>KillExcludeUsers=</varname></term>
|
||||||
|
|
||||||
<listitem><para>These settings take
|
<listitem><para>These settings take space-separated lists of
|
||||||
space-separated lists of usernames
|
usernames that influence the effect of
|
||||||
that influence the effect of
|
<varname>KillUserProcesses=</varname>. If not empty, only
|
||||||
<varname>KillUserProcesses=</varname>. If
|
processes of users listed in <varname>KillOnlyUsers=</varname>
|
||||||
not empty, only processes of users
|
will be killed when they log out entirely. Processes of users
|
||||||
listed in
|
listed in <varname>KillExcludeUsers=</varname> are excluded
|
||||||
<varname>KillOnlyUsers=</varname> will
|
from being killed. <varname>KillExcludeUsers=</varname>
|
||||||
be killed when they log out
|
defaults to <literal>root</literal> and takes precedence over
|
||||||
entirely. Processes of users listed in
|
<varname>KillOnlyUsers=</varname>, which defaults to the empty
|
||||||
<varname>KillExcludeUsers=</varname>
|
list.</para></listitem>
|
||||||
are excluded from being
|
</varlistentry>
|
||||||
killed. <varname>KillExcludeUsers=</varname>
|
|
||||||
defaults to <literal>root</literal>
|
|
||||||
and takes precedence over
|
|
||||||
<varname>KillOnlyUsers=</varname>,
|
|
||||||
which defaults to the empty list.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>IdleAction=</varname></term>
|
<term><varname>IdleAction=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Configures the action
|
<listitem><para>Configures the action to take when the system
|
||||||
to take when the system is idle. Takes
|
is idle. Takes one of
|
||||||
one of <literal>ignore</literal>,
|
<literal>ignore</literal>,
|
||||||
<literal>poweroff</literal>,
|
<literal>poweroff</literal>,
|
||||||
<literal>reboot</literal>,
|
<literal>reboot</literal>,
|
||||||
<literal>halt</literal>,
|
<literal>halt</literal>,
|
||||||
<literal>kexec</literal>,
|
<literal>kexec</literal>,
|
||||||
<literal>suspend</literal>,
|
<literal>suspend</literal>,
|
||||||
<literal>hibernate</literal>,
|
<literal>hibernate</literal>,
|
||||||
<literal>hybrid-sleep</literal>, and
|
<literal>hybrid-sleep</literal>, and
|
||||||
<literal>lock</literal>. Defaults to
|
<literal>lock</literal>.
|
||||||
<literal>ignore</literal>.</para>
|
Defaults to <literal>ignore</literal>.</para>
|
||||||
|
|
||||||
<para>Note that this requires that
|
<para>Note that this requires that user sessions correctly
|
||||||
user sessions correctly report the
|
report the idle status to the system. The system will execute
|
||||||
idle status to the system. The system
|
the action after all sessions report that they are idle, no
|
||||||
will execute the action after all
|
idle inhibitor lock is active, and subsequently, the time
|
||||||
sessions report that they are idle,
|
configured with <varname>IdleActionSec=</varname> (see below)
|
||||||
no idle inhibitor lock is active,
|
has expired.</para>
|
||||||
and subsequently, the time configured
|
</listitem>
|
||||||
with <varname>IdleActionSec=</varname>
|
</varlistentry>
|
||||||
(see below) has expired.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>IdleActionSec=</varname></term>
|
<term><varname>IdleActionSec=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Configures the delay
|
<listitem><para>Configures the delay after which the action
|
||||||
after which the action configured in
|
configured in <varname>IdleAction=</varname> (see above) is
|
||||||
<varname>IdleAction=</varname> (see
|
taken after the system is idle.</para></listitem>
|
||||||
above) is taken after the system is
|
</varlistentry>
|
||||||
idle.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>InhibitDelayMaxSec=</varname></term>
|
<term><varname>InhibitDelayMaxSec=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Specifies the maximum
|
<listitem><para>Specifies the maximum time a system shutdown
|
||||||
time a system shutdown or sleep
|
or sleep request is delayed due to an inhibitor lock of type
|
||||||
request is delayed due to an inhibitor
|
<literal>delay</literal> being active before the inhibitor is
|
||||||
lock of type <literal>delay</literal>
|
ignored and the operation executes anyway. Defaults to
|
||||||
being active before the inhibitor is
|
5.</para></listitem>
|
||||||
ignored and the operation executes
|
</varlistentry>
|
||||||
anyway. Defaults to
|
|
||||||
5.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>HandlePowerKey=</varname></term>
|
<term><varname>HandlePowerKey=</varname></term>
|
||||||
<term><varname>HandleSuspendKey=</varname></term>
|
<term><varname>HandleSuspendKey=</varname></term>
|
||||||
<term><varname>HandleHibernateKey=</varname></term>
|
<term><varname>HandleHibernateKey=</varname></term>
|
||||||
<term><varname>HandleLidSwitch=</varname></term>
|
<term><varname>HandleLidSwitch=</varname></term>
|
||||||
<term><varname>HandleLidSwitchDocked=</varname></term>
|
<term><varname>HandleLidSwitchDocked=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls whether
|
<listitem><para>Controls whether logind shall handle the
|
||||||
logind shall handle the system power
|
system power and sleep keys and the lid switch to trigger
|
||||||
and sleep keys and the lid switch to
|
actions such as system power-off or suspend. Can be one of
|
||||||
trigger actions such as system
|
<literal>ignore</literal>,
|
||||||
power-off or suspend. Can be one of
|
<literal>poweroff</literal>,
|
||||||
<literal>ignore</literal>,
|
<literal>reboot</literal>,
|
||||||
<literal>poweroff</literal>,
|
<literal>halt</literal>,
|
||||||
<literal>reboot</literal>,
|
<literal>kexec</literal>,
|
||||||
<literal>halt</literal>,
|
<literal>suspend</literal>,
|
||||||
<literal>kexec</literal>,
|
<literal>hibernate</literal>,
|
||||||
<literal>suspend</literal>,
|
<literal>hybrid-sleep</literal>, and
|
||||||
<literal>hibernate</literal>,
|
<literal>lock</literal>.
|
||||||
<literal>hybrid-sleep</literal>, and
|
If <literal>ignore</literal>, logind will never handle these
|
||||||
<literal>lock</literal>. If
|
keys. If <literal>lock</literal>, all running sessions will be
|
||||||
<literal>ignore</literal>, logind will
|
screen-locked; otherwise, the specified action will be taken
|
||||||
never handle these keys. If
|
in the respective event. Only input devices with the
|
||||||
<literal>lock</literal>, all running
|
<literal>power-switch</literal> udev tag will be watched for
|
||||||
sessions will be screen-locked;
|
key/lid switch events. <varname>HandlePowerKey=</varname>
|
||||||
otherwise, the specified action will
|
defaults to <literal>poweroff</literal>.
|
||||||
be taken in the respective event. Only
|
<varname>HandleSuspendKey=</varname> and
|
||||||
input devices with the
|
<varname>HandleLidSwitch=</varname> default to
|
||||||
<literal>power-switch</literal> udev
|
<literal>suspend</literal>.
|
||||||
tag will be watched for key/lid switch
|
<varname>HandleLidSwitchDocked=</varname> defaults to
|
||||||
events. <varname>HandlePowerKey=</varname>
|
<literal>ignore</literal>.
|
||||||
defaults to
|
<varname>HandleHibernateKey=</varname> defaults to
|
||||||
<literal>poweroff</literal>.
|
<literal>hibernate</literal>. If the system is inserted in a
|
||||||
<varname>HandleSuspendKey=</varname>
|
docking station, or if more than one display is connected, the
|
||||||
and
|
action specified by <varname>HandleLidSwitchDocked=</varname>
|
||||||
<varname>HandleLidSwitch=</varname>
|
occurs; otherwise the <varname>HandleLidSwitch=</varname>
|
||||||
default to <literal>suspend</literal>.
|
action occurs.</para></listitem>
|
||||||
<varname>HandleLidSwitchDocked=</varname>
|
</varlistentry>
|
||||||
defaults to <literal>ignore</literal>.
|
|
||||||
<varname>HandleHibernateKey=</varname>
|
|
||||||
defaults to
|
|
||||||
<literal>hibernate</literal>. If the
|
|
||||||
system is inserted in a docking station,
|
|
||||||
or if more than one display is connected,
|
|
||||||
the action specified by
|
|
||||||
<varname>HandleLidSwitchDocked=</varname>
|
|
||||||
occurs; otherwise the
|
|
||||||
<varname>HandleLidSwitch=</varname>
|
|
||||||
action occurs.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>PowerKeyIgnoreInhibited=</varname></term>
|
<term><varname>PowerKeyIgnoreInhibited=</varname></term>
|
||||||
<term><varname>SuspendKeyIgnoreInhibited=</varname></term>
|
<term><varname>SuspendKeyIgnoreInhibited=</varname></term>
|
||||||
<term><varname>HibernateKeyIgnoreInhibited=</varname></term>
|
<term><varname>HibernateKeyIgnoreInhibited=</varname></term>
|
||||||
<term><varname>LidSwitchIgnoreInhibited=</varname></term>
|
<term><varname>LidSwitchIgnoreInhibited=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls whether
|
<listitem><para>Controls whether actions triggered by the
|
||||||
actions triggered by the power and
|
power and sleep keys and the lid switch are subject to
|
||||||
sleep keys and the lid switch are
|
inhibitor locks. These settings take boolean arguments. If
|
||||||
subject to inhibitor locks. These
|
<literal>no</literal>, the inhibitor locks taken by
|
||||||
settings take boolean arguments. If
|
applications in order to block the requested operation are
|
||||||
<literal>no</literal>, the inhibitor
|
respected. If <literal>yes</literal>, the requested operation
|
||||||
locks taken by applications in order
|
is executed in any case.
|
||||||
to block the requested operation are
|
<varname>PowerKeyIgnoreInhibited=</varname>,
|
||||||
respected. If <literal>yes</literal>,
|
<varname>SuspendKeyIgnoreInhibited=</varname> and
|
||||||
the requested operation is executed in
|
<varname>HibernateKeyIgnoreInhibited=</varname> default to
|
||||||
any
|
<literal>no</literal>.
|
||||||
case. <varname>PowerKeyIgnoreInhibited=</varname>,
|
<varname>LidSwitchIgnoreInhibited=</varname> defaults to
|
||||||
<varname>SuspendKeyIgnoreInhibited=</varname>
|
<literal>yes</literal>. This means that the lid switch does
|
||||||
and
|
not respect suspend blockers by default, but the power and
|
||||||
<varname>HibernateKeyIgnoreInhibited=</varname>
|
sleep keys do. </para></listitem>
|
||||||
default to <literal>no</literal>.
|
</varlistentry>
|
||||||
<varname>LidSwitchIgnoreInhibited=</varname>
|
|
||||||
defaults to
|
|
||||||
<literal>yes</literal>. This means
|
|
||||||
that the lid switch does not respect
|
|
||||||
suspend blockers by default, but the
|
|
||||||
power and sleep keys do.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>RuntimeDirectorySize=</varname></term>
|
<term><varname>RuntimeDirectorySize=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Sets the size limit on
|
<listitem><para>Sets the size limit on the
|
||||||
the
|
<varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
|
||||||
<varname>$XDG_RUNTIME_DIR</varname>
|
user who logs in. Takes a size in bytes, optionally suffixed
|
||||||
runtime directory for each user who
|
with the usual K, G, M, and T suffixes, to the base 1024
|
||||||
logs in. Takes a size in bytes,
|
(IEC). Alternatively, a numerical percentage suffixed by
|
||||||
optionally suffixed with the usual K, G,
|
<literal>%</literal> may be specified, which sets the size
|
||||||
M, and T suffixes, to the base 1024
|
limit relative to the amount of physical RAM. Defaults to 10%.
|
||||||
(IEC). Alternatively, a numerical
|
Note that this size is a safety limit only. As each runtime
|
||||||
percentage suffixed by <literal>%</literal>
|
directory is a tmpfs file system, it will only consume as much
|
||||||
may be specified, which sets the size
|
memory as is needed. </para></listitem>
|
||||||
limit relative to the amount of
|
</varlistentry>
|
||||||
physical RAM. Defaults to 10%. Note
|
|
||||||
that this size is a safety limit
|
|
||||||
only. As each runtime directory is a
|
|
||||||
tmpfs file system, it will only consume
|
|
||||||
as much memory as is needed.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>RemoveIPC=</varname></term>
|
<term><varname>RemoveIPC=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Controls whether
|
<listitem><para>Controls whether System V and POSIX IPC
|
||||||
System V and POSIX IPC objects
|
objects belonging to the user shall be removed when the user
|
||||||
belonging to the user shall be removed
|
fully logs out. Takes a boolean argument. If enabled, the user
|
||||||
when the user fully logs out. Takes a
|
may not consume IPC resources after the last of the user's
|
||||||
boolean argument. If enabled, the user
|
sessions terminated. This covers System V semaphores, shared
|
||||||
may not consume IPC resources after
|
memory and message queues, as well as POSIX shared memory and
|
||||||
the last of the user's sessions
|
message queues. Note that IPC objects of the root user are
|
||||||
terminated. This covers System V
|
excluded from the effect of this setting. Defaults to
|
||||||
semaphores, shared memory and message
|
<literal>yes</literal>.</para></listitem>
|
||||||
queues, as well as POSIX shared memory
|
</varlistentry>
|
||||||
and message queues. Note that IPC
|
|
||||||
objects of the root user are excluded
|
|
||||||
from the effect of this
|
|
||||||
setting. Defaults to
|
|
||||||
<literal>yes</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+92
-100
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,127 +23,119 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="machine-id">
|
<refentry id="machine-id">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>machine-id</title>
|
<title>machine-id</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>machine-id</refentrytitle>
|
<refentrytitle>machine-id</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>machine-id</refname>
|
<refname>machine-id</refname>
|
||||||
<refpurpose>Local machine ID configuration file</refpurpose>
|
<refpurpose>Local machine ID configuration file</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/machine-id</filename></para>
|
<para><filename>/etc/machine-id</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/machine-id</filename> file
|
<para>The <filename>/etc/machine-id</filename> file contains the
|
||||||
contains the unique machine ID of the local system
|
unique machine ID of the local system that is set during
|
||||||
that is set during installation. The machine ID is a
|
installation. The machine ID is a single newline-terminated,
|
||||||
single newline-terminated, hexadecimal, 32-character,
|
hexadecimal, 32-character, lowercase machine ID string. When
|
||||||
lowercase machine ID string. When decoded from
|
decoded from hexadecimal, this corresponds with a 16-byte/128-bit
|
||||||
hexadecimal, this corresponds with a 16-byte/128-bit
|
string.</para>
|
||||||
string.</para>
|
|
||||||
|
|
||||||
<para>The machine ID is usually generated from a
|
<para>The machine ID is usually generated from a random source
|
||||||
random source during system installation and stays
|
during system installation and stays constant for all subsequent
|
||||||
constant for all subsequent boots. Optionally, for
|
boots. Optionally, for stateless systems, it is generated during
|
||||||
stateless systems, it is generated during runtime at
|
runtime at boot if it is found to be empty.</para>
|
||||||
boot if it is found to be empty.</para>
|
|
||||||
|
|
||||||
<para>The machine ID does not change based on user
|
<para>The machine ID does not change based on user configuration
|
||||||
configuration or when hardware is replaced.</para>
|
or when hardware is replaced.</para>
|
||||||
|
|
||||||
<para>This machine ID adheres to the same format and
|
<para>This machine ID adheres to the same format and logic as the
|
||||||
logic as the D-Bus machine ID.</para>
|
D-Bus machine ID.</para>
|
||||||
|
|
||||||
<para>Programs may use this ID to identify the host
|
<para>Programs may use this ID to identify the host with a
|
||||||
with a globally unique ID in the network, which does
|
globally unique ID in the network, which does not change even if
|
||||||
not change even if the local network configuration
|
the local network configuration changes. Due to this and its
|
||||||
changes. Due to this and its greater length, it is
|
greater length, it is a more useful replacement for the
|
||||||
a more useful replacement for the
|
<citerefentry><refentrytitle>gethostid</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>gethostid</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call that POSIX specifies.</para>
|
||||||
call that POSIX specifies.</para>
|
|
||||||
|
|
||||||
<para>The
|
<para>The
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
tool may be used by installer tools to initialize the
|
tool may be used by installer tools to initialize the machine ID
|
||||||
machine ID at install time. Use
|
at install time. Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize it on mounted (but not booted) system
|
to initialize it on mounted (but not booted) system images.</para>
|
||||||
images.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Relation to OSF UUIDs</title>
|
<title>Relation to OSF UUIDs</title>
|
||||||
|
|
||||||
<para>Note that the machine ID historically is not an
|
<para>Note that the machine ID historically is not an OSF UUID as
|
||||||
OSF UUID as defined by <ulink
|
defined by <ulink url="https://tools.ietf.org/html/rfc4122">RFC
|
||||||
url="https://tools.ietf.org/html/rfc4122">RFC
|
4122</ulink>, nor a Microsoft GUID; however, starting with systemd
|
||||||
4122</ulink>, nor a Microsoft GUID; however, starting with
|
v30, newly generated machine IDs do qualify as v4 UUIDs.</para>
|
||||||
systemd v30, newly generated machine IDs do
|
|
||||||
qualify as v4 UUIDs.</para>
|
|
||||||
|
|
||||||
<para>In order to maintain compatibility with existing
|
<para>In order to maintain compatibility with existing
|
||||||
installations, an application requiring a UUID should
|
installations, an application requiring a UUID should decode the
|
||||||
decode the machine ID, and then apply the following
|
machine ID, and then apply the following operations to turn it
|
||||||
operations to turn it into a valid OSF v4 UUID. With
|
into a valid OSF v4 UUID. With <literal>id</literal> being an
|
||||||
<literal>id</literal> being an unsigned character
|
unsigned character array:</para>
|
||||||
array:</para>
|
|
||||||
|
|
||||||
<programlisting>/* Set UUID version to 4 --- truly random generation */
|
<programlisting>/* Set UUID version to 4 --- truly random generation */
|
||||||
id[6] = (id[6] & 0x0F) | 0x40;
|
id[6] = (id[6] & 0x0F) | 0x40;
|
||||||
/* Set the UUID variant to DCE */
|
/* Set the UUID variant to DCE */
|
||||||
id[8] = (id[8] & 0x3F) | 0x80;</programlisting>
|
id[8] = (id[8] & 0x3F) | 0x80;</programlisting>
|
||||||
|
|
||||||
<para>(This code is inspired by
|
<para>(This code is inspired by
|
||||||
<literal>generate_random_uuid()</literal> of
|
<literal>generate_random_uuid()</literal> of
|
||||||
<filename>drivers/char/random.c</filename> from the
|
<filename>drivers/char/random.c</filename> from the Linux kernel
|
||||||
Linux kernel sources.)</para>
|
sources.)</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para>The simple configuration file format of
|
<para>The simple configuration file format of
|
||||||
<filename>/etc/machine-id</filename> originates in the
|
<filename>/etc/machine-id</filename> originates in the
|
||||||
<filename>/var/lib/dbus/machine-id</filename> file
|
<filename>/var/lib/dbus/machine-id</filename> file introduced by
|
||||||
introduced by D-Bus. In fact, this latter file might be a
|
D-Bus. In fact, this latter file might be a symlink to
|
||||||
symlink to
|
<varname>/etc/machine-id</varname>.</para>
|
||||||
<varname>/etc/machine-id</varname>.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>gethostid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>gethostid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+131
-155
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,188 +23,164 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="machine-info">
|
<refentry id="machine-info">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>machine-info</title>
|
<title>machine-info</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>machine-info</refentrytitle>
|
<refentrytitle>machine-info</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>machine-info</refname>
|
<refname>machine-info</refname>
|
||||||
<refpurpose>Local machine information file</refpurpose>
|
<refpurpose>Local machine information file</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/machine-info</filename></para>
|
<para><filename>/etc/machine-info</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/machine-info</filename> file
|
<para>The <filename>/etc/machine-info</filename> file contains
|
||||||
contains machine metadata.</para>
|
machine metadata.</para>
|
||||||
|
|
||||||
<para>The basic file format of
|
<para>The basic file format of <filename>machine-info</filename>
|
||||||
<filename>machine-info</filename> is a
|
is a newline-separated list of environment-like shell-compatible
|
||||||
newline-separated list of environment-like
|
variable assignments. It is possible to source the configuration
|
||||||
shell-compatible variable assignments. It is possible
|
from shell scripts, however, beyond mere variable assignments no
|
||||||
to source the configuration from shell scripts,
|
shell features are supported, allowing applications to read the
|
||||||
however, beyond mere variable assignments no shell
|
file without implementing a shell compatible execution
|
||||||
features are supported, allowing applications to read
|
engine.</para>
|
||||||
the file without implementing a shell compatible
|
|
||||||
execution engine.</para>
|
|
||||||
|
|
||||||
<para><filename>/etc/machine-info</filename> contains
|
<para><filename>/etc/machine-info</filename> contains metadata
|
||||||
metadata about the machine that is set by the user or
|
about the machine that is set by the user or administrator.</para>
|
||||||
administrator.</para>
|
|
||||||
|
|
||||||
<para>Depending on the operating system other
|
<para>Depending on the operating system other configuration files
|
||||||
configuration files might be checked for machine
|
might be checked for machine information as well, however only as
|
||||||
information as well, however only as fallback.</para>
|
fallback.</para>
|
||||||
|
|
||||||
<para>You may use
|
<para>You may use
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to change the settings of this file from the command
|
to change the settings of this file from the command line.</para>
|
||||||
line.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following machine metadata parameters may
|
<para>The following machine metadata parameters may be set using
|
||||||
be set using
|
<filename>/etc/machine-info</filename>:</para>
|
||||||
<filename>/etc/machine-info</filename>:</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>PRETTY_HOSTNAME=</varname></term>
|
<term><varname>PRETTY_HOSTNAME=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A pretty
|
<listitem><para>A pretty human-readable UTF-8 machine
|
||||||
human-readable UTF-8 machine identifier
|
identifier string. This should contain a name like
|
||||||
string. This should contain a name
|
<literal>Lennart's Laptop</literal> which is useful to present
|
||||||
like <literal>Lennart's
|
to the user and does not suffer by the syntax limitations of
|
||||||
Laptop</literal> which is useful to
|
internet domain names. If possible, the internet hostname as
|
||||||
present to the user and does not
|
configured in <filename>/etc/hostname</filename> should be
|
||||||
suffer by the syntax limitations of
|
kept similar to this one. Example: if this value is
|
||||||
internet domain names. If possible, the
|
<literal>Lennart's Computer</literal> an Internet hostname of
|
||||||
internet hostname as configured in
|
<literal>lennarts-computer</literal> might be a good choice.
|
||||||
<filename>/etc/hostname</filename>
|
If this parameter is not set, an application should fall back
|
||||||
should be kept similar to this
|
to the Internet host name for presentation
|
||||||
one. Example: if this value is
|
purposes.</para></listitem>
|
||||||
<literal>Lennart's Computer</literal>
|
</varlistentry>
|
||||||
an Internet hostname of
|
|
||||||
<literal>lennarts-computer</literal>
|
|
||||||
might be a good choice. If this
|
|
||||||
parameter is not set, an application
|
|
||||||
should fall back to the Internet host
|
|
||||||
name for presentation
|
|
||||||
purposes.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ICON_NAME=</varname></term>
|
<term><varname>ICON_NAME=</varname></term>
|
||||||
|
|
||||||
<listitem><para>An icon identifying
|
<listitem><para>An icon identifying this machine according to
|
||||||
this machine according to the <ulink
|
the <ulink
|
||||||
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
|
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
|
||||||
Icon Naming Specification</ulink>. If
|
Icon Naming Specification</ulink>. If this parameter is not
|
||||||
this parameter is not set, an
|
set, an application should fall back to
|
||||||
application should fall back to
|
<literal>computer</literal> or a similar icon
|
||||||
<literal>computer</literal> or a
|
name.</para></listitem>
|
||||||
similar icon name.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>CHASSIS=</varname></term>
|
<term><varname>CHASSIS=</varname></term>
|
||||||
|
|
||||||
<listitem><para>The chassis
|
<listitem><para>The chassis type. Currently, the following
|
||||||
type. Currently, the following chassis
|
chassis types are defined:
|
||||||
types are defined:
|
<literal>desktop</literal>,
|
||||||
<literal>desktop</literal>,
|
<literal>laptop</literal>,
|
||||||
<literal>laptop</literal>,
|
<literal>server</literal>,
|
||||||
<literal>server</literal>,
|
<literal>tablet</literal>,
|
||||||
<literal>tablet</literal>,
|
<literal>handset</literal>,
|
||||||
<literal>handset</literal>,
|
<literal>watch</literal>, and
|
||||||
<literal>watch</literal>, and
|
<literal>embedded</literal>
|
||||||
<literal>embedded</literal> as well as
|
as well as the special chassis types
|
||||||
the special chassis types
|
<literal>vm</literal> and
|
||||||
<literal>vm</literal> and
|
<literal>container</literal> for
|
||||||
<literal>container</literal> for
|
virtualized systems that lack an immediate physical chassis.
|
||||||
virtualized systems that lack an
|
Note that many systems allow detection of the chassis type
|
||||||
immediate physical chassis. Note that
|
automatically (based on firmware information or suchlike).
|
||||||
many systems allow detection of the
|
This setting (if set) shall take precedence over automatically
|
||||||
chassis type automatically (based on
|
detected information and is useful to override misdetected
|
||||||
firmware information or
|
configuration or to manually configure the chassis type where
|
||||||
suchlike). This setting (if set) shall
|
automatic detection is not available.</para></listitem>
|
||||||
take precedence over automatically
|
</varlistentry>
|
||||||
detected information and is useful to
|
|
||||||
override misdetected configuration or
|
|
||||||
to manually configure the chassis type
|
|
||||||
where automatic detection is not
|
|
||||||
available.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>DEPLOYMENT=</varname></term>
|
<term><varname>DEPLOYMENT=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Describes the system
|
<listitem><para>Describes the system deployment environment.
|
||||||
deployment environment. One of the
|
One of the following is suggested:
|
||||||
following is suggested:
|
<literal>development</literal>,
|
||||||
<literal>development</literal>,
|
<literal>integration</literal>,
|
||||||
<literal>integration</literal>,
|
<literal>staging</literal>,
|
||||||
<literal>staging</literal>,
|
<literal>production</literal>.
|
||||||
<literal>production</literal>.
|
</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>LOCATION=</varname></term>
|
<term><varname>LOCATION=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Describes the system
|
<listitem><para>Describes the system location if applicable
|
||||||
location if applicable and
|
and known. Takes a human-friendly, free-form string. This may
|
||||||
known. Takes a human-friendly,
|
be as generic as <literal>Berlin, Germany</literal> or as
|
||||||
free-form string. This may be as
|
specific as <literal>Left Rack, 2nd Shelf</literal>.
|
||||||
generic as <literal>Berlin,
|
</para></listitem>
|
||||||
Germany</literal> or as specific as
|
</varlistentry>
|
||||||
<literal>Left Rack, 2nd
|
</variablelist>
|
||||||
Shelf</literal>.</para></listitem>
|
</refsect1>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
|
<programlisting>PRETTY_HOSTNAME="Lennart's Tablet"
|
||||||
ICON_NAME=computer-tablet
|
ICON_NAME=computer-tablet
|
||||||
CHASSIS=tablet
|
CHASSIS=tablet
|
||||||
DEPLOYMENT=production</programlisting>
|
DEPLOYMENT=production</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+724
-926
File diff suppressed because it is too large
Load Diff
+63
-64
@@ -20,83 +20,82 @@
|
|||||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<refentry id="modules-load.d" conditional='HAVE_KMOD'
|
<refentry id="modules-load.d" conditional='HAVE_KMOD'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>modules-load.d</title>
|
<title>modules-load.d</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>modules-load.d</refentrytitle>
|
<refentrytitle>modules-load.d</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>modules-load.d</refname>
|
<refname>modules-load.d</refname>
|
||||||
<refpurpose>Configure kernel modules to load at boot</refpurpose>
|
<refpurpose>Configure kernel modules to load at boot</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/modules-load.d/*.conf</filename></para>
|
<para><filename>/etc/modules-load.d/*.conf</filename></para>
|
||||||
<para><filename>/run/modules-load.d/*.conf</filename></para>
|
<para><filename>/run/modules-load.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/modules-load.d/*.conf</filename></para>
|
<para><filename>/usr/lib/modules-load.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<para><citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
reads files from the above directories which contain
|
reads files from the above directories which contain kernel
|
||||||
kernel modules to load during boot in a static list.
|
modules to load during boot in a static list. Each configuration
|
||||||
Each configuration file is named in the style of
|
file is named in the style of
|
||||||
<filename>/etc/modules-load.d/<replaceable>program</replaceable>.conf</filename>. Note
|
<filename>/etc/modules-load.d/<replaceable>program</replaceable>.conf</filename>.
|
||||||
that it is usually a better idea to rely on the
|
Note that it is usually a better idea to rely on the automatic
|
||||||
automatic module loading by PCI IDs, USB IDs, DMI IDs
|
module loading by PCI IDs, USB IDs, DMI IDs or similar triggers
|
||||||
or similar triggers encoded in the kernel modules
|
encoded in the kernel modules themselves instead of static
|
||||||
themselves instead of static configuration like
|
configuration like this. In fact, most modern kernel modules are
|
||||||
this. In fact, most modern kernel modules are prepared
|
prepared for automatic loading already.</para>
|
||||||
for automatic loading already.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Configuration Format</title>
|
<title>Configuration Format</title>
|
||||||
|
|
||||||
<para>The configuration files should simply contain a
|
<para>The configuration files should simply contain a list of
|
||||||
list of kernel module names to load, separated by
|
kernel module names to load, separated by newlines. Empty lines
|
||||||
newlines. Empty lines and lines whose first
|
and lines whose first non-whitespace character is # or ; are
|
||||||
non-whitespace character is # or ; are ignored.</para>
|
ignored.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
<example>
|
<example>
|
||||||
<title>/etc/modules-load.d/virtio-net.conf example:</title>
|
<title>/etc/modules-load.d/virtio-net.conf example:</title>
|
||||||
|
|
||||||
<programlisting># Load virtio-net.ko at boot
|
<programlisting># Load virtio-net.ko at boot
|
||||||
virtio-net</programlisting>
|
virtio-net</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-modules-load.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+94
-105
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -24,140 +24,129 @@
|
|||||||
|
|
||||||
<refentry id="nss-myhostname" conditional='HAVE_MYHOSTNAME'>
|
<refentry id="nss-myhostname" conditional='HAVE_MYHOSTNAME'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>nss-myhostname</title>
|
<title>nss-myhostname</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>nss-myhostname</refentrytitle>
|
<refentrytitle>nss-myhostname</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>nss-myhostname</refname>
|
<refname>nss-myhostname</refname>
|
||||||
<refname>libnss_myhostname.so.2</refname>
|
<refname>libnss_myhostname.so.2</refname>
|
||||||
<refpurpose>Provide hostname resolution for the locally
|
<refpurpose>Provide hostname resolution for the locally
|
||||||
configured system hostname.</refpurpose>
|
configured system hostname.</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>libnss_myhostname.so.2</filename></para>
|
<para><filename>libnss_myhostname.so.2</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>nss-myhostname</command> is a plugin
|
<para><command>nss-myhostname</command> is a plugin for the GNU
|
||||||
for the GNU Name Service Switch (NSS) functionality of
|
Name Service Switch (NSS) functionality of the GNU C Library
|
||||||
the GNU C Library (<command>glibc</command>) primarily
|
(<command>glibc</command>) primarily providing hostname resolution
|
||||||
providing hostname resolution for the locally
|
for the locally configured system hostname as returned by
|
||||||
configured system hostname as returned by
|
<citerefentry><refentrytitle>gethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>gethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>. The
|
The precise hostnames resolved by this module are:</para>
|
||||||
precise hostnames resolved by this module are:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The local, configured hostname
|
<listitem><para>The local, configured hostname is resolved to
|
||||||
is resolved to all locally configured IP
|
all locally configured IP addresses ordered by their scope, or
|
||||||
addresses ordered by their scope, or -- if
|
— if none are configured — the IPv4 address 127.0.0.2 (which
|
||||||
none are configured -- the IPv4 address
|
is on the local loopback) and the IPv6 address ::1 (which is the
|
||||||
127.0.0.2 (which is on the local loopback) and
|
local host).</para></listitem>
|
||||||
the IPv6 address ::1 (which is the local
|
|
||||||
host).</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>The hostname
|
<listitem><para>The hostname <literal>localhost</literal> is
|
||||||
<literal>localhost</literal> is resolved to
|
resolved to the IP addresses 127.0.0.1 and
|
||||||
the IP addresses 127.0.0.1 and
|
::1.</para></listitem>
|
||||||
::1.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>The hostname
|
<listitem><para>The hostname <literal>gateway</literal> is
|
||||||
<literal>gateway</literal> is resolved to all
|
resolved to all current default routing gateway addresses,
|
||||||
current default routing gateway addresses,
|
ordered by their metric. This assigns a stable hostname to the
|
||||||
ordered by their metric. This assigns a stable
|
current gateway, useful for referencing it independently of the
|
||||||
hostname to the current gateway, useful for
|
current network configuration state.</para></listitem>
|
||||||
referencing it independently of the current
|
|
||||||
network configuration state.</para></listitem>
|
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Various software relies on an always-resolvable
|
<para>Various software relies on an always-resolvable local
|
||||||
local hostname. When using dynamic hostnames, this is
|
hostname. When using dynamic hostnames, this is traditionally
|
||||||
traditionally achieved by patching
|
achieved by patching <filename>/etc/hosts</filename> at the same
|
||||||
<filename>/etc/hosts</filename> at the same time as
|
time as changing the hostname. This is problematic since it
|
||||||
changing the hostname. This is problematic since it
|
requires a writable <filename>/etc</filename> file system and is
|
||||||
requires a writable <filename>/etc</filename> file
|
fragile because the file might be edited by the administrator at
|
||||||
system and is fragile because the file might be edited
|
the same time. With <command>nss-myhostname</command> enabled
|
||||||
by the administrator at the same time. With
|
changing <filename>/etc/hosts</filename> is unncessary, and on
|
||||||
<command>nss-myhostname</command> enabled changing
|
many systems the file becomes entirely optional.</para>
|
||||||
<filename>/etc/hosts</filename> is unncessary, and on
|
|
||||||
many systems the file becomes entirely optional.</para>
|
|
||||||
|
|
||||||
<para>To activate the NSS modules,
|
<para>To activate the NSS modules, <literal>myhostname</literal>
|
||||||
<literal>myhostname</literal> has to be added to the
|
has to be added to the line starting with
|
||||||
line starting with <literal>hosts:</literal> in
|
<literal>hosts:</literal> in
|
||||||
<filename>/etc/nsswitch.conf</filename>.</para>
|
<filename>/etc/nsswitch.conf</filename>.</para>
|
||||||
|
|
||||||
<para>It is recommended to place
|
<para>It is recommended to place <literal>myhostname</literal>
|
||||||
<literal>myhostname</literal> last in the
|
last in the <filename>nsswitch.conf</filename> line to make sure
|
||||||
<filename>nsswitch.conf</filename> line to make sure
|
that this mapping is only used as fallback, and any DNS or
|
||||||
that this mapping is only used as fallback, and any
|
<filename>/etc/hosts</filename> based mapping takes
|
||||||
DNS or <filename>/etc/hosts</filename> based mapping
|
precedence.</para>
|
||||||
takes precedence.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<para>Here's an example
|
<para>Here's an example <filename>/etc/nsswitch.conf</filename>
|
||||||
<filename>/etc/nsswitch.conf</filename> file, that
|
file, that enables <command>myhostname</command> correctly:</para>
|
||||||
enables <command>myhostname</command>
|
|
||||||
correctly:</para>
|
|
||||||
|
|
||||||
<programlisting>passwd: compat
|
<programlisting>passwd: compat
|
||||||
group: compat
|
group: compat
|
||||||
shadow: compat
|
shadow: compat
|
||||||
|
|
||||||
hosts: files dns mymachines <command>myhostname</command>
|
hosts: files dns mymachines <command>myhostname</command>
|
||||||
networks: files
|
networks: files
|
||||||
|
|
||||||
protocols: db files
|
protocols: db files
|
||||||
services: db files
|
services: db files
|
||||||
ethers: db files
|
ethers: db files
|
||||||
rpc: db files
|
rpc: db files
|
||||||
|
|
||||||
netgroup: nis</programlisting>
|
netgroup: nis</programlisting>
|
||||||
|
|
||||||
<para>To test, use <command>glibc</command>'s <command>getent</command> tool:</para>
|
<para>To test, use <command>glibc</command>'s <command>getent</command> tool:</para>
|
||||||
|
|
||||||
<programlisting>$ getent ahosts `hostname`
|
<programlisting>$ getent ahosts `hostname`
|
||||||
::1 STREAM omega
|
::1 STREAM omega
|
||||||
::1 DGRAM
|
::1 DGRAM
|
||||||
::1 RAW
|
::1 RAW
|
||||||
127.0.0.2 STREAM
|
127.0.0.2 STREAM
|
||||||
127.0.0.2 DGRAM
|
127.0.0.2 DGRAM
|
||||||
127.0.0.2 RAW</programlisting>
|
127.0.0.2 RAW</programlisting>
|
||||||
|
|
||||||
<para>In this case the local hostname is <varname>omega</varname>.</para>
|
<para>In this case the local hostname is <varname>omega</varname>.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+66
-70
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,94 +23,90 @@
|
|||||||
|
|
||||||
<refentry id="nss-mymachines" conditional='ENABLE_MACHINED'>
|
<refentry id="nss-mymachines" conditional='ENABLE_MACHINED'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>nss-mymachines</title>
|
<title>nss-mymachines</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>nss-mymachines</refentrytitle>
|
<refentrytitle>nss-mymachines</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>nss-mymachines</refname>
|
<refname>nss-mymachines</refname>
|
||||||
<refname>libnss_mymachines.so.2</refname>
|
<refname>libnss_mymachines.so.2</refname>
|
||||||
<refpurpose>Provide hostname resolution for local
|
<refpurpose>Provide hostname resolution for local
|
||||||
container instances.</refpurpose>
|
container instances.</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>libnss_mymachines.so.2</filename></para>
|
<para><filename>libnss_mymachines.so.2</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>nss-mymachines</command> is a plugin
|
<para><command>nss-mymachines</command> is a plugin for the GNU
|
||||||
for the GNU Name Service Switch (NSS) functionality of
|
Name Service Switch (NSS) functionality of the GNU C Library
|
||||||
the GNU C Library (<command>glibc</command>) providing
|
(<command>glibc</command>) providing hostname resolution for
|
||||||
hostname resolution for containers running locally,
|
containers running locally, that are registered with
|
||||||
that are registered with
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
|
The container names are resolved to IP addresses of the specific
|
||||||
container names are resolved to IP addresses of the
|
container, ordered by their scope.</para>
|
||||||
specific container, ordered by their scope.</para>
|
|
||||||
|
|
||||||
<para>To activate the NSS modules,
|
<para>To activate the NSS modules, <literal>mymachines</literal>
|
||||||
<literal>mymachines</literal> has to be added to the
|
has to be added to the line starting with
|
||||||
line starting with <literal>hosts:</literal> in
|
<literal>hosts:</literal> in
|
||||||
<filename>/etc/nsswitch.conf</filename>.</para>
|
<filename>/etc/nsswitch.conf</filename>.</para>
|
||||||
|
|
||||||
<para>It is recommended to place
|
<para>It is recommended to place <literal>mymachines</literal>
|
||||||
<literal>mymachines</literal> near the end of the
|
near the end of the <filename>nsswitch.conf</filename> line to
|
||||||
<filename>nsswitch.conf</filename> line to make sure
|
make sure that this mapping is only used as fallback, and any DNS
|
||||||
that this mapping is only used as fallback, and any
|
or <filename>/etc/hosts</filename> based mapping takes
|
||||||
DNS or <filename>/etc/hosts</filename> based mapping
|
precedence.</para>
|
||||||
takes precedence.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<para>Here's an example
|
<para>Here's an example <filename>/etc/nsswitch.conf</filename>
|
||||||
<filename>/etc/nsswitch.conf</filename> file, that
|
file, that enables <command>mymachines</command> correctly:</para>
|
||||||
enables <command>mymachines</command>
|
|
||||||
correctly:</para>
|
|
||||||
|
|
||||||
<programlisting>passwd: compat
|
<programlisting>passwd: compat
|
||||||
group: compat
|
group: compat
|
||||||
shadow: compat
|
shadow: compat
|
||||||
|
|
||||||
hosts: files dns <command>mymachines</command> myhostname
|
hosts: files dns <command>mymachines</command> myhostname
|
||||||
networks: files
|
networks: files
|
||||||
|
|
||||||
protocols: db files
|
protocols: db files
|
||||||
services: db files
|
services: db files
|
||||||
ethers: db files
|
ethers: db files
|
||||||
rpc: db files
|
rpc: db files
|
||||||
|
|
||||||
netgroup: nis</programlisting>
|
netgroup: nis</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+250
-323
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,359 +23,286 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="os-release">
|
<refentry id="os-release">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>os-release</title>
|
<title>os-release</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>os-release</refentrytitle>
|
<refentrytitle>os-release</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>os-release</refname>
|
<refname>os-release</refname>
|
||||||
<refpurpose>Operating system identification</refpurpose>
|
<refpurpose>Operating system identification</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/os-release</filename></para>
|
<para><filename>/etc/os-release</filename></para>
|
||||||
<para><filename>/usr/lib/os-release</filename></para>
|
<para><filename>/usr/lib/os-release</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>The <filename>/etc/os-release</filename> and
|
<para>The <filename>/etc/os-release</filename> and
|
||||||
<filename>/usr/lib/os-release</filename> files contain
|
<filename>/usr/lib/os-release</filename> files contain operating
|
||||||
operating system identification data.</para>
|
system identification data.</para>
|
||||||
|
|
||||||
<para>The basic file format of
|
<para>The basic file format of <filename>os-release</filename> is
|
||||||
<filename>os-release</filename> is a newline-separated
|
a newline-separated list of environment-like shell-compatible
|
||||||
list of environment-like shell-compatible variable
|
variable assignments. It is possible to source the configuration
|
||||||
assignments. It is possible to source the
|
from shell scripts, however, beyond mere variable assignments, no
|
||||||
configuration from shell scripts, however, beyond mere
|
shell features are supported (this means variable expansion is
|
||||||
variable assignments, no shell features are supported
|
explicitly not supported), allowing applications to read the file
|
||||||
(this means variable expansion is explicitly not
|
without implementing a shell compatible execution engine. Variable
|
||||||
supported), allowing applications to read the file
|
assignment values must be enclosed in double or single quotes if
|
||||||
without implementing a shell compatible execution
|
they include spaces, semicolons or other special characters
|
||||||
engine. Variable assignment values must be enclosed in
|
outside of A-Z, a-z, 0-9. Shell special characters ("$", quotes,
|
||||||
double or single quotes if they include spaces,
|
backslash, backtick) must be escaped with backslashes, following
|
||||||
semicolons or other special characters outside of A-Z,
|
shell style. All strings should be in UTF-8 format, and
|
||||||
a-z, 0-9. Shell special characters ("$", quotes,
|
non-printable characters should not be used. It is not supported
|
||||||
backslash, backtick) must be escaped with backslashes,
|
to concatenate multiple individually quoted strings. Lines
|
||||||
following shell style. All strings should be in UTF-8
|
beginning with "#" shall be ignored as comments.</para>
|
||||||
format, and non-printable characters should not be used.
|
|
||||||
It is not supported to concatenate multiple individually
|
|
||||||
quoted strings. Lines beginning with "#" shall be
|
|
||||||
ignored as comments.</para>
|
|
||||||
|
|
||||||
<para>The file <filename>/etc/os-release</filename>
|
<para>The file <filename>/etc/os-release</filename> takes
|
||||||
takes precedence over
|
precedence over <filename>/usr/lib/os-release</filename>.
|
||||||
<filename>/usr/lib/os-release</filename>. Applications
|
Applications should check for the former, and exclusively use its
|
||||||
should check for the former, and exclusively use its
|
data if it exists, and only fall back to
|
||||||
data if it exists, and only fall back to
|
<filename>/usr/lib/os-release</filename> if it is missing.
|
||||||
<filename>/usr/lib/os-release</filename> if it is
|
Applications should not read data from both files at the same
|
||||||
missing. Applications should not read data from both
|
time. <filename>/usr/lib/os-release</filename> is the recommended
|
||||||
files at the same
|
place to store OS release information as part of vendor trees.
|
||||||
time. <filename>/usr/lib/os-release</filename> is the
|
<filename>/etc/os-release</filename> should be a relative symlink
|
||||||
recommended place to store OS release information as
|
to <filename>/usr/lib/os-release</filename>, to provide
|
||||||
part of vendor trees.
|
compatibility with applications only looking at
|
||||||
<filename>/etc/os-release</filename> should be a
|
<filename>/etc</filename>. A relative symlink instead of an
|
||||||
relative symlink to
|
absolute symlink is necessary to avoid breaking the link in a
|
||||||
<filename>/usr/lib/os-release</filename>,
|
chroot or initrd environment such as dracut.</para>
|
||||||
to provide compatibility with applications only
|
|
||||||
looking at <filename>/etc</filename>. A relative
|
|
||||||
symlink instead of an absolute symlink is
|
|
||||||
necessary to avoid breaking the link in a chroot or
|
|
||||||
initrd environment such as dracut.</para>
|
|
||||||
|
|
||||||
<para><filename>os-release</filename> contains data
|
<para><filename>os-release</filename> contains data that is
|
||||||
that is defined by the operating system vendor and
|
defined by the operating system vendor and should generally not be
|
||||||
should generally not be changed by the
|
changed by the administrator.</para>
|
||||||
administrator.</para>
|
|
||||||
|
|
||||||
<para>As this file only encodes names and identifiers
|
<para>As this file only encodes names and identifiers it should
|
||||||
it should not be localized.</para>
|
not be localized.</para>
|
||||||
|
|
||||||
<para>The <filename>/etc/os-release</filename> and
|
<para>The <filename>/etc/os-release</filename> and
|
||||||
<filename>/usr/lib/os-release</filename> files might
|
<filename>/usr/lib/os-release</filename> files might be symlinks
|
||||||
be symlinks to other files, but it is important that
|
to other files, but it is important that the file is available
|
||||||
the file is available from earliest boot on, and hence
|
from earliest boot on, and hence must be located on the root file
|
||||||
must be located on the root file system.</para>
|
system.</para>
|
||||||
|
|
||||||
<para>For a longer rationale for
|
<para>For a longer rationale for <filename>os-release</filename>
|
||||||
<filename>os-release</filename> please refer to
|
please refer to the <ulink
|
||||||
the <ulink
|
url="http://0pointer.de/blog/projects/os-release">Announcement of
|
||||||
url="http://0pointer.de/blog/projects/os-release">Announcement of <filename>/etc/os-release</filename></ulink>.</para>
|
<filename>/etc/os-release</filename></ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following OS identifications parameters may be set using
|
<para>The following OS identifications parameters may be set using
|
||||||
<filename>os-release</filename>:</para>
|
<filename>os-release</filename>:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>NAME=</varname></term>
|
<term><varname>NAME=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A string identifying
|
<listitem><para>A string identifying the operating system,
|
||||||
the operating system, without a
|
without a version component, and suitable for presentation to
|
||||||
version component, and suitable for
|
the user. If not set, defaults to
|
||||||
presentation to the user. If not set,
|
<literal>NAME=Linux</literal>. Example:
|
||||||
defaults to
|
<literal>NAME=Fedora</literal> or <literal>NAME="Debian
|
||||||
<literal>NAME=Linux</literal>. Example:
|
GNU/Linux"</literal>.</para></listitem>
|
||||||
<literal>NAME=Fedora</literal> or
|
</varlistentry>
|
||||||
<literal>NAME="Debian
|
|
||||||
GNU/Linux"</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>VERSION=</varname></term>
|
<term><varname>VERSION=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A string identifying
|
<listitem><para>A string identifying the operating system
|
||||||
the operating system version,
|
version, excluding any OS name information, possibly including
|
||||||
excluding any OS name information,
|
a release code name, and suitable for presentation to the
|
||||||
possibly including a release code
|
user. This field is optional. Example:
|
||||||
name, and suitable for presentation to
|
<literal>VERSION=17</literal> or <literal>VERSION="17 (Beefy
|
||||||
the user. This field is
|
Miracle)"</literal>.</para></listitem>
|
||||||
optional. Example:
|
</varlistentry>
|
||||||
<literal>VERSION=17</literal> or
|
|
||||||
<literal>VERSION="17 (Beefy
|
|
||||||
Miracle)"</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ID=</varname></term>
|
<term><varname>ID=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A lower-case string
|
<listitem><para>A lower-case string (no spaces or other
|
||||||
(no spaces or other characters outside
|
characters outside of 0-9, a-z, ".", "_" and "-") identifying
|
||||||
of 0-9, a-z, ".", "_" and "-")
|
the operating system, excluding any version information and
|
||||||
identifying the operating system,
|
suitable for processing by scripts or usage in generated
|
||||||
excluding any version information and
|
filenames. If not set, defaults to
|
||||||
suitable for processing by scripts or
|
<literal>ID=linux</literal>. Example:
|
||||||
usage in generated filenames. If not
|
<literal>ID=fedora</literal> or
|
||||||
set, defaults to
|
<literal>ID=debian</literal>.</para></listitem>
|
||||||
<literal>ID=linux</literal>. Example:
|
</varlistentry>
|
||||||
<literal>ID=fedora</literal> or
|
|
||||||
<literal>ID=debian</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ID_LIKE=</varname></term>
|
<term><varname>ID_LIKE=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A space-separated list
|
<listitem><para>A space-separated list of operating system
|
||||||
of operating system identifiers in the
|
identifiers in the same syntax as the <varname>ID=</varname>
|
||||||
same syntax as the
|
setting. It should list identifiers of operating systems that
|
||||||
<varname>ID=</varname> setting. It should
|
are closely related to the local operating system in regards
|
||||||
list identifiers of operating systems
|
to packaging and programming interfaces, for example listing
|
||||||
that are closely related to the local
|
one or more OS identifiers the local OS is a derivative from.
|
||||||
operating system in regards to
|
An OS should generally only list other OS identifiers it
|
||||||
packaging and programming interfaces,
|
itself is a derivative of, and not any OSes that are derived
|
||||||
for example listing one or more
|
from it, though symmetric relationships are possible. Build
|
||||||
OS identifiers the local
|
scripts and similar should check this variable if they need to
|
||||||
OS is a derivative from. An
|
identify the local operating system and the value of
|
||||||
OS should generally only list other OS
|
<varname>ID=</varname> is not recognized. Operating systems
|
||||||
identifiers it itself is a derivative
|
should be listed in order of how closely the local operating
|
||||||
of, and not any OSes that
|
system relates to the listed ones, starting with the closest.
|
||||||
are derived from it, though symmetric
|
This field is optional. Example: for an operating system with
|
||||||
relationships are possible. Build
|
<literal>ID=centos</literal>, an assignment of
|
||||||
scripts and similar should check this
|
<literal>ID_LIKE="rhel fedora"</literal> would be appropriate.
|
||||||
variable if they need to identify the
|
For an operating system with <literal>ID=ubuntu</literal>, an
|
||||||
local operating system and the value
|
assignment of <literal>ID_LIKE=debian</literal> is
|
||||||
of <varname>ID=</varname> is not
|
appropriate.</para></listitem>
|
||||||
recognized. Operating systems should
|
</varlistentry>
|
||||||
be listed in order of how closely the
|
|
||||||
local operating system relates to the
|
|
||||||
listed ones, starting with the
|
|
||||||
closest. This field is
|
|
||||||
optional. Example: for an operating
|
|
||||||
system with
|
|
||||||
<literal>ID=centos</literal>, an
|
|
||||||
assignment of <literal>ID_LIKE="rhel
|
|
||||||
fedora"</literal> would be
|
|
||||||
appropriate. For an operating system
|
|
||||||
with <literal>ID=ubuntu</literal>, an
|
|
||||||
assignment of
|
|
||||||
<literal>ID_LIKE=debian</literal> is
|
|
||||||
appropriate.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>VERSION_ID=</varname></term>
|
<term><varname>VERSION_ID=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A lower-case string
|
<listitem><para>A lower-case string (mostly numeric, no spaces
|
||||||
(mostly numeric, no spaces or other
|
or other characters outside of 0-9, a-z, ".", "_" and "-")
|
||||||
characters outside of 0-9, a-z, ".",
|
identifying the operating system version, excluding any OS
|
||||||
"_" and "-") identifying the operating
|
name information or release code name, and suitable for
|
||||||
system version, excluding any OS name
|
processing by scripts or usage in generated filenames. This
|
||||||
information or release code name, and
|
field is optional. Example: <literal>VERSION_ID=17</literal>
|
||||||
suitable for processing by scripts or
|
or <literal>VERSION_ID=11.04</literal>.</para></listitem>
|
||||||
usage in generated filenames. This
|
</varlistentry>
|
||||||
field is optional. Example:
|
|
||||||
<literal>VERSION_ID=17</literal> or
|
|
||||||
<literal>VERSION_ID=11.04</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>PRETTY_NAME=</varname></term>
|
<term><varname>PRETTY_NAME=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A pretty operating
|
<listitem><para>A pretty operating system name in a format
|
||||||
system name in a format suitable for
|
suitable for presentation to the user. May or may not contain
|
||||||
presentation to the user. May or may
|
a release code name or OS version of some kind, as suitable.
|
||||||
not contain a release code name or OS
|
If not set, defaults to
|
||||||
version of some kind, as suitable. If
|
<literal>PRETTY_NAME="Linux"</literal>. Example:
|
||||||
not set, defaults to
|
<literal>PRETTY_NAME="Fedora 17 (Beefy
|
||||||
<literal>PRETTY_NAME="Linux"</literal>. Example:
|
Miracle)"</literal>.</para></listitem>
|
||||||
<literal>PRETTY_NAME="Fedora 17 (Beefy
|
</varlistentry>
|
||||||
Miracle)"</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ANSI_COLOR=</varname></term>
|
<term><varname>ANSI_COLOR=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A suggested
|
<listitem><para>A suggested presentation color when showing
|
||||||
presentation color when showing the
|
the OS name on the console. This should be specified as string
|
||||||
OS name on the console. This
|
suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code
|
||||||
should be specified as string suitable
|
for setting graphical rendition. This field is optional.
|
||||||
for inclusion in the ESC [ m
|
Example: <literal>ANSI_COLOR="0;31"</literal> for red, or
|
||||||
ANSI/ECMA-48 escape code for setting
|
<literal>ANSI_COLOR="1;34"</literal> for light
|
||||||
graphical rendition. This field is
|
blue.</para></listitem>
|
||||||
optional. Example:
|
</varlistentry>
|
||||||
<literal>ANSI_COLOR="0;31"</literal>
|
|
||||||
for red, or
|
|
||||||
<literal>ANSI_COLOR="1;34"</literal>
|
|
||||||
for light blue.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>CPE_NAME=</varname></term>
|
<term><varname>CPE_NAME=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A CPE name for the
|
<listitem><para>A CPE name for the operating system, following
|
||||||
operating system, following the <ulink
|
the <ulink url="https://cpe.mitre.org/specification/">Common
|
||||||
url="https://cpe.mitre.org/specification/">Common
|
Platform Enumeration Specification</ulink> as proposed by the
|
||||||
Platform Enumeration
|
MITRE Corporation. This field is optional. Example:
|
||||||
Specification</ulink> as proposed by
|
<literal>CPE_NAME="cpe:/o:fedoraproject:fedora:17"</literal>
|
||||||
the MITRE Corporation. This field
|
</para></listitem>
|
||||||
is optional. Example:
|
</varlistentry>
|
||||||
<literal>CPE_NAME="cpe:/o:fedoraproject:fedora:17"</literal>
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>HOME_URL=</varname></term>
|
<term><varname>HOME_URL=</varname></term>
|
||||||
<term><varname>SUPPORT_URL=</varname></term>
|
<term><varname>SUPPORT_URL=</varname></term>
|
||||||
<term><varname>BUG_REPORT_URL=</varname></term>
|
<term><varname>BUG_REPORT_URL=</varname></term>
|
||||||
<term><varname>PRIVACY_POLICY_URL=</varname></term>
|
<term><varname>PRIVACY_POLICY_URL=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Links to resources on
|
<listitem><para>Links to resources on the Internet related the
|
||||||
the Internet related the operating
|
operating system. <varname>HOME_URL=</varname> should refer to
|
||||||
system. <varname>HOME_URL=</varname>
|
the homepage of the operating system, or alternatively some
|
||||||
should refer to the homepage of the
|
homepage of the specific version of the operating system.
|
||||||
operating system, or alternatively
|
<varname>SUPPORT_URL=</varname> should refer to the main
|
||||||
some homepage of the specific version
|
support page for the operating system, if there is any. This
|
||||||
of the operating
|
is primarily intended for operating systems which vendors
|
||||||
system. <varname>SUPPORT_URL=</varname>
|
provide support for. <varname>BUG_REPORT_URL=</varname> should
|
||||||
should refer to the main support page
|
refer to the main bug reporting page for the operating system,
|
||||||
for the operating system, if there is
|
if there is any. This is primarily intended for operating
|
||||||
any. This is primarily intended for
|
systems that rely on community QA.
|
||||||
operating systems which vendors
|
<varname>PRIVACY_POLICY_URL=</varname> should refer to the
|
||||||
provide support
|
main privacy policy page for the operation system, if there is
|
||||||
for. <varname>BUG_REPORT_URL=</varname>
|
any. These settings are optional, and providing only some of
|
||||||
should refer to the main bug reporting
|
these settings is common. These URLs are intended to be
|
||||||
page for the operating system, if
|
exposed in "About this system" UIs behind links with captions
|
||||||
there is any. This is primarily
|
such as "About this Operating System", "Obtain Support",
|
||||||
intended for operating systems that
|
"Report a Bug", or "Privacy Policy". The values should be in
|
||||||
rely on community QA.
|
<ulink url="https://tools.ietf.org/html/rfc3986">RFC3986
|
||||||
<varname>PRIVACY_POLICY_URL=</varname>
|
format</ulink>, and should be <literal>http:</literal> or
|
||||||
should refer to the main privacy policy
|
<literal>https:</literal> URLs, and possibly
|
||||||
page for the operation system, if there
|
<literal>mailto:</literal> or <literal>tel:</literal>. Only
|
||||||
is any. These settings
|
one URL shall be listed in each setting. If multiple resources
|
||||||
are optional, and providing only some
|
need to be referenced, it is recommended to provide an online
|
||||||
of these settings is common. These
|
landing page linking all available resources. Examples:
|
||||||
URLs are intended to be exposed in
|
<literal>HOME_URL="https://fedoraproject.org/"</literal> and
|
||||||
"About this system" UIs behind links
|
<literal>BUG_REPORT_URL="https://bugzilla.redhat.com/"</literal></para></listitem>
|
||||||
with captions such as "About this
|
</varlistentry>
|
||||||
Operating System", "Obtain Support",
|
|
||||||
"Report a Bug", or "Privacy Policy". The
|
|
||||||
values should be in <ulink
|
|
||||||
url="https://tools.ietf.org/html/rfc3986">RFC3986
|
|
||||||
format</ulink>, and should be
|
|
||||||
<literal>http:</literal> or
|
|
||||||
<literal>https:</literal> URLs, and
|
|
||||||
possibly <literal>mailto:</literal> or
|
|
||||||
<literal>tel:</literal>. Only one URL
|
|
||||||
shall be listed in each setting. If
|
|
||||||
multiple resources need to be
|
|
||||||
referenced, it is recommended to
|
|
||||||
provide an online landing page linking
|
|
||||||
all available resources. Examples:
|
|
||||||
<literal>HOME_URL="https://fedoraproject.org/"</literal>
|
|
||||||
and
|
|
||||||
<literal>BUG_REPORT_URL="https://bugzilla.redhat.com/"</literal></para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>BUILD_ID=</varname></term>
|
<term><varname>BUILD_ID=</varname></term>
|
||||||
|
|
||||||
<listitem><para>A string uniquely
|
<listitem><para>A string uniquely identifying the system image
|
||||||
identifying the system image used as
|
used as the origin for a distribution (it is not updated with
|
||||||
the origin for a distribution (it is
|
system updates). The field can be identical between different
|
||||||
not updated with system updates). The
|
VERSION_IDs as BUILD_ID is an only a unique identifier to a
|
||||||
field can be identical between
|
specific version. Distributions that release each update as a
|
||||||
different VERSION_IDs as BUILD_ID is
|
new version would only need to use VERSION_ID as each build is
|
||||||
an only a unique identifier to a
|
already distinct based on the VERSION_ID. This field is
|
||||||
specific version. Distributions that
|
optional. Example: <literal>BUILD_ID="2013-03-20.3"</literal>
|
||||||
release each update as a new version
|
or <literal>BUILD_ID=201303203</literal>.
|
||||||
would only need to use VERSION_ID as
|
|
||||||
each build is already distinct based
|
|
||||||
on the VERSION_ID. This field is
|
|
||||||
optional. Example:
|
|
||||||
<literal>BUILD_ID="2013-03-20.3"</literal>
|
|
||||||
or
|
|
||||||
<literal>BUILD_ID=201303203</literal>.
|
|
||||||
|
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>If you are reading this file from C code or a
|
<para>If you are reading this file from C code or a shell script
|
||||||
shell script to determine the OS or a specific version
|
to determine the OS or a specific version of it, use the
|
||||||
of it, use the ID and VERSION_ID fields, possibly with
|
<varname>ID</varname> and <varname>VERSION_ID</varname> fields,
|
||||||
ID_LIKE as fallback for ID. When looking for an OS
|
possibly with <varname>ID_LIKE</varname> as fallback for
|
||||||
identification string for presentation to the user use
|
<varname>ID</varname>. When looking for an OS identification
|
||||||
the PRETTY_NAME field.</para>
|
string for presentation to the user use the
|
||||||
|
<varname>PRETTY_NAME</varname> field.</para>
|
||||||
|
|
||||||
<para>Note that operating system vendors may choose
|
<para>Note that operating system vendors may choose not to provide
|
||||||
not to provide version information, for example to
|
version information, for example to accommodate for rolling
|
||||||
accommodate for rolling releases. In this case, VERSION
|
releases. In this case, <varname>VERSION</varname> and
|
||||||
and VERSION_ID may be unset. Applications should not
|
<varname>VERSION_ID</varname> may be unset. Applications should
|
||||||
rely on these fields to be set.</para>
|
not rely on these fields to be set.</para>
|
||||||
|
|
||||||
<para>Operating system vendors may extend the file
|
<para>Operating system vendors may extend the file
|
||||||
format and introduce new fields. It is highly
|
format and introduce new fields. It is highly
|
||||||
recommended to prefix new fields with an OS specific
|
recommended to prefix new fields with an OS specific
|
||||||
name in order to avoid name clashes. Applications
|
name in order to avoid name clashes. Applications
|
||||||
reading this file must ignore unknown fields. Example:
|
reading this file must ignore unknown fields. Example:
|
||||||
<literal>DEBIAN_BTS="debbugs://bugs.debian.org/"</literal></para>
|
<literal>DEBIAN_BTS="debbugs://bugs.debian.org/"</literal></para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<programlisting>NAME=Fedora
|
<programlisting>NAME=Fedora
|
||||||
VERSION="17 (Beefy Miracle)"
|
VERSION="17 (Beefy Miracle)"
|
||||||
ID=fedora
|
ID=fedora
|
||||||
VERSION_ID=17
|
VERSION_ID=17
|
||||||
@@ -384,17 +311,17 @@ ANSI_COLOR="0;34"
|
|||||||
CPE_NAME="cpe:/o:fedoraproject:fedora:17"
|
CPE_NAME="cpe:/o:fedoraproject:fedora:17"
|
||||||
HOME_URL="https://fedoraproject.org/"
|
HOME_URL="https://fedoraproject.org/"
|
||||||
BUG_REPORT_URL="https://bugzilla.redhat.com/"</programlisting>
|
BUG_REPORT_URL="https://bugzilla.redhat.com/"</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>lsb_release</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>lsb_release</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+215
-257
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,292 +23,250 @@
|
|||||||
|
|
||||||
<refentry id="pam_systemd" conditional='HAVE_PAM'>
|
<refentry id="pam_systemd" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>pam_systemd</title>
|
<title>pam_systemd</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>pam_systemd</refentrytitle>
|
<refentrytitle>pam_systemd</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>pam_systemd</refname>
|
<refname>pam_systemd</refname>
|
||||||
<refpurpose>Register user sessions in the systemd login manager</refpurpose>
|
<refpurpose>Register user sessions in the systemd login manager</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>pam_systemd.so</filename></para>
|
<para><filename>pam_systemd.so</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>pam_systemd</command> registers user
|
<para><command>pam_systemd</command> registers user sessions with
|
||||||
sessions with the systemd login manager
|
the systemd login manager
|
||||||
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
and hence the systemd control group hierarchy.</para>
|
and hence the systemd control group hierarchy.</para>
|
||||||
|
|
||||||
<para>On login, this module ensures the following:</para>
|
<para>On login, this module ensures the following:</para>
|
||||||
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>If it does not exist yet, the
|
<listitem><para>If it does not exist yet, the user runtime
|
||||||
user runtime directory
|
directory <filename>/run/user/$USER</filename> is created and
|
||||||
<filename>/run/user/$USER</filename> is
|
its ownership changed to the user that is logging
|
||||||
created and its ownership changed to the user
|
in.</para></listitem>
|
||||||
that is logging in.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>The
|
<listitem><para>The <varname>$XDG_SESSION_ID</varname>
|
||||||
<varname>$XDG_SESSION_ID</varname> environment
|
environment variable is initialized. If auditing is available
|
||||||
variable is initialized. If auditing is
|
and <command>pam_loginuid.so</command> was run before this
|
||||||
available and
|
module (which is highly recommended), the variable is
|
||||||
<command>pam_loginuid.so</command> was run before
|
initialized from the auditing session id
|
||||||
this module (which is highly recommended), the
|
(<filename>/proc/self/sessionid</filename>). Otherwise, an
|
||||||
variable is initialized from the auditing
|
independent session counter is used.</para></listitem>
|
||||||
session id
|
|
||||||
(<filename>/proc/self/sessionid</filename>). Otherwise,
|
|
||||||
an independent session counter is
|
|
||||||
used.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>A new systemd scope unit is
|
<listitem><para>A new systemd scope unit is created for the
|
||||||
created for the session. If this is the first
|
session. If this is the first concurrent session of the user, an
|
||||||
concurrent session of the user, an implicit
|
implicit slice below <filename>user.slice</filename> is
|
||||||
slice below <filename>user.slice</filename> is
|
automatically created and the scope placed into it. An instance
|
||||||
automatically created and the scope placed into
|
of the system service <filename>user@.service</filename>, which
|
||||||
it. An instance of the system service
|
runs the systemd user manager instance, is started.
|
||||||
<filename>user@.service</filename>, which runs
|
</para></listitem>
|
||||||
the systemd user manager instance, is started.
|
</orderedlist>
|
||||||
</para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
|
|
||||||
<para>On logout, this module ensures the following:</para>
|
<para>On logout, this module ensures the following:</para>
|
||||||
|
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>If enabled in
|
<listitem><para>If enabled in
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle>
|
<citerefentry><refentrytitle>logind.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry>, all
|
<manvolnum>5</manvolnum></citerefentry>, all processes of the
|
||||||
processes of the session are terminated. If
|
session are terminated. If the last concurrent session of a user
|
||||||
the last concurrent session of a user ends,
|
ends, the user's systemd instance will be terminated too, and so
|
||||||
the user's systemd instance will be
|
will the user's slice unit.</para></listitem>
|
||||||
terminated too, and so will the user's slice
|
|
||||||
unit.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>If the last concurrent session
|
<listitem><para>If the last concurrent session of a user ends,
|
||||||
of a user ends, the
|
the <varname>$XDG_RUNTIME_DIR</varname> directory and all its
|
||||||
<varname>$XDG_RUNTIME_DIR</varname> directory
|
contents are removed, too.</para></listitem>
|
||||||
and all its contents are removed,
|
</orderedlist>
|
||||||
too.</para></listitem>
|
|
||||||
</orderedlist>
|
|
||||||
|
|
||||||
<para>If the system was not booted up with systemd as
|
<para>If the system was not booted up with systemd as init system,
|
||||||
init system, this module does nothing and immediately
|
this module does nothing and immediately returns
|
||||||
returns PAM_SUCCESS.</para>
|
<constant>PAM_SUCCESS</constant>.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist class='pam-directives'>
|
<variablelist class='pam-directives'>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>class=</option></term>
|
<term><option>class=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes a string
|
<listitem><para>Takes a string argument which sets the session
|
||||||
argument which sets the session class.
|
class. The XDG_SESSION_CLASS environmental variable takes
|
||||||
The XDG_SESSION_CLASS environmental variable
|
precedence. One of
|
||||||
takes precedence. One of
|
<literal>user</literal>,
|
||||||
<literal>user</literal>,
|
<literal>greeter</literal>,
|
||||||
<literal>greeter</literal>,
|
<literal>lock-screen</literal> or
|
||||||
<literal>lock-screen</literal> or
|
<literal>background</literal>. See
|
||||||
<literal>background</literal>. See
|
<citerefentry><refentrytitle>sd_session_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_session_get_class</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
for details about the session class.</para></listitem>
|
||||||
for details about the session class.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>type=</option></term>
|
<term><option>type=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes a string
|
<listitem><para>Takes a string argument which sets the session
|
||||||
argument which sets the session type.
|
type. The XDG_SESSION_TYPE environmental variable takes
|
||||||
The XDG_SESSION_TYPE environmental
|
precedence. One of
|
||||||
variable takes precedence. One of
|
<literal>unspecified</literal>,
|
||||||
<literal>unspecified</literal>,
|
<literal>tty</literal>,
|
||||||
<literal>tty</literal>,
|
<literal>x11</literal>,
|
||||||
<literal>x11</literal>,
|
<literal>wayland</literal> or
|
||||||
<literal>wayland</literal> or
|
<literal>mir</literal>. See
|
||||||
<literal>mir</literal>. See
|
<citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_session_get_type</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
for details about the session type.</para></listitem>
|
||||||
for details about the session type.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>debug<optional>=</optional></option></term>
|
<term><option>debug<optional>=</optional></option></term>
|
||||||
|
|
||||||
<listitem><para>Takes an optional
|
<listitem><para>Takes an optional
|
||||||
boolean argument. If yes or without
|
boolean argument. If yes or without
|
||||||
the argument, the module will log
|
the argument, the module will log
|
||||||
debugging information as it
|
debugging information as it
|
||||||
operates.</para></listitem>
|
operates.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Module Types Provided</title>
|
<title>Module Types Provided</title>
|
||||||
|
|
||||||
<para>Only <option>session</option> is provided.</para>
|
<para>Only <option>session</option> is provided.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
|
|
||||||
<para>The following environment variables are set for the processes of the user's session:</para>
|
<para>The following environment variables are set for the
|
||||||
|
processes of the user's session:</para>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_SESSION_ID</varname></term>
|
<term><varname>$XDG_SESSION_ID</varname></term>
|
||||||
|
|
||||||
<listitem><para>A session identifier,
|
<listitem><para>A session identifier, suitable to be used in
|
||||||
suitable to be used in filenames. The
|
filenames. The string itself should be considered opaque,
|
||||||
string itself should be considered
|
although often it is just the audit session ID as reported by
|
||||||
opaque, although often it is just the
|
<filename>/proc/self/sessionid</filename>. Each ID will be
|
||||||
audit session ID as reported by
|
assigned only once during machine uptime. It may hence be used
|
||||||
<filename>/proc/self/sessionid</filename>. Each
|
to uniquely label files or other resources of this
|
||||||
ID will be assigned only once during
|
session.</para></listitem>
|
||||||
machine uptime. It may hence be used
|
</varlistentry>
|
||||||
to uniquely label files or other
|
|
||||||
resources of this
|
|
||||||
session.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_RUNTIME_DIR</varname></term>
|
<term><varname>$XDG_RUNTIME_DIR</varname></term>
|
||||||
|
|
||||||
<listitem><para>Path to a user-private
|
<listitem><para>Path to a user-private user-writable directory
|
||||||
user-writable directory that is bound
|
that is bound to the user login time on the machine. It is
|
||||||
to the user login time on the
|
automatically created the first time a user logs in and
|
||||||
machine. It is automatically created
|
removed on the user's final logout. If a user logs in twice at
|
||||||
the first time a user logs in and
|
the same time, both sessions will see the same
|
||||||
removed on the user's final logout. If
|
<varname>$XDG_RUNTIME_DIR</varname> and the same contents. If
|
||||||
a user logs in twice at the same time,
|
a user logs in once, then logs out again, and logs in again,
|
||||||
both sessions will see the same
|
the directory contents will have been lost in between, but
|
||||||
<varname>$XDG_RUNTIME_DIR</varname>
|
applications should not rely on this behavior and must be able
|
||||||
and the same contents. If a user logs
|
to deal with stale files. To store session-private data in
|
||||||
in once, then logs out again, and logs
|
this directory, the user should include the value of
|
||||||
in again, the directory contents will
|
<varname>$XDG_SESSION_ID</varname> in the filename. This
|
||||||
have been lost in between, but
|
directory shall be used for runtime file system objects such
|
||||||
applications should not rely on this
|
as <constant>AF_UNIX</constant> sockets, FIFOs, PID files and
|
||||||
behavior and must be able to deal with
|
similar. It is guaranteed that this directory is local and
|
||||||
stale files. To store session-private
|
offers the greatest possible file system feature set the
|
||||||
data in this directory, the user
|
operating system provides. For further details see the <ulink
|
||||||
should include the value of
|
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
|
||||||
<varname>$XDG_SESSION_ID</varname> in
|
Base Directory Specification</ulink>.</para></listitem>
|
||||||
the filename. This directory shall be
|
</varlistentry>
|
||||||
used for runtime file system objects
|
|
||||||
such as <constant>AF_UNIX</constant>
|
|
||||||
sockets, FIFOs, PID files and
|
|
||||||
similar. It is guaranteed that this
|
|
||||||
directory is local and offers the
|
|
||||||
greatest possible file system feature
|
|
||||||
set the operating system provides. For
|
|
||||||
further details see the <ulink
|
|
||||||
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
|
|
||||||
Base Directory
|
|
||||||
Specification</ulink>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The following environment variables are read by
|
<para>The following environment variables are read by the module
|
||||||
the module and may be used by the PAM service to pass
|
and may be used by the PAM service to pass metadata to the
|
||||||
metadata to the module:</para>
|
module:</para>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_SESSION_TYPE</varname></term>
|
<term><varname>$XDG_SESSION_TYPE</varname></term>
|
||||||
|
|
||||||
<listitem><para>The session type. This
|
<listitem><para>The session type. This may be used instead of
|
||||||
may be used instead of
|
<option>session=</option> on the module parameter line, and is
|
||||||
<option>session=</option> on the
|
usually preferred.</para></listitem>
|
||||||
module parameter line, and is usually
|
</varlistentry>
|
||||||
preferred.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_SESSION_CLASS</varname></term>
|
<term><varname>$XDG_SESSION_CLASS</varname></term>
|
||||||
|
|
||||||
<listitem><para>The session class. This
|
<listitem><para>The session class. This may be used instead of
|
||||||
may be used instead of
|
<option>class=</option> on the module parameter line, and is
|
||||||
<option>class=</option> on the
|
usually preferred.</para></listitem>
|
||||||
module parameter line, and is usually
|
</varlistentry>
|
||||||
preferred.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_SESSION_DESKTOP</varname></term>
|
<term><varname>$XDG_SESSION_DESKTOP</varname></term>
|
||||||
|
|
||||||
<listitem><para>A single, short
|
<listitem><para>A single, short identifier string for the
|
||||||
identifier string for the desktop
|
desktop environment. This may be used to indicate the session
|
||||||
environment. This may be used to
|
desktop used, where this applies and if this information is
|
||||||
indicate the session desktop used,
|
available. For example: <literal>GNOME</literal>, or
|
||||||
where this applies and if this
|
<literal>KDE</literal>. It is recommended to use the same
|
||||||
information is available. For example:
|
identifiers and capitalization as for
|
||||||
<literal>GNOME</literal>, or
|
<varname>$XDG_CURRENT_DESKTOP</varname>, as defined by the
|
||||||
<literal>KDE</literal>. It is
|
<ulink
|
||||||
recommended to use the same
|
url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
|
||||||
identifiers and capitalization as for
|
Entry Specification</ulink>. (However, note that
|
||||||
<varname>$XDG_CURRENT_DESKTOP</varname>,
|
<varname>$XDG_SESSION_DESKTOP</varname> only takes a single
|
||||||
as defined by the <ulink
|
item, and not a colon-separated list like
|
||||||
url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
|
<varname>$XDG_CURRENT_DESKTOP</varname>.) See
|
||||||
Entry Specification</ulink>. (However,
|
<citerefentry><refentrytitle>sd_session_get_desktop</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
note that
|
for more details.</para></listitem>
|
||||||
<varname>$XDG_SESSION_DESKTOP</varname>
|
</varlistentry>
|
||||||
only takes a single item, and not a
|
|
||||||
colon-separated list like
|
|
||||||
<varname>$XDG_CURRENT_DESKTOP</varname>.)
|
|
||||||
See
|
|
||||||
<citerefentry><refentrytitle>sd_session_get_desktop</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
for more details.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_SEAT</varname></term>
|
<term><varname>$XDG_SEAT</varname></term>
|
||||||
|
|
||||||
<listitem><para>The seat name the session
|
<listitem><para>The seat name the session shall be registered
|
||||||
shall be registered for, if
|
for, if any.</para></listitem>
|
||||||
any.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$XDG_VTNR</varname></term>
|
<term><varname>$XDG_VTNR</varname></term>
|
||||||
|
|
||||||
<listitem><para>The VT number the
|
<listitem><para>The VT number the session shall be registered
|
||||||
session shall be registered for, if
|
for, if any. (Only applies to seats with a VT available, such
|
||||||
any. (Only applies to seats with a VT
|
as <literal>seat0</literal>)</para></listitem>
|
||||||
available, such as
|
</varlistentry>
|
||||||
<literal>seat0</literal>)</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<programlisting>#%PAM-1.0
|
<programlisting>#%PAM-1.0
|
||||||
auth required pam_unix.so
|
auth required pam_unix.so
|
||||||
auth required pam_nologin.so
|
auth required pam_nologin.so
|
||||||
account required pam_unix.so
|
account required pam_unix.so
|
||||||
@@ -316,23 +274,23 @@ password required pam_unix.so
|
|||||||
session required pam_unix.so
|
session required pam_unix.so
|
||||||
session required pam_loginuid.so
|
session required pam_loginuid.so
|
||||||
session required pam_systemd.so</programlisting>
|
session required pam_systemd.so</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>pam_loginuid</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+90
-107
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,126 +23,109 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="resolved.conf" conditional='ENABLE_RESOLVED'
|
<refentry id="resolved.conf" conditional='ENABLE_RESOLVED'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>resolved.conf</title>
|
<title>resolved.conf</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Tom</firstname>
|
<firstname>Tom</firstname>
|
||||||
<surname>Gundersen</surname>
|
<surname>Gundersen</surname>
|
||||||
<email>teg@jklm.no</email>
|
<email>teg@jklm.no</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>resolved.conf</refentrytitle>
|
<refentrytitle>resolved.conf</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>resolved.conf</refname>
|
<refname>resolved.conf</refname>
|
||||||
<refname>resolved.conf.d</refname>
|
<refname>resolved.conf.d</refname>
|
||||||
<refpurpose>Network Name Resolution configuration files</refpurpose>
|
<refpurpose>Network Name Resolution configuration files</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/systemd/resolved.conf</filename></para>
|
<para><filename>/etc/systemd/resolved.conf</filename></para>
|
||||||
<para><filename>/etc/systemd/resolved.conf.d/*.conf</filename></para>
|
<para><filename>/etc/systemd/resolved.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/run/systemd/resolved.conf.d/*.conf</filename></para>
|
<para><filename>/run/systemd/resolved.conf.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></para>
|
<para><filename>/usr/lib/systemd/resolved.conf.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>These configuration files control local DNS and LLMNR
|
<para>These configuration files control local DNS and LLMNR
|
||||||
name resolving.</para>
|
name resolving.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
<xi:include href="standard-conf.xml" xpointer="conf" />
|
<xi:include href="standard-conf.xml" xpointer="conf" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<variablelist class='network-directives'>
|
<variablelist class='network-directives'>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>DNS=</varname></term>
|
<term><varname>DNS=</varname></term>
|
||||||
<listitem><para>A space separated list
|
<listitem><para>A space separated list of IPv4 and IPv6
|
||||||
of IPv4 and IPv6 addresses to be used
|
addresses to be used as system DNS servers. DNS requests are
|
||||||
as system DNS servers. DNS requests
|
sent to one of the listed DNS servers in parallel to any
|
||||||
are sent to one of the listed DNS
|
per-interface DNS servers acquired from
|
||||||
servers in parallel to any
|
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
per-interface DNS servers acquired
|
For compatibility reasons, if set to the empty list the DNS
|
||||||
from
|
servers listed in <filename>/etc/resolv.conf</filename> are
|
||||||
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
|
used, if any are configured there. This setting defaults to
|
||||||
compatibility reasons, if set to the
|
the empty list.</para></listitem>
|
||||||
empty list the DNS servers listed in
|
</varlistentry>
|
||||||
<filename>/etc/resolv.conf</filename>
|
|
||||||
are used, if any are
|
|
||||||
configured there. This setting
|
|
||||||
defaults to the empty
|
|
||||||
list.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>FallbackDNS=</varname></term>
|
<term><varname>FallbackDNS=</varname></term>
|
||||||
<listitem><para>A space separated list
|
<listitem><para>A space separated list of IPv4 and IPv6
|
||||||
of IPv4 and IPv6 addresses to be used
|
addresses to be used as the fallback DNS servers. Any
|
||||||
as the fallback DNS servers. Any
|
per-interface DNS servers obtained from
|
||||||
per-interface DNS servers obtained
|
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
from
|
take precedence over this setting, as do any servers set via
|
||||||
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<varname>DNS=</varname> above or
|
||||||
take precedence over this setting, as
|
<filename>/etc/resolv.conf</filename>. This setting is hence
|
||||||
do any servers set via
|
only used if no other DNS server information is known. If this
|
||||||
<varname>DNS=</varname> above or
|
option is not given, a compiled-in list of DNS servers is used
|
||||||
<filename>/etc/resolv.conf</filename>. This
|
instead.</para></listitem>
|
||||||
setting is hence only used if no other
|
</varlistentry>
|
||||||
DNS server information is known. If
|
|
||||||
this option is not given, a
|
|
||||||
compiled-in list of DNS servers is
|
|
||||||
used instead.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>LLMNR=</varname></term>
|
<term><varname>LLMNR=</varname></term>
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument or
|
||||||
argument or
|
<literal>resolve</literal>. Controls Link-Local Multicast Name
|
||||||
<literal>resolve</literal>. Controls
|
Resolution support (<ulink
|
||||||
Link-Local Multicast Name Resolution support (<ulink
|
url="https://tools.ietf.org/html/rfc4795">RFC 4794</ulink>) on
|
||||||
url="https://tools.ietf.org/html/rfc4795">RFC
|
the local host. If true enables full LLMNR responder and
|
||||||
4794</ulink>) on the local host. If
|
resolver support. If false disable both. If set to
|
||||||
true enables full LLMNR responder and
|
<literal>resolve</literal> only resolving support is enabled,
|
||||||
resolver support. If false disable
|
but responding is disabled. Note that
|
||||||
both. If set to
|
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<literal>resolve</literal> only
|
also maintains per-interface LLMNR settings. LLMNR will be
|
||||||
resolving support is enabled, but
|
enabled on an interface only if the per-interface and the
|
||||||
responding is disabled. Note that
|
global setting is on.</para></listitem>
|
||||||
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
</varlistentry>
|
||||||
also maintains per-interface LLMNR
|
|
||||||
settings. LLMNR will be enabled on an
|
|
||||||
interface only if the per-interface
|
|
||||||
and the global setting is
|
|
||||||
on.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+95
-102
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,134 +22,127 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="runlevel"
|
<refentry id="runlevel"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||||
conditional="HAVE_UTMP">
|
conditional="HAVE_UTMP">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>runlevel</title>
|
<title>runlevel</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>runlevel</refentrytitle>
|
<refentrytitle>runlevel</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>runlevel</refname>
|
<refname>runlevel</refname>
|
||||||
<refpurpose>Print previous and current SysV runlevel</refpurpose>
|
<refpurpose>Print previous and current SysV runlevel</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>runlevel <arg choice="opt" rep="repeat">options</arg></command>
|
<command>runlevel <arg choice="opt" rep="repeat">options</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>runlevel</command> prints the previous
|
<para><command>runlevel</command> prints the previous and current
|
||||||
and current SysV runlevel if they are known.</para>
|
SysV runlevel if they are known.</para>
|
||||||
|
|
||||||
<para>The two runlevel characters are separated by a
|
<para>The two runlevel characters are separated by a single space
|
||||||
single space character. If a runlevel cannot be
|
character. If a runlevel cannot be determined, N is printed
|
||||||
determined, N is printed instead. If neither can be
|
instead. If neither can be determined, the word "unknown" is
|
||||||
determined, the word "unknown" is printed.</para>
|
printed.</para>
|
||||||
|
|
||||||
<para>Unless overridden in the environment, this will
|
<para>Unless overridden in the environment, this will check the
|
||||||
check the utmp database for recent runlevel
|
utmp database for recent runlevel changes.</para>
|
||||||
changes.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following option is understood:</para>
|
<para>The following option is understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--help</option></term>
|
<term><option>--help</option></term>
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help-text" />
|
<xi:include href="standard-options.xml" xpointer="help-text" />
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>If one or both runlevels could be determined, 0
|
<para>If one or both runlevels could be determined, 0 is returned,
|
||||||
is returned, a non-zero failure code otherwise.</para>
|
a non-zero failure code otherwise.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$RUNLEVEL</varname></term>
|
<term><varname>$RUNLEVEL</varname></term>
|
||||||
|
|
||||||
<listitem><para>If
|
<listitem><para>If <varname>$RUNLEVEL</varname> is set,
|
||||||
<varname>$RUNLEVEL</varname> is set,
|
<command>runlevel</command> will print this value as current
|
||||||
<command>runlevel</command> will print
|
runlevel and ignore utmp.</para></listitem>
|
||||||
this value as current runlevel and
|
</varlistentry>
|
||||||
ignore utmp.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$PREVLEVEL</varname></term>
|
<term><varname>$PREVLEVEL</varname></term>
|
||||||
|
|
||||||
<listitem><para>If
|
<listitem><para>If <varname>$PREVLEVEL</varname> is set,
|
||||||
<varname>$PREVLEVEL</varname> is set,
|
<command>runlevel</command> will print this value as previous
|
||||||
<command>runlevel</command> will print
|
runlevel and ignore utmp.</para></listitem>
|
||||||
this value as previous runlevel and
|
</varlistentry>
|
||||||
ignore utmp.</para></listitem>
|
</variablelist>
|
||||||
</varlistentry>
|
</refsect1>
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Files</title>
|
<title>Files</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><filename>/var/run/utmp</filename></term>
|
<term><filename>/var/run/utmp</filename></term>
|
||||||
|
|
||||||
<listitem><para>The utmp database
|
<listitem><para>The utmp database <command>runlevel</command>
|
||||||
<command>runlevel</command> reads the
|
reads the previous and current runlevel
|
||||||
previous and current runlevel
|
from.</para></listitem>
|
||||||
from.</para></listitem>
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</varlistentry>
|
<refsect1>
|
||||||
</variablelist>
|
<title>Notes</title>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<para>This is a legacy command available for compatibility only.
|
||||||
<title>Notes</title>
|
It should not be used anymore, as the concept of runlevels is
|
||||||
|
obsolete.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<para>This is a legacy command available for compatibility
|
<refsect1>
|
||||||
only. It should not be used anymore, as the concept of
|
<title>See Also</title>
|
||||||
runlevels is obsolete.</para>
|
<para>
|
||||||
</refsect1>
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<refsect1>
|
</para>
|
||||||
<title>See Also</title>
|
</refsect1>
|
||||||
<para>
|
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+94
-97
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,71 +22,71 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd-daemon"
|
<refentry id="sd-daemon"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd-daemon</title>
|
<title>sd-daemon</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd-daemon</refentrytitle>
|
<refentrytitle>sd-daemon</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd-daemon</refname>
|
<refname>sd-daemon</refname>
|
||||||
<refname>SD_EMERG</refname>
|
<refname>SD_EMERG</refname>
|
||||||
<refname>SD_ALERT</refname>
|
<refname>SD_ALERT</refname>
|
||||||
<refname>SD_CRIT</refname>
|
<refname>SD_CRIT</refname>
|
||||||
<refname>SD_ERR</refname>
|
<refname>SD_ERR</refname>
|
||||||
<refname>SD_WARNING</refname>
|
<refname>SD_WARNING</refname>
|
||||||
<refname>SD_NOTICE</refname>
|
<refname>SD_NOTICE</refname>
|
||||||
<refname>SD_INFO</refname>
|
<refname>SD_INFO</refname>
|
||||||
<refname>SD_DEBUG</refname>
|
<refname>SD_DEBUG</refname>
|
||||||
<refpurpose>APIs for
|
<refpurpose>APIs for
|
||||||
new-style daemons</refpurpose>
|
new-style daemons</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
|
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>pkg-config --cflags --libs libsystemd</command>
|
<command>pkg-config --cflags --libs libsystemd</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>sd-daemon.h</filename> provide APIs
|
<para><filename>sd-daemon.h</filename> provide APIs for new-style
|
||||||
for new-style daemons, as implemented by the
|
daemons, as implemented by the
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
init system.</para>
|
init system.</para>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for more information about the functions
|
for more information about the functions implemented. In addition
|
||||||
implemented. In addition to these functions, a couple
|
to these functions, a couple of logging prefixes are defined as
|
||||||
of logging prefixes are defined as macros:</para>
|
macros:</para>
|
||||||
|
|
||||||
<programlisting>#define SD_EMERG "<0>" /* system is unusable */
|
<programlisting>#define SD_EMERG "<0>" /* system is unusable */
|
||||||
#define SD_ALERT "<1>" /* action must be taken immediately */
|
#define SD_ALERT "<1>" /* action must be taken immediately */
|
||||||
#define SD_CRIT "<2>" /* critical conditions */
|
#define SD_CRIT "<2>" /* critical conditions */
|
||||||
#define SD_ERR "<3>" /* error conditions */
|
#define SD_ERR "<3>" /* error conditions */
|
||||||
@@ -95,53 +95,50 @@
|
|||||||
#define SD_INFO "<6>" /* informational */
|
#define SD_INFO "<6>" /* informational */
|
||||||
#define SD_DEBUG "<7>" /* debug-level messages */</programlisting>
|
#define SD_DEBUG "<7>" /* debug-level messages */</programlisting>
|
||||||
|
|
||||||
<para>These prefixes are intended to be used in
|
<para>These prefixes are intended to be used in conjunction with
|
||||||
conjunction with stderr-based logging as implemented
|
stderr-based logging as implemented by systemd. If a systemd
|
||||||
by systemd. If a systemd service definition file is
|
service definition file is configured with
|
||||||
configured with
|
<varname>StandardError=journal</varname>,
|
||||||
<varname>StandardError=journal</varname>,
|
<varname>StandardError=syslog</varname> or
|
||||||
<varname>StandardError=syslog</varname> or
|
<varname>StandardError=kmsg</varname>, these prefixes can be used
|
||||||
<varname>StandardError=kmsg</varname>, these prefixes
|
to encode a log level in lines printed. This is similar to the
|
||||||
can be used to encode a log level in lines
|
kernel <function>printk()</function>-style logging. See
|
||||||
printed. This is similar to the kernel
|
<citerefentry><refentrytitle>klogctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
<function>printk()</function>-style logging. See
|
for more information.</para>
|
||||||
<citerefentry><refentrytitle>klogctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
|
||||||
for more information.</para>
|
|
||||||
|
|
||||||
<para>The log levels are identical to
|
<para>The log levels are identical to
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
|
||||||
log level system. To use these prefixes simply prefix
|
log level system. To use these prefixes simply prefix every line
|
||||||
every line with one of these strings. A line that is
|
with one of these strings. A line that is not prefixed will be
|
||||||
not prefixed will be logged at the default log level
|
logged at the default log level SD_INFO.</para>
|
||||||
SD_INFO.</para>
|
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Hello World</title>
|
<title>Hello World</title>
|
||||||
|
|
||||||
<para>A daemon may log with the log level
|
<para>A daemon may log with the log level NOTICE by issuing this
|
||||||
NOTICE by issuing this call:</para>
|
call:</para>
|
||||||
|
|
||||||
<programlisting>fprintf(stderr, SD_NOTICE "Hello World!\n");</programlisting>
|
<programlisting>fprintf(stderr, SD_NOTICE "Hello World!\n");</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" />
|
<xi:include href="libsystemd-pkgconfig.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+113
-120
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,152 +22,145 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd-id128"
|
<refentry id="sd-id128"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd-id128</title>
|
<title>sd-id128</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd-id128</refentrytitle>
|
<refentrytitle>sd-id128</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd-id128</refname>
|
<refname>sd-id128</refname>
|
||||||
<refname>sd_id128_t</refname>
|
<refname>sd_id128_t</refname>
|
||||||
<refname>SD_ID128_MAKE</refname>
|
<refname>SD_ID128_MAKE</refname>
|
||||||
<refname>SD_ID128_CONST_STR</refname>
|
<refname>SD_ID128_CONST_STR</refname>
|
||||||
<refname>SD_ID128_FORMAT_STR</refname>
|
<refname>SD_ID128_FORMAT_STR</refname>
|
||||||
<refname>SD_ID128_FORMAT_VAL</refname>
|
<refname>SD_ID128_FORMAT_VAL</refname>
|
||||||
<refname>sd_id128_equal</refname>
|
<refname>sd_id128_equal</refname>
|
||||||
<refpurpose>APIs for processing 128-bit IDs</refpurpose>
|
<refpurpose>APIs for processing 128-bit IDs</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
|
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>pkg-config --cflags --libs libsystemd</command>
|
<command>pkg-config --cflags --libs libsystemd</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>sd-id128.h</filename> provides APIs to
|
<para><filename>sd-id128.h</filename> provides APIs to process and
|
||||||
process and generate 128-bit ID values. The 128-bit ID
|
generate 128-bit ID values. The 128-bit ID values processed and
|
||||||
values processed and generated by these APIs are a
|
generated by these APIs are a generalization of OSF UUIDs as
|
||||||
generalization of OSF UUIDs as defined by <ulink
|
defined by <ulink url="https://tools.ietf.org/html/rfc4122">RFC
|
||||||
url="https://tools.ietf.org/html/rfc4122">RFC
|
4122</ulink> but use a simpler string format. These functions
|
||||||
4122</ulink> but use a simpler string
|
impose no structure on the used IDs, much unlike OSF UUIDs or
|
||||||
format. These functions impose no structure on the
|
Microsoft GUIDs, but are fully compatible with those types of IDs.
|
||||||
used IDs, much unlike OSF UUIDs or Microsoft GUIDs,
|
</para>
|
||||||
but are fully compatible with those types of IDs.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
|
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and
|
||||||
for more information about the implemented
|
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
functions.</para>
|
for more information about the implemented functions.</para>
|
||||||
|
|
||||||
<para>A 128-bit ID is implemented as the following
|
<para>A 128-bit ID is implemented as the following
|
||||||
union type:</para>
|
union type:</para>
|
||||||
|
|
||||||
<programlisting>typedef union sd_id128 {
|
<programlisting>typedef union sd_id128 {
|
||||||
uint8_t bytes[16];
|
uint8_t bytes[16];
|
||||||
uint64_t qwords[2];
|
uint64_t qwords[2];
|
||||||
} sd_id128_t;</programlisting>
|
} sd_id128_t;</programlisting>
|
||||||
|
|
||||||
<para>This union type allows accessing the 128-bit ID
|
<para>This union type allows accessing the 128-bit ID as 16
|
||||||
as 16 separate bytes or two 64-bit words. It is generally
|
separate bytes or two 64-bit words. It is generally safer to
|
||||||
safer to access the ID components by their 8-bit array
|
access the ID components by their 8-bit array to avoid endianness
|
||||||
to avoid endianness issues. This union is intended to
|
issues. This union is intended to be passed call-by-value (as
|
||||||
be passed call-by-value (as opposed to
|
opposed to call-by-reference) and may be directly manipulated by
|
||||||
call-by-reference) and may be directly manipulated by
|
clients.</para>
|
||||||
clients.</para>
|
|
||||||
|
|
||||||
<para>A couple of macros are defined to denote and
|
<para>A couple of macros are defined to denote and decode 128-bit
|
||||||
decode 128-bit IDs:</para>
|
IDs:</para>
|
||||||
|
|
||||||
<para><function>SD_ID128_MAKE()</function> may be used
|
<para><function>SD_ID128_MAKE()</function> may be used to denote a
|
||||||
to denote a constant 128-bit ID in source code. A
|
constant 128-bit ID in source code. A commonly used idiom is to
|
||||||
commonly used idiom is to assign a name to a 128-bit
|
assign a name to a 128-bit ID using this macro:</para>
|
||||||
ID using this macro:</para>
|
|
||||||
|
|
||||||
<programlisting>#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</programlisting>
|
<programlisting>#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</programlisting>
|
||||||
|
|
||||||
<para><function>SD_ID128_CONST_STR()</function> may be
|
<para><function>SD_ID128_CONST_STR()</function> may be used to
|
||||||
used to convert constant 128-bit IDs into constant
|
convert constant 128-bit IDs into constant strings for output. The
|
||||||
strings for output. The following example code will
|
following example code will output the string
|
||||||
output the string
|
"fc2e22bc6ee647b6b90729ab34a250b1":</para>
|
||||||
"fc2e22bc6ee647b6b90729ab34a250b1":</para>
|
<programlisting>int main(int argc, char *argv[]) {
|
||||||
<programlisting>int main(int argc, char *argv[]) {
|
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
|
||||||
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
|
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para><function>SD_ID128_FORMAT_STR</function> and
|
<para><function>SD_ID128_FORMAT_STR</function> and
|
||||||
<function>SD_ID128_FORMAT_VAL()</function> may be used
|
<function>SD_ID128_FORMAT_VAL()</function> may be used to format a
|
||||||
to format a 128-bit ID in a
|
128-bit ID in a
|
||||||
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
format string, as shown in the following
|
format string, as shown in the following example:</para>
|
||||||
example:</para>
|
|
||||||
|
|
||||||
<programlisting>int main(int argc, char *argv[]) {
|
<programlisting>int main(int argc, char *argv[]) {
|
||||||
sd_id128_t id;
|
sd_id128_t id;
|
||||||
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
|
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
|
||||||
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
|
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para>Use <function>sd_id128_equal()</function> to compare two 128-bit IDs:</para>
|
<para>Use <function>sd_id128_equal()</function> to compare two 128-bit IDs:</para>
|
||||||
|
|
||||||
<programlisting>int main(int argc, char *argv[]) {
|
<programlisting>int main(int argc, char *argv[]) {
|
||||||
sd_id128_t a, b, c;
|
sd_id128_t a, b, c;
|
||||||
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
|
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
|
||||||
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
|
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
|
||||||
c = a;
|
c = a;
|
||||||
assert(sd_id128_equal(a, c));
|
assert(sd_id128_equal(a, c));
|
||||||
assert(!sd_id128_equal(a, b));
|
assert(!sd_id128_equal(a, b));
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para>Note that new, randomized IDs may be generated
|
<para>Note that new, randomized IDs may be generated with
|
||||||
with
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
<option>--new-id</option> option.</para>
|
||||||
<option>--new-id</option> option.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" />
|
<xi:include href="libsystemd-pkgconfig.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_to_string</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+87
-89
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,106 +22,104 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd-journal"
|
<refentry id="sd-journal"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd-journal</title>
|
<title>sd-journal</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd-journal</refentrytitle>
|
<refentrytitle>sd-journal</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd-journal</refname>
|
<refname>sd-journal</refname>
|
||||||
<refpurpose>APIs for submitting and querying log entries to and from the journal</refpurpose>
|
<refpurpose>APIs for submitting and querying log entries to and
|
||||||
</refnamediv>
|
from the journal</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
|
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>pkg-config --cflags --libs libsystemd</command>
|
<command>pkg-config --cflags --libs libsystemd</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>sd-journal.h</filename> provides APIs
|
<para><filename>sd-journal.h</filename> provides APIs to submit
|
||||||
to submit and query log entries. The APIs exposed act
|
and query log entries. The APIs exposed act both as client for the
|
||||||
both as client for the
|
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
journal service and as parser for the journal files on disk.
|
||||||
journal service and as parser for the journal files
|
</para>
|
||||||
on disk.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
and
|
and
|
||||||
<citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for more information about the functions
|
for more information about the functions implemented.</para>
|
||||||
implemented.</para>
|
|
||||||
|
|
||||||
<para>Command line access for submitting entries to
|
<para>Command line access for submitting entries to the journal is
|
||||||
the journal is available with the
|
available with the
|
||||||
<citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-cat</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
tool. Command line access for querying entries from
|
tool. Command line access for querying entries from the journal is
|
||||||
the journal is available with the
|
available with the
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
tool.</para>
|
tool.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" />
|
<xi:include href="libsystemd-pkgconfig.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cutoff_monotonic_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_usage</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_catalog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+93
-96
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,117 +22,114 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd-login" conditional='HAVE_PAM'
|
<refentry id="sd-login" conditional='HAVE_PAM'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd-login</title>
|
<title>sd-login</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd-login</refentrytitle>
|
<refentrytitle>sd-login</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd-login</refname>
|
<refname>sd-login</refname>
|
||||||
<refpurpose>APIs for
|
<refpurpose>APIs for
|
||||||
tracking logins</refpurpose>
|
tracking logins</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
|
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>pkg-config --cflags --libs libsystemd</command>
|
<command>pkg-config --cflags --libs libsystemd</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>sd-login.h</filename> provides APIs to
|
<para><filename>sd-login.h</filename> provides APIs to introspect
|
||||||
introspect and monitor seat, login session and user
|
and monitor seat, login session and user status information on the
|
||||||
status information on the local system. </para>
|
local system. </para>
|
||||||
|
|
||||||
<para>See <ulink
|
<para>See <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
|
url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
|
||||||
on Linux</ulink> for an introduction into multi-seat
|
on Linux</ulink> for an introduction into multi-seat support on
|
||||||
support on Linux, the background for this set of APIs.</para>
|
Linux, the background for this set of APIs.</para>
|
||||||
|
|
||||||
<para>Note that these APIs only allow purely passive access
|
<para>Note that these APIs only allow purely passive access and
|
||||||
and monitoring of seats, sessions and users. To
|
monitoring of seats, sessions and users. To actively make changes
|
||||||
actively make changes to the seat configuration,
|
to the seat configuration, terminate login sessions, or switch
|
||||||
terminate login sessions, or switch session on a seat
|
session on a seat you need to utilize the D-Bus API of
|
||||||
you need to utilize the D-Bus API of
|
systemd-logind, instead.</para>
|
||||||
systemd-logind, instead.</para>
|
|
||||||
|
|
||||||
<para>These functions synchronously access data in
|
<para>These functions synchronously access data in
|
||||||
<filename>/proc</filename>,
|
<filename>/proc</filename>, <filename>/sys/fs/cgroup</filename>
|
||||||
<filename>/sys/fs/cgroup</filename> and
|
and <filename>/run</filename>. All of these are virtual file
|
||||||
<filename>/run</filename>. All of these are virtual
|
systems, hence the runtime cost of the accesses is relatively
|
||||||
file systems, hence the runtime cost of the accesses
|
cheap.</para>
|
||||||
is relatively cheap.</para>
|
|
||||||
|
|
||||||
<para>It is possible (and often a very good choice) to
|
<para>It is possible (and often a very good choice) to mix calls
|
||||||
mix calls to the synchronous interface of
|
to the synchronous interface of <filename>sd-login.h</filename>
|
||||||
<filename>sd-login.h</filename> with the asynchronous
|
with the asynchronous D-Bus interface of systemd-logind. However,
|
||||||
D-Bus interface of systemd-logind. However, if this is
|
if this is done you need to think a bit about possible races since
|
||||||
done you need to think a bit about possible races
|
the stream of events from D-Bus and from
|
||||||
since the stream of events from D-Bus and from
|
<filename>sd-login.h</filename> interfaces such as the login
|
||||||
<filename>sd-login.h</filename> interfaces such as the
|
monitor are asynchronous and not ordered against each
|
||||||
login monitor are asynchronous and not ordered against
|
other.</para>
|
||||||
each other.</para>
|
|
||||||
|
|
||||||
<para>If the functions return string arrays, these are
|
<para>If the functions return string arrays, these are generally
|
||||||
generally <constant>NULL</constant> terminated and need to be freed by the
|
<constant>NULL</constant> terminated and need to be freed by the
|
||||||
caller with the libc
|
caller with the libc
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
call after use, including the strings referenced
|
call after use, including the strings referenced therein.
|
||||||
therein. Similarly, individual strings returned need to
|
Similarly, individual strings returned need to be freed, as
|
||||||
be freed, as well.</para>
|
well.</para>
|
||||||
|
|
||||||
<para>As a special exception, instead of an empty
|
<para>As a special exception, instead of an empty string array
|
||||||
string array <constant>NULL</constant> may be returned, which should be
|
<constant>NULL</constant> may be returned, which should be treated
|
||||||
treated equivalent to an empty string array.</para>
|
equivalent to an empty string array.</para>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for more information about the functions
|
for more information about the functions
|
||||||
implemented.</para>
|
implemented.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" />
|
<xi:include href="libsystemd-pkgconfig.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_seat_get_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_login_monitor_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+57
-59
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,76 +22,74 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd_booted"
|
<refentry id="sd_booted"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_booted</title>
|
<title>sd_booted</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_booted</refentrytitle>
|
<refentrytitle>sd_booted</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_booted</refname>
|
<refname>sd_booted</refname>
|
||||||
<refpurpose>Test whether the system is running the systemd init system</refpurpose>
|
<refpurpose>Test whether the system is running the systemd init system</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_booted</function></funcdef>
|
<funcdef>int <function>sd_booted</function></funcdef>
|
||||||
<paramdef>void</paramdef>
|
<paramdef>void</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
<para><function>sd_booted()</function> checks whether
|
<para><function>sd_booted()</function> checks whether the system
|
||||||
the system was booted up using the systemd init system.</para>
|
was booted up using the systemd init system.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On failure, this call returns a negative
|
<para>On failure, this call returns a negative errno-style error
|
||||||
errno-style error code. If the system was booted up
|
code. If the system was booted up with systemd as init system,
|
||||||
with systemd as init system, this call returns a
|
this call returns a positive return value, zero otherwise.</para>
|
||||||
positive return value, zero otherwise.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
||||||
|
|
||||||
<para>Internally, this function checks whether the
|
<para>Internally, this function checks whether the directory
|
||||||
directory <filename>/run/systemd/system/</filename>
|
<filename>/run/systemd/system/</filename> exists. A simple check
|
||||||
exists. A simple check like this can also be
|
like this can also be implemented trivially in shell or any other
|
||||||
implemented trivially in shell or any other
|
language.</para>
|
||||||
language.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,130 +23,124 @@
|
|||||||
|
|
||||||
<refentry id="sd_bus_message_get_cookie" conditional="ENABLE_KDBUS">
|
<refentry id="sd_bus_message_get_cookie" conditional="ENABLE_KDBUS">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_bus_message_get_cookie</title>
|
<title>sd_bus_message_get_cookie</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_bus_message_get_cookie</refentrytitle>
|
<refentrytitle>sd_bus_message_get_cookie</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_bus_message_get_cookie</refname>
|
<refname>sd_bus_message_get_cookie</refname>
|
||||||
<refname>sd_bus_message_get_reply_cookie</refname>
|
<refname>sd_bus_message_get_reply_cookie</refname>
|
||||||
<refpurpose>Returns the transaction cookie of a message</refpurpose>
|
<refpurpose>Returns the transaction cookie of a message</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_message_get_cookie</function></funcdef>
|
<funcdef>int <function>sd_bus_message_get_cookie</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_message_get_reply_cookie</function></funcdef>
|
<funcdef>int <function>sd_bus_message_get_reply_cookie</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>cookie</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_bus_message_get_cookie()</function> returns
|
<para><function>sd_bus_message_get_cookie()</function> returns the
|
||||||
the transaction cookie of a message. The cookie
|
transaction cookie of a message. The cookie uniquely identifies a
|
||||||
uniquely identifies a message within each bus peer,
|
message within each bus peer, but is not globally unique. It is
|
||||||
but is not globally unique. It is assigned when a
|
assigned when a message is sent.</para>
|
||||||
message is sent.</para>
|
|
||||||
|
|
||||||
<para><function>sd_bus_message_get_reply_cookie()</function>
|
<para><function>sd_bus_message_get_reply_cookie()</function>
|
||||||
returns the transaction cookie of the message the
|
returns the transaction cookie of the message the specified
|
||||||
specified message is a response to. When a reply
|
message is a response to. When a reply message is generated for a
|
||||||
message is generated for a method call message, its
|
method call message, its cookie is copied over into this field.
|
||||||
cookie is copied over into this field. Note that while
|
Note that while every message that is transferred is identified by
|
||||||
every message that is transferred is identified by a
|
a cookie, only response messages carry a reply cookie
|
||||||
cookie, only response messages carry a reply cookie
|
field.</para>
|
||||||
field.</para>
|
|
||||||
|
|
||||||
<para>Both functions take a message object as first
|
<para>Both functions take a message object as first parameter and
|
||||||
parameter and a place to store the 64-bit cookie
|
a place to store the 64-bit cookie in.</para>
|
||||||
in.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, these calls return 0 or a positive
|
<para>On success, these calls return 0 or a positive integer. On
|
||||||
integer. On failure, these calls return a negative
|
failure, these calls return a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
|
|
||||||
<para>On success, the cookie/reply cookie is returned
|
<para>On success, the cookie/reply cookie is returned in the
|
||||||
in the specified 64-bit unsigned integer variable.</para>
|
specified 64-bit unsigned integer variable.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Errors</title>
|
<title>Errors</title>
|
||||||
|
|
||||||
<para>Returned errors may indicate the following problems:</para>
|
<para>Returned errors may indicate the following problems:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EINVAL</constant></term>
|
<term><constant>-EINVAL</constant></term>
|
||||||
|
|
||||||
<listitem><para>A specified parameter
|
<listitem><para>A specified parameter
|
||||||
is invalid.</para></listitem>
|
is invalid.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-ENODATA</constant></term>
|
<term><constant>-ENODATA</constant></term>
|
||||||
|
|
||||||
<listitem><para>No cookie has been
|
<listitem><para>No cookie has been assigned to this message.
|
||||||
assigned to this message. This either
|
This either indicates that the message has not been sent yet
|
||||||
indicates that the message has not
|
and hence has no cookie assigned, or that the message is not a
|
||||||
been sent yet and hence has no cookie
|
method response message and hence carries a reply cookie
|
||||||
assigned, or that the message is not a
|
field.</para></listitem>
|
||||||
method response message and hence
|
</varlistentry>
|
||||||
carries a reply cookie
|
</variablelist>
|
||||||
field.</para></listitem>
|
</refsect1>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_bus_message_get_cookie()</function>
|
<para>The <function>sd_bus_message_get_cookie()</function> and
|
||||||
and <function>sd_bus_message_get_reply_cookie()</function>
|
<function>sd_bus_message_get_reply_cookie()</function> interfaces
|
||||||
interfaces are available as a shared library, which can
|
are available as a shared library, which can be compiled and
|
||||||
be compiled and linked to with the
|
linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,168 +23,159 @@
|
|||||||
|
|
||||||
<refentry id="sd_bus_message_get_monotonic_usec" conditional="ENABLE_KDBUS">
|
<refentry id="sd_bus_message_get_monotonic_usec" conditional="ENABLE_KDBUS">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_bus_message_get_monotonic_usec</title>
|
<title>sd_bus_message_get_monotonic_usec</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle>
|
<refentrytitle>sd_bus_message_get_monotonic_usec</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_bus_message_get_monotonic_usec</refname>
|
<refname>sd_bus_message_get_monotonic_usec</refname>
|
||||||
<refname>sd_bus_message_get_realtime_usec</refname>
|
<refname>sd_bus_message_get_realtime_usec</refname>
|
||||||
<refname>sd_bus_message_get_seqnum</refname>
|
<refname>sd_bus_message_get_seqnum</refname>
|
||||||
<refpurpose>Retrieve the sender timestamps and sequence number of a message</refpurpose>
|
<refpurpose>Retrieve the sender timestamps and sequence number of a message</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_message_get_monotonic_usec</function></funcdef>
|
<funcdef>int <function>sd_bus_message_get_monotonic_usec</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_message_get_realtime_usec</function></funcdef>
|
<funcdef>int <function>sd_bus_message_get_realtime_usec</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_message_get_seqnum</function></funcdef>
|
<funcdef>int <function>sd_bus_message_get_seqnum</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>seqnum</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>seqnum</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_bus_message_get_monotonic_usec()</function>
|
<para><function>sd_bus_message_get_monotonic_usec()</function>
|
||||||
returns the monotonic timestamp of the time the
|
returns the monotonic timestamp of the time the message was sent.
|
||||||
message was sent. This value is in microseconds since
|
This value is in microseconds since the
|
||||||
the <literal>CLOCK_MONOTONIC</literal> epoch, see
|
<constant>CLOCK_MONOTONIC</constant> epoch, see
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
for details.</para>
|
for details.</para>
|
||||||
|
|
||||||
<para>Similar,
|
<para>Similar,
|
||||||
<function>sd_bus_message_get_realtime_usec()</function>
|
<function>sd_bus_message_get_realtime_usec()</function> returns
|
||||||
returns the realtime (wallclock) timestamp of the time
|
the realtime (wallclock) timestamp of the time the message was
|
||||||
the message was sent. This value is in microseconds
|
sent. This value is in microseconds since Jan 1st, 1970, i.e. in
|
||||||
since Jan 1st, 1970, i.e. in the
|
the <constant>CLOCK_REALTIME</constant> clock.</para>
|
||||||
<literal>CLOCK_REALTIME</literal> clock.</para>
|
|
||||||
|
|
||||||
<para><function>sd_bus_message_get_seqnum()</function>
|
<para><function>sd_bus_message_get_seqnum()</function> returns the
|
||||||
returns the kernel-assigned sequence number of the
|
kernel-assigned sequence number of the message. The kernel assigns
|
||||||
message. The kernel assigns a global, monotonically
|
a global, monotonically increasing sequence number to all messages
|
||||||
increasing sequence number to all messages transmitted
|
transmitted on the local system, at the time the message was sent.
|
||||||
on the local system, at the time the message was
|
This sequence number is useful for determining message send order,
|
||||||
sent. This sequence number is useful for determining
|
even across different busses of the local system. The sequence
|
||||||
message send order, even across different busses of
|
number combined with the boot ID of the system (as returned by
|
||||||
the local system. The sequence number combined with
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
|
||||||
the boot ID of the system (as returned by
|
is a suitable globally unique identifier for bus messages.</para>
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
|
|
||||||
is a suitable globally unique identifier for bus
|
|
||||||
messages.</para>
|
|
||||||
|
|
||||||
<para>Note that the sending order and receiving order
|
<para>Note that the sending order and receiving order of messages
|
||||||
of messages might differ, in particular for broadcast
|
might differ, in particular for broadcast messages. This means
|
||||||
messages. This means that the sequence number and the
|
that the sequence number and the timestamps of messages a client
|
||||||
timestamps of messages a client reads are not
|
reads are not necessarily monotonically increasing.</para>
|
||||||
necessarily monotonically increasing.</para>
|
|
||||||
|
|
||||||
<para>These timestamps and the sequence number are
|
<para>These timestamps and the sequence number are attached to
|
||||||
attached to each message by the kernel and cannot be
|
each message by the kernel and cannot be manipulated by the
|
||||||
manipulated by the sender.</para>
|
sender.</para>
|
||||||
|
|
||||||
<para>Note that these timestamps are only available on
|
<para>Note that these timestamps are only available on some bus
|
||||||
some bus transports, and only after support for them
|
transports, and only after support for them has been negotiated
|
||||||
has been negotiated with the
|
with the
|
||||||
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
call.</para>
|
call.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, these calls return 0 or a positive
|
<para>On success, these calls return 0 or a positive integer. On
|
||||||
integer. On failure, these calls return a negative
|
failure, these calls return a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
|
|
||||||
<para>On success, the timestamp or sequence number is
|
<para>On success, the timestamp or sequence number is returned in
|
||||||
returned in the specified 64-bit unsigned integer
|
the specified 64-bit unsigned integer variable.</para>
|
||||||
variable.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Errors</title>
|
<title>Errors</title>
|
||||||
|
|
||||||
<para>Returned errors may indicate the following problems:</para>
|
<para>Returned errors may indicate the following problems:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EINVAL</constant></term>
|
<term><constant>-EINVAL</constant></term>
|
||||||
|
|
||||||
<listitem><para>A specified parameter
|
<listitem><para>A specified parameter is
|
||||||
is invalid.</para></listitem>
|
invalid.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-ENODATA</constant></term>
|
<term><constant>-ENODATA</constant></term>
|
||||||
|
|
||||||
<listitem><para>No timestamp or
|
<listitem><para>No timestamp or sequence number information is
|
||||||
sequence number information is
|
attached to the passed message. This error is returned if the
|
||||||
attached to the passed message. This
|
underlying transport does not support timestamping or
|
||||||
error is returned if the underlying
|
assigning of sequence numbers, or if this feature has not been
|
||||||
transport does not support
|
negotiated with
|
||||||
timestamping or assigning of sequence
|
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
|
||||||
numbers, or if this feature has not
|
</varlistentry>
|
||||||
been negotiated with
|
</variablelist>
|
||||||
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para></listitem>
|
</refsect1>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The
|
<para>The
|
||||||
<function>sd_bus_message_get_monotonic_usec()</function>,
|
<function>sd_bus_message_get_monotonic_usec()</function>,
|
||||||
<function>sd_bus_message_get_realtime_usec()</function>,
|
<function>sd_bus_message_get_realtime_usec()</function>, and
|
||||||
and <function>sd_bus_message_get_seqnum()</function>
|
<function>sd_bus_message_get_seqnum()</function> interfaces are
|
||||||
interfaces are available as a shared library, which
|
available as a shared library, which can be compiled and linked to
|
||||||
can be compiled and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_bus_negotiate_timestamp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+146
-164
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,206 +23,188 @@
|
|||||||
|
|
||||||
<refentry id="sd_bus_request_name" conditional="ENABLE_KDBUS">
|
<refentry id="sd_bus_request_name" conditional="ENABLE_KDBUS">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_bus_request_name</title>
|
<title>sd_bus_request_name</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_bus_request_name</refentrytitle>
|
<refentrytitle>sd_bus_request_name</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_bus_request_name</refname>
|
<refname>sd_bus_request_name</refname>
|
||||||
<refname>sd_bus_release_name</refname>
|
<refname>sd_bus_release_name</refname>
|
||||||
<refpurpose>Request or release a well-known name on a bus</refpurpose>
|
<refpurpose>Request or release a well-known name on a bus</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_request_name</function></funcdef>
|
<funcdef>int <function>sd_bus_request_name</function></funcdef>
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>name</parameter></paramdef>
|
<paramdef>const char *<parameter>name</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>flags</parameter></paramdef>
|
<paramdef>uint64_t <parameter>flags</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_bus_release_name</function></funcdef>
|
<funcdef>int <function>sd_bus_release_name</function></funcdef>
|
||||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>name</parameter></paramdef>
|
<paramdef>const char *<parameter>name</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_bus_request_name()</function> requests
|
<para><function>sd_bus_request_name()</function> requests a
|
||||||
a well-known name on a bus. It takes a bus connection,
|
well-known name on a bus. It takes a bus connection, a valid bus
|
||||||
a valid bus name and a flags parameter. The flags
|
name and a flags parameter. The flags parameter is a combination
|
||||||
parameter is a combination of the following
|
of the following flags:</para>
|
||||||
flags:</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname></term>
|
<term><varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname></term>
|
||||||
|
|
||||||
<listitem><para>After acquiring the
|
<listitem><para>After acquiring the name successfully, permit
|
||||||
name successfully, permit other peers
|
other peers to take over the name when they try to acquire it
|
||||||
to take over the name when they try to
|
with the <varname>SD_BUS_NAME_REPLACE_EXISTING</varname> flag
|
||||||
acquire it with the
|
set. If <varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname> is
|
||||||
<varname>SD_BUS_NAME_REPLACE_EXISTING</varname>
|
not set on the original request, such a request by other peers
|
||||||
flag set. If
|
will be denied.</para></listitem>
|
||||||
<varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname>
|
</varlistentry>
|
||||||
is not set on the original request,
|
|
||||||
such a request by other peers will be
|
|
||||||
denied.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SD_BUS_NAME_REPLACE_EXISTING</varname></term>
|
<term><varname>SD_BUS_NAME_REPLACE_EXISTING</varname></term>
|
||||||
|
|
||||||
<listitem><para>Take over the name
|
<listitem><para>Take over the name if it is already acquired
|
||||||
if it is already acquired by another
|
by another peer, and that other peer has permitted takeover by
|
||||||
peer, and that other peer has permitted
|
setting <varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname> while
|
||||||
takeover by setting
|
acquiring it.</para></listitem>
|
||||||
<varname>SD_BUS_NAME_ALLOW_REPLACEMENT</varname>
|
</varlistentry>
|
||||||
while acquiring it.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>SD_BUS_NAME_QUEUE</varname></term>
|
<term><varname>SD_BUS_NAME_QUEUE</varname></term>
|
||||||
|
|
||||||
<listitem><para>Queue the acquisition
|
<listitem><para>Queue the acquisition of the name when the
|
||||||
of the name when the name is already
|
name is already taken.</para></listitem>
|
||||||
taken.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
</variablelist>
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
<para><function>sd_bus_release_name()</function> releases
|
<para><function>sd_bus_release_name()</function> releases an
|
||||||
an acquired well-known name. It takes a bus connection
|
acquired well-known name. It takes a bus connection and a valid
|
||||||
and a valid bus name as parameters.</para>
|
bus name as parameters.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, these calls return 0 or a positive
|
<para>On success, these calls return 0 or a positive integer. On
|
||||||
integer. On failure, these calls return a negative
|
failure, these calls return a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
|
|
||||||
<para>If <varname>SD_BUS_NAME_QUEUE</varname> is
|
<para>If <varname>SD_BUS_NAME_QUEUE</varname> is specified,
|
||||||
specified, <function>sd_bus_request_name()</function>
|
<function>sd_bus_request_name()</function> will return 0 when the
|
||||||
will return 0 when the name is already taken by
|
name is already taken by another peer and the client has been
|
||||||
another peer and the client has been added to the
|
added to the queue for the name. In that case, the caller can
|
||||||
queue for the name. In that case, the caller can
|
subscribe to <literal>NameOwnerChanged</literal> signals to be
|
||||||
subscribe to <literal>NameOwnerChanged</literal>
|
notified when the name is successfully acquired.
|
||||||
signals to be notified when the name is successfully
|
<function>sd_bus_request_name()</function> returns > 0 when the
|
||||||
acquired. <function>sd_bus_request_name()</function>
|
name has immediately been acquired successfully.</para>
|
||||||
returns > 0 when the name has immediately been
|
</refsect1>
|
||||||
acquired successfully.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Errors</title>
|
<title>Errors</title>
|
||||||
|
|
||||||
<para>Returned errors may indicate the following problems:</para>
|
<para>Returned errors may indicate the following problems:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EALREADY</constant></term>
|
<term><constant>-EALREADY</constant></term>
|
||||||
|
|
||||||
<listitem><para>The caller already is
|
<listitem><para>The caller already is the owner of the
|
||||||
the owner of the specified
|
specified name.</para></listitem>
|
||||||
name.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EEXIST</constant></term>
|
<term><constant>-EEXIST</constant></term>
|
||||||
|
|
||||||
<listitem><para>The name has already
|
<listitem><para>The name has already been acquired by a
|
||||||
been acquired by a different peer, and
|
different peer, and SD_BUS_NAME_REPLACE_EXISTING was not
|
||||||
SD_BUS_NAME_REPLACE_EXISTING was not
|
specified or the other peer did not specify
|
||||||
specified or the other peer did not
|
SD_BUS_NAME_ALLOW_REPLACEMENT while acquiring the
|
||||||
specify SD_BUS_NAME_ALLOW_REPLACEMENT
|
name.</para></listitem>
|
||||||
while acquiring the
|
</varlistentry>
|
||||||
name.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-ESRCH</constant></term>
|
<term><constant>-ESRCH</constant></term>
|
||||||
|
|
||||||
<listitem><para>It was attempted to
|
<listitem><para>It was attempted to release a name that is
|
||||||
release a name that is currently not
|
currently not registered on the bus.</para></listitem>
|
||||||
registered on the
|
</varlistentry>
|
||||||
bus.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EADDRINUSE</constant></term>
|
<term><constant>-EADDRINUSE</constant></term>
|
||||||
|
|
||||||
<listitem><para>It was attempted to
|
<listitem><para>It was attempted to release a name that is
|
||||||
release a name that is owned by a
|
owned by a different peer on the bus.</para></listitem>
|
||||||
different peer on the
|
</varlistentry>
|
||||||
bus.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-EINVAL</constant></term>
|
<term><constant>-EINVAL</constant></term>
|
||||||
|
|
||||||
<listitem><para>A specified parameter
|
<listitem><para>A specified parameter is
|
||||||
is invalid.</para></listitem>
|
invalid.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-ENOTCONN</constant></term>
|
<term><constant>-ENOTCONN</constant></term>
|
||||||
|
|
||||||
<listitem><para>The bus connection has
|
<listitem><para>The bus connection has been
|
||||||
been disconnected.</para></listitem>
|
disconnected.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><constant>-ECHILD</constant></term>
|
<term><constant>-ECHILD</constant></term>
|
||||||
|
|
||||||
<listitem><para>The bus connection has
|
<listitem><para>The bus connection has been created in a
|
||||||
been created in a different process
|
different process than the current one.</para></listitem>
|
||||||
than the current one.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
</variablelist>
|
||||||
</variablelist>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_bus_acquire_name()</function>
|
<para>The <function>sd_bus_acquire_name()</function> and
|
||||||
and <function>sd_bus_release_name()</function>
|
<function>sd_bus_release_name()</function> interfaces are
|
||||||
interfaces are available as a shared library, which can
|
available as a shared library, which can be compiled and linked to
|
||||||
be compiled and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_bus_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+94
-94
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,119 +23,119 @@
|
|||||||
|
|
||||||
<refentry id="sd_get_seats" conditional='HAVE_PAM'>
|
<refentry id="sd_get_seats" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_get_seats</title>
|
<title>sd_get_seats</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_get_seats</refentrytitle>
|
<refentrytitle>sd_get_seats</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_get_seats</refname>
|
<refname>sd_get_seats</refname>
|
||||||
<refname>sd_get_sessions</refname>
|
<refname>sd_get_sessions</refname>
|
||||||
<refname>sd_get_uids</refname>
|
<refname>sd_get_uids</refname>
|
||||||
<refname>sd_get_machine_names</refname>
|
<refname>sd_get_machine_names</refname>
|
||||||
<refpurpose>Determine available seats, sessions, logged in users and virtual machines/containers</refpurpose>
|
<refpurpose>Determine available seats, sessions, logged in users and virtual machines/containers</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_get_seats</function></funcdef>
|
<funcdef>int <function>sd_get_seats</function></funcdef>
|
||||||
<paramdef>char ***<parameter>seats</parameter></paramdef>
|
<paramdef>char ***<parameter>seats</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_get_sessions</function></funcdef>
|
<funcdef>int <function>sd_get_sessions</function></funcdef>
|
||||||
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_get_uids</function></funcdef>
|
<funcdef>int <function>sd_get_uids</function></funcdef>
|
||||||
<paramdef>uid_t **<parameter>users</parameter></paramdef>
|
<paramdef>uid_t **<parameter>users</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_get_machine_names</function></funcdef>
|
<funcdef>int <function>sd_get_machine_names</function></funcdef>
|
||||||
<paramdef>char ***<parameter>machines</parameter></paramdef>
|
<paramdef>char ***<parameter>machines</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_get_seats()</function> may be used
|
<para><function>sd_get_seats()</function> may be used to determine
|
||||||
to determine all currently available local
|
all currently available local seats. Returns a
|
||||||
seats. Returns a <constant>NULL</constant> terminated array of seat
|
<constant>NULL</constant> terminated array of seat identifiers.
|
||||||
identifiers. The returned array and all strings it
|
The returned array and all strings it references need to be freed
|
||||||
references need to be freed with the libc
|
with the libc
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
call after use. Note that instead of an empty array
|
call after use. Note that instead of an empty array
|
||||||
<constant>NULL</constant> may be returned and should be considered
|
<constant>NULL</constant> may be returned and should be considered
|
||||||
equivalent to an empty array.</para>
|
equivalent to an empty array.</para>
|
||||||
|
|
||||||
<para>Similarly, <function>sd_get_sessions()</function> may
|
<para>Similarly, <function>sd_get_sessions()</function> may be
|
||||||
be used to determine all current login sessions.</para>
|
used to determine all current login sessions.</para>
|
||||||
|
|
||||||
<para>Similarly, <function>sd_get_uids()</function> may
|
<para>Similarly, <function>sd_get_uids()</function> may be used to
|
||||||
be used to determine all Unix users who currently have login sessions.</para>
|
determine all Unix users who currently have login sessions.</para>
|
||||||
|
|
||||||
<para>Similarly,
|
<para>Similarly, <function>sd_get_machine_names()</function> may
|
||||||
<function>sd_get_machine_names()</function> may be
|
be used to determine all current virtual machines and containers
|
||||||
used to determine all current virtual machines and
|
on the system.</para>
|
||||||
containers on the system.</para>
|
|
||||||
|
|
||||||
<para>Note that the returned lists are not sorted and in an undefined order.</para>
|
<para>Note that the returned lists are not sorted and in an
|
||||||
</refsect1>
|
undefined order.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, <function>sd_get_seats()</function>,
|
<para>On success, <function>sd_get_seats()</function>,
|
||||||
<function>sd_get_sessions()</function>,
|
<function>sd_get_sessions()</function>,
|
||||||
<function>sd_get_uids()</function> and
|
<function>sd_get_uids()</function> and
|
||||||
<function>sd_get_machine_names()</function> return the
|
<function>sd_get_machine_names()</function> return the number of
|
||||||
number of entries in the arrays. On failure, these
|
entries in the arrays. On failure, these calls return a negative
|
||||||
calls return a negative errno-style error code.</para>
|
errno-style error code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_get_seats()</function>,
|
<para>The <function>sd_get_seats()</function>,
|
||||||
<function>sd_get_sessions()</function>,
|
<function>sd_get_sessions()</function>,
|
||||||
<function>sd_get_uids()</function> and
|
<function>sd_get_uids()</function> and
|
||||||
<function>sd_get_machine_names()</function> interfaces
|
<function>sd_get_machine_names()</function> interfaces are
|
||||||
are available as a shared library, which can be compiled
|
available as a shared library, which can be compiled and linked to
|
||||||
and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,115 +23,107 @@
|
|||||||
|
|
||||||
<refentry id="sd_id128_get_machine">
|
<refentry id="sd_id128_get_machine">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_id128_get_machine</title>
|
<title>sd_id128_get_machine</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_id128_get_machine</refentrytitle>
|
<refentrytitle>sd_id128_get_machine</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_id128_get_machine</refname>
|
<refname>sd_id128_get_machine</refname>
|
||||||
<refname>sd_id128_get_boot</refname>
|
<refname>sd_id128_get_boot</refname>
|
||||||
<refpurpose>Retrieve 128-bit IDs</refpurpose>
|
<refpurpose>Retrieve 128-bit IDs</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_id128_get_machine</function></funcdef>
|
<funcdef>int <function>sd_id128_get_machine</function></funcdef>
|
||||||
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_id128_get_boot</function></funcdef>
|
<funcdef>int <function>sd_id128_get_boot</function></funcdef>
|
||||||
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_id128_get_machine()</function>
|
<para><function>sd_id128_get_machine()</function> returns the
|
||||||
returns the machine ID of the executing host. This
|
machine ID of the executing host. This reads and parses the
|
||||||
reads and parses the
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
file. This function caches the machine ID internally to make
|
||||||
file. This function caches the machine ID internally
|
retrieving the machine ID a cheap operation.</para>
|
||||||
to make retrieving the machine ID a cheap
|
|
||||||
operation.</para>
|
|
||||||
|
|
||||||
<para><function>sd_id128_get_boot()</function> returns
|
<para><function>sd_id128_get_boot()</function> returns the boot ID
|
||||||
the boot ID of the executing kernel. This reads and
|
of the executing kernel. This reads and parses the
|
||||||
parses the
|
<filename>/proc/sys/kernel/random/boot_id</filename> file exposed
|
||||||
<filename>/proc/sys/kernel/random/boot_id</filename>
|
by the kernel. It is randomly generated early at boot and is
|
||||||
file exposed by the kernel. It is randomly generated
|
unique for every running kernel instance. See
|
||||||
early at boot and is unique for every running kernel
|
<citerefentry project='man-pages'><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
||||||
instance. See
|
for more information. This function also internally caches the
|
||||||
<citerefentry project='man-pages'><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>
|
returned ID to make this call a cheap operation.</para>
|
||||||
for more information. This function also internally
|
|
||||||
caches the returned ID to make this call a cheap
|
|
||||||
operation.</para>
|
|
||||||
|
|
||||||
<para>Note that
|
<para>Note that <function>sd_id128_get_boot()</function> always
|
||||||
<function>sd_id128_get_boot()</function> always returns
|
returns a UUID v4 compatible ID.
|
||||||
a UUID v4 compatible
|
<function>sd_id128_get_machine()</function> will also return a
|
||||||
ID. <function>sd_id128_get_machine()</function> will
|
UUID v4-compatible ID on new installations but might not on older.
|
||||||
also return a UUID v4-compatible ID on new
|
It is possible to convert the machine ID into a UUID v4-compatible
|
||||||
installations but might not on older. It is possible
|
one. For more information, see
|
||||||
to convert the machine ID into a UUID v4-compatible
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
||||||
one. For more information, see
|
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>For more information about the
|
<para>For more information about the <literal>sd_id128_t</literal>
|
||||||
<literal>sd_id128_t</literal> type see
|
type see
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The two calls return 0 on success (in which
|
<para>The two calls return 0 on success (in which case
|
||||||
case <parameter>ret</parameter> is filled in), or a
|
<parameter>ret</parameter> is filled in), or a negative
|
||||||
negative errno-style error code.</para>
|
errno-style error code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_id128_get_machine()</function>
|
<para>The <function>sd_id128_get_machine()</function> and
|
||||||
and <function>sd_id128_get_boot()</function>
|
<function>sd_id128_get_boot()</function> interfaces are available
|
||||||
interfaces are available as a shared library, which can
|
as a shared library, which can be compiled and linked to with the
|
||||||
be compiled and linked to with the
|
<literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_id128_randomize</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+71
-73
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,94 +23,92 @@
|
|||||||
|
|
||||||
<refentry id="sd_id128_randomize">
|
<refentry id="sd_id128_randomize">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_id128_randomize</title>
|
<title>sd_id128_randomize</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_id128_randomize</refentrytitle>
|
<refentrytitle>sd_id128_randomize</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_id128_randomize</refname>
|
<refname>sd_id128_randomize</refname>
|
||||||
<refpurpose>Generate 128-bit IDs</refpurpose>
|
<refpurpose>Generate 128-bit IDs</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_id128_randomize</function></funcdef>
|
<funcdef>int <function>sd_id128_randomize</function></funcdef>
|
||||||
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
<paramdef>sd_id128_t *<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_id128_randomize()</function>
|
<para><function>sd_id128_randomize()</function> generates a new
|
||||||
generates a new randomized 128-bit ID and returns it
|
randomized 128-bit ID and returns it in
|
||||||
in <parameter>ret</parameter>. Every invocation
|
<parameter>ret</parameter>. Every invocation returns a new
|
||||||
returns a new randomly generated ID. This uses the
|
randomly generated ID. This uses the
|
||||||
<filename>/dev/urandom</filename> kernel random number
|
<filename>/dev/urandom</filename> kernel random number
|
||||||
generator.</para>
|
generator.</para>
|
||||||
|
|
||||||
<para>Note that
|
<para>Note that <function>sd_id128_randomize()</function> always
|
||||||
<function>sd_id128_randomize()</function> always returns
|
returns a UUID v4-compatible ID.</para>
|
||||||
a UUID v4-compatible ID.</para>
|
|
||||||
|
|
||||||
<para>For more information about the
|
<para>For more information about the <literal>sd_id128_t</literal>
|
||||||
<literal>sd_id128_t</literal> type, see
|
type, see
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
<para><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
||||||
<option>--new-id</option> option may be used as a
|
<option>--new-id</option> option may be used as a command line
|
||||||
command line front-end for
|
front-end for <function>sd_id128_randomize()</function>.</para>
|
||||||
<function>sd_id128_randomize()</function>.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The call returns 0 on success (in which
|
<para>The call returns 0 on success (in which case
|
||||||
case <parameter>ret</parameter> is filled in), or a
|
<parameter>ret</parameter> is filled in), or a negative
|
||||||
negative errno-style error code.</para>
|
errno-style error code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_id128_randomize()</function> interface
|
<para>The <function>sd_id128_randomize()</function> interface is
|
||||||
is available as a shared library, which can be compiled
|
available as a shared library, which can be compiled and linked to
|
||||||
and linked to with the
|
with the
|
||||||
<literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>random</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_id128_get_machine</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+88
-92
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,114 +23,110 @@
|
|||||||
|
|
||||||
<refentry id="sd_id128_to_string">
|
<refentry id="sd_id128_to_string">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_id128_to_string</title>
|
<title>sd_id128_to_string</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_id128_to_string</refentrytitle>
|
<refentrytitle>sd_id128_to_string</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_id128_to_string</refname>
|
<refname>sd_id128_to_string</refname>
|
||||||
<refname>sd_id128_from_string</refname>
|
<refname>sd_id128_from_string</refname>
|
||||||
<refpurpose>Format or parse 128-bit IDs as strings</refpurpose>
|
<refpurpose>Format or parse 128-bit IDs as strings</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-id128.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>char *<function>sd_id128_to_string</function></funcdef>
|
<funcdef>char *<function>sd_id128_to_string</function></funcdef>
|
||||||
<paramdef>sd_id128_t <parameter>id</parameter>, char <parameter>s</parameter>[33]</paramdef>
|
<paramdef>sd_id128_t <parameter>id</parameter>, char <parameter>s</parameter>[33]</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_id128_from_string</function></funcdef>
|
<funcdef>int <function>sd_id128_from_string</function></funcdef>
|
||||||
<paramdef>const char *<parameter>s</parameter>, sd_id128_t *<parameter>ret</parameter></paramdef>
|
<paramdef>const char *<parameter>s</parameter>, sd_id128_t *<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_id128_to_string()</function>
|
<para><function>sd_id128_to_string()</function> formats a 128-bit
|
||||||
formats a 128-bit ID as a character string. It expects
|
ID as a character string. It expects the ID and a string array
|
||||||
the ID and a string array capable of storing 33
|
capable of storing 33 characters. The ID will be formatted as 32
|
||||||
characters. The ID will be formatted as 32 lowercase
|
lowercase hexadecimal digits and be terminated by a
|
||||||
hexadecimal digits and be terminated by a
|
<constant>NUL</constant> byte.</para>
|
||||||
<constant>NUL</constant> byte.</para>
|
|
||||||
|
|
||||||
<para><function>sd_id128_from_string()</function>
|
<para><function>sd_id128_from_string()</function> implements the
|
||||||
implements the reverse operation: it takes a 33
|
reverse operation: it takes a 33 character string with 32
|
||||||
character string with 32 hexadecimal digits (either
|
hexadecimal digits (either lowercase or uppercase, terminated by
|
||||||
lowercase or uppercase, terminated by
|
<constant>NUL</constant>) and parses them back into a 128-bit ID
|
||||||
<constant>NUL</constant>) and parses them back into a
|
returned in <parameter>ret</parameter>. Alternatively, this call
|
||||||
128-bit ID returned in
|
can also parse a 37-character string with a 128-bit ID formatted
|
||||||
<parameter>ret</parameter>. Alternatively, this call
|
as RFC UUID.</para>
|
||||||
can also parse a 37-character string with a 128-bit ID
|
|
||||||
formatted as RFC UUID.</para>
|
|
||||||
|
|
||||||
<para>For more information about the
|
<para>For more information about the <literal>sd_id128_t</literal>
|
||||||
<literal>sd_id128_t</literal> type see
|
type see
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Note
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
that these calls operate the same way on all
|
Note that these calls operate the same way on all architectures,
|
||||||
architectures, i.e. the results do not depend on
|
i.e. the results do not depend on endianness.</para>
|
||||||
endianness.</para>
|
|
||||||
|
|
||||||
<para>When formatting a 128-bit ID into a string, it is
|
<para>When formatting a 128-bit ID into a string, it is often
|
||||||
often easier to use a format string for
|
easier to use a format string for
|
||||||
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>. This
|
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
is easily done using the
|
This is easily done using the
|
||||||
<function>SD_ID128_FORMAT_STR</function> and
|
<function>SD_ID128_FORMAT_STR</function> and
|
||||||
<function>SD_ID128_FORMAT_VAL()</function> macros. For
|
<function>SD_ID128_FORMAT_VAL()</function> macros. For more
|
||||||
more information see
|
information see
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_id128_to_string()</function> always
|
<para><function>sd_id128_to_string()</function> always succeeds
|
||||||
succeeds and returns a pointer to the string array
|
and returns a pointer to the string array passed in.
|
||||||
passed in. <function>sd_id128_from_string</function>
|
<function>sd_id128_from_string</function> returns 0 on success, in
|
||||||
returns 0 on success, in which case
|
which case <parameter>ret</parameter> is filled in, or a negative
|
||||||
<parameter>ret</parameter> is filled in, or a negative
|
errno-style error code.</para>
|
||||||
errno-style error code.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_id128_to_string()</function>
|
<para>The <function>sd_id128_to_string()</function> and
|
||||||
and <function>sd_id128_from_string()</function> interfaces are
|
<function>sd_id128_from_string()</function> interfaces are
|
||||||
available as a shared library, which can be compiled and
|
available as a shared library, which can be compiled and linked to
|
||||||
linked to with the <literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
with the
|
||||||
file.</para>
|
<literal>libsystemd</literal> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</refsect1>
|
file.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+150
-158
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,187 +22,179 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd_is_fifo"
|
<refentry id="sd_is_fifo"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_is_fifo</title>
|
<title>sd_is_fifo</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_is_fifo</refentrytitle>
|
<refentrytitle>sd_is_fifo</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_is_fifo</refname>
|
<refname>sd_is_fifo</refname>
|
||||||
<refname>sd_is_socket</refname>
|
<refname>sd_is_socket</refname>
|
||||||
<refname>sd_is_socket_inet</refname>
|
<refname>sd_is_socket_inet</refname>
|
||||||
<refname>sd_is_socket_unix</refname>
|
<refname>sd_is_socket_unix</refname>
|
||||||
<refname>sd_is_mq</refname>
|
<refname>sd_is_mq</refname>
|
||||||
<refname>sd_is_special</refname>
|
<refname>sd_is_special</refname>
|
||||||
<refpurpose>Check the type of a file descriptor</refpurpose>
|
<refpurpose>Check the type of a file descriptor</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_fifo</function></funcdef>
|
<funcdef>int <function>sd_is_fifo</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>path</parameter></paramdef>
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_socket</function></funcdef>
|
<funcdef>int <function>sd_is_socket</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>int <parameter>family</parameter></paramdef>
|
<paramdef>int <parameter>family</parameter></paramdef>
|
||||||
<paramdef>int <parameter>type</parameter></paramdef>
|
<paramdef>int <parameter>type</parameter></paramdef>
|
||||||
<paramdef>int <parameter>listening</parameter></paramdef>
|
<paramdef>int <parameter>listening</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_socket_inet</function></funcdef>
|
<funcdef>int <function>sd_is_socket_inet</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>int <parameter>family</parameter></paramdef>
|
<paramdef>int <parameter>family</parameter></paramdef>
|
||||||
<paramdef>int <parameter>type</parameter></paramdef>
|
<paramdef>int <parameter>type</parameter></paramdef>
|
||||||
<paramdef>int <parameter>listening</parameter></paramdef>
|
<paramdef>int <parameter>listening</parameter></paramdef>
|
||||||
<paramdef>uint16_t <parameter>port</parameter></paramdef>
|
<paramdef>uint16_t <parameter>port</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_socket_unix</function></funcdef>
|
<funcdef>int <function>sd_is_socket_unix</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>int <parameter>type</parameter></paramdef>
|
<paramdef>int <parameter>type</parameter></paramdef>
|
||||||
<paramdef>int <parameter>listening</parameter></paramdef>
|
<paramdef>int <parameter>listening</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>path</parameter></paramdef>
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
<paramdef>size_t <parameter>length</parameter></paramdef>
|
<paramdef>size_t <parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_mq</function></funcdef>
|
<funcdef>int <function>sd_is_mq</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>path</parameter></paramdef>
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_is_special</function></funcdef>
|
<funcdef>int <function>sd_is_special</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>path</parameter></paramdef>
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_is_fifo()</function> may be called
|
<para><function>sd_is_fifo()</function> may be called to check
|
||||||
to check whether the specified file descriptor refers
|
whether the specified file descriptor refers to a FIFO or pipe. If
|
||||||
to a FIFO or pipe. If the <parameter>path</parameter>
|
the <parameter>path</parameter> parameter is not
|
||||||
parameter is not <constant>NULL</constant>, it is
|
<constant>NULL</constant>, it is checked whether the FIFO is bound
|
||||||
checked whether the FIFO is bound to the specified
|
to the specified file system path.</para>
|
||||||
file system path.</para>
|
|
||||||
|
|
||||||
<para><function>sd_is_socket()</function> may be
|
<para><function>sd_is_socket()</function> may be called to check
|
||||||
called to check whether the specified file descriptor
|
whether the specified file descriptor refers to a socket. If the
|
||||||
refers to a socket. If the
|
<parameter>family</parameter> parameter is not
|
||||||
<parameter>family</parameter> parameter is not
|
<constant>AF_UNSPEC</constant>, it is checked whether the socket
|
||||||
<constant>AF_UNSPEC</constant>, it is checked whether
|
is of the specified family (AF_UNIX, <constant>AF_INET</constant>,
|
||||||
the socket is of the specified family (AF_UNIX,
|
...). If the <parameter>type</parameter> parameter is not 0, it is
|
||||||
<constant>AF_INET</constant>, ...). If the
|
checked whether the socket is of the specified type
|
||||||
<parameter>type</parameter> parameter is not 0, it is
|
(<constant>SOCK_STREAM</constant>,
|
||||||
checked whether the socket is of the specified type
|
<constant>SOCK_DGRAM</constant>, ...). If the
|
||||||
(<constant>SOCK_STREAM</constant>,
|
<parameter>listening</parameter> parameter is positive, it is
|
||||||
<constant>SOCK_DGRAM</constant>, ...). If the
|
checked whether the socket is in accepting mode, i.e.
|
||||||
<parameter>listening</parameter> parameter is positive,
|
<function>listen()</function> has been called for it. If
|
||||||
it is checked whether the socket is in accepting mode,
|
<parameter>listening</parameter> is 0, it is checked whether the
|
||||||
i.e. <function>listen()</function> has been called for
|
socket is not in this mode. If the parameter is negative, no such
|
||||||
it. If <parameter>listening</parameter> is 0, it is
|
check is made. The <parameter>listening</parameter> parameter
|
||||||
checked whether the socket is not in this mode. If the
|
should only be used for stream sockets and should be set to a
|
||||||
parameter is negative, no such check is made. The
|
negative value otherwise.</para>
|
||||||
<parameter>listening</parameter> parameter should only
|
|
||||||
be used for stream sockets and should be set to a
|
|
||||||
negative value otherwise.</para>
|
|
||||||
|
|
||||||
<para><function>sd_is_socket_inet()</function> is
|
<para><function>sd_is_socket_inet()</function> is similar to
|
||||||
similar to <function>sd_is_socket()</function>, but
|
<function>sd_is_socket()</function>, but optionally checks the
|
||||||
optionally checks the IPv4 or IPv6 port number the
|
IPv4 or IPv6 port number the socket is bound to, unless
|
||||||
socket is bound to, unless <parameter>port</parameter>
|
<parameter>port</parameter> is zero. For this call
|
||||||
is zero. For this call <parameter>family</parameter>
|
<parameter>family</parameter> must be passed as either
|
||||||
must be passed as either <constant>AF_UNSPEC</constant>, <constant>AF_INET</constant>, or
|
<constant>AF_UNSPEC</constant>, <constant>AF_INET</constant>, or
|
||||||
<constant>AF_INET6</constant>.</para>
|
<constant>AF_INET6</constant>.</para>
|
||||||
|
|
||||||
<para><function>sd_is_socket_unix()</function> is
|
<para><function>sd_is_socket_unix()</function> is similar to
|
||||||
similar to <function>sd_is_socket()</function> but
|
<function>sd_is_socket()</function> but optionally checks the
|
||||||
optionally checks the <constant>AF_UNIX</constant> path the socket is bound
|
<constant>AF_UNIX</constant> path the socket is bound to, unless
|
||||||
to, unless the <parameter>path</parameter> parameter
|
the <parameter>path</parameter> parameter is
|
||||||
is <constant>NULL</constant>. For normal file system <constant>AF_UNIX</constant> sockets,
|
<constant>NULL</constant>. For normal file system
|
||||||
set the <parameter>length</parameter> parameter to 0. For
|
<constant>AF_UNIX</constant> sockets, set the
|
||||||
Linux abstract namespace sockets, set the
|
<parameter>length</parameter> parameter to 0. For Linux abstract
|
||||||
<parameter>length</parameter> to the size of the
|
namespace sockets, set the <parameter>length</parameter> to the
|
||||||
address, including the initial 0 byte, and set the
|
size of the address, including the initial 0 byte, and set the
|
||||||
<parameter>path</parameter> to the initial 0 byte of
|
<parameter>path</parameter> to the initial 0 byte of the socket
|
||||||
the socket address.</para>
|
address.</para>
|
||||||
|
|
||||||
<para><function>sd_is_mq()</function> may be called to
|
<para><function>sd_is_mq()</function> may be called to check
|
||||||
check whether the specified file descriptor refers to
|
whether the specified file descriptor refers to a POSIX message
|
||||||
a POSIX message queue. If the
|
queue. If the <parameter>path</parameter> parameter is not
|
||||||
<parameter>path</parameter> parameter is not
|
<constant>NULL</constant>, it is checked whether the message queue
|
||||||
<constant>NULL</constant>, it is checked whether the
|
is bound to the specified name.</para>
|
||||||
message queue is bound to the specified name.</para>
|
|
||||||
|
|
||||||
<para><function>sd_is_special()</function> may be
|
<para><function>sd_is_special()</function> may be called to check
|
||||||
called to check whether the specified file descriptor
|
whether the specified file descriptor refers to a special file. If
|
||||||
refers to a special file. If the
|
the <parameter>path</parameter> parameter is not
|
||||||
<parameter>path</parameter> parameter is not
|
<constant>NULL</constant>, it is checked whether the file
|
||||||
<constant>NULL</constant>, it is checked whether the file
|
descriptor is bound to the specified file name. Special files in
|
||||||
descriptor is bound to the specified file
|
this context are character device nodes and files in
|
||||||
name. Special files in this context are character
|
<filename>/proc</filename> or <filename>/sys</filename>.</para>
|
||||||
device nodes and files in <filename>/proc</filename>
|
</refsect1>
|
||||||
or <filename>/sys</filename>.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On failure, these calls return a negative
|
<para>On failure, these calls return a negative errno-style error
|
||||||
errno-style error code. If the file descriptor is of
|
code. If the file descriptor is of the specified type and bound to
|
||||||
the specified type and bound to the specified address,
|
the specified address, a positive return value is returned,
|
||||||
a positive return value is returned, otherwise
|
otherwise zero.</para>
|
||||||
zero.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
||||||
|
|
||||||
<para>Internally, these function use a combination of
|
<para>Internally, these function use a combination of
|
||||||
<filename>fstat()</filename> and
|
<filename>fstat()</filename> and
|
||||||
<filename>getsockname()</filename> to check the file
|
<filename>getsockname()</filename> to check the file descriptor
|
||||||
descriptor type and where it is bound to.</para>
|
type and where it is bound to.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+156
-168
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,198 +23,186 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_add_match">
|
<refentry id="sd_journal_add_match">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_add_match</title>
|
<title>sd_journal_add_match</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_add_match</refentrytitle>
|
<refentrytitle>sd_journal_add_match</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_add_match</refname>
|
<refname>sd_journal_add_match</refname>
|
||||||
<refname>sd_journal_add_disjunction</refname>
|
<refname>sd_journal_add_disjunction</refname>
|
||||||
<refname>sd_journal_add_conjunction</refname>
|
<refname>sd_journal_add_conjunction</refname>
|
||||||
<refname>sd_journal_flush_matches</refname>
|
<refname>sd_journal_flush_matches</refname>
|
||||||
<refpurpose>Add or remove entry matches</refpurpose>
|
<refpurpose>Add or remove entry matches</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_add_match</function></funcdef>
|
<funcdef>int <function>sd_journal_add_match</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const void *<parameter>data</parameter></paramdef>
|
<paramdef>const void *<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t <parameter>size</parameter></paramdef>
|
<paramdef>size_t <parameter>size</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_add_disjunction</function></funcdef>
|
<funcdef>int <function>sd_journal_add_disjunction</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_add_conjunction</function></funcdef>
|
<funcdef>int <function>sd_journal_add_conjunction</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>void <function>sd_journal_flush_matches</function></funcdef>
|
<funcdef>void <function>sd_journal_flush_matches</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_add_match()</function> adds
|
<para><function>sd_journal_add_match()</function> adds a match by
|
||||||
a match by which to filter the entries of the journal
|
which to filter the entries of the journal file. Matches applied
|
||||||
file. Matches applied with this call will filter what
|
with this call will filter what can be iterated through and read
|
||||||
can be iterated through and read from the journal file
|
from the journal file via calls like
|
||||||
via calls like
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and
|
||||||
and
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Matches
|
Matches are of the form <literal>FIELD=value</literal>, where the
|
||||||
are of the form <literal>FIELD=value</literal>, where
|
field part is a short uppercase string consisting only of 0-9, A-Z
|
||||||
the field part is a short uppercase string consisting
|
and the underscore. It may not begin with two underscores or be
|
||||||
only of 0-9, A-Z and the underscore. It may not begin
|
the empty string. The value part may be any value, including
|
||||||
with two underscores or be the empty string. The value
|
binary. If a match is applied, only entries with this field set
|
||||||
part may be any value, including binary. If a match is
|
will be iterated. Multiple matches may be active at the same time:
|
||||||
applied, only entries with this field set will be
|
If they apply to different fields, only entries with both fields
|
||||||
iterated. Multiple matches may be active at the same
|
set like this will be iterated. If they apply to the same fields,
|
||||||
time: If they apply to different fields, only entries
|
only entries where the field takes one of the specified values
|
||||||
with both fields set like this will be iterated. If
|
will be iterated. Well known fields are documented in
|
||||||
they apply to the same fields, only entries where the
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
||||||
field takes one of the specified values will be
|
Whenever a new match is added the current entry position is reset,
|
||||||
iterated. Well known fields are documented in
|
and
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Whenever
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
a new match is added the current entry position is
|
(or a similar call) needs to be called before entries can be read
|
||||||
reset, and
|
again.</para>
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry> (or a similar call)
|
|
||||||
needs to be called before entries can be read
|
|
||||||
again.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_add_disjunction()</function>
|
<para><function>sd_journal_add_disjunction()</function> may be
|
||||||
may be used to insert a disjunction (i.e. logical OR)
|
used to insert a disjunction (i.e. logical OR) in the match list.
|
||||||
in the match list. If this call is invoked, all
|
If this call is invoked, all previously added matches since the
|
||||||
previously added matches since the last invocation of
|
last invocation of
|
||||||
<function>sd_journal_add_disjunction()</function> or
|
<function>sd_journal_add_disjunction()</function> or
|
||||||
<function>sd_journal_add_conjunction()</function> are
|
<function>sd_journal_add_conjunction()</function> are combined in
|
||||||
combined in an OR with all matches added afterwards,
|
an OR with all matches added afterwards, until
|
||||||
until
|
<function>sd_journal_add_disjunction()</function> or
|
||||||
<function>sd_journal_add_disjunction()</function> or
|
<function>sd_journal_add_conjunction()</function> is invoked again
|
||||||
<function>sd_journal_add_conjunction()</function> is
|
to begin the next OR or AND term. </para>
|
||||||
invoked again to begin the next OR or AND
|
|
||||||
term. </para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_add_conjunction()</function>
|
<para><function>sd_journal_add_conjunction()</function> may be
|
||||||
may be used to insert a conjunction (i.e. logical AND)
|
used to insert a conjunction (i.e. logical AND) in the match list.
|
||||||
in the match list. If this call is invoked, all
|
If this call is invoked, all previously added matches since the
|
||||||
previously added matches since the last invocation of
|
last invocation of
|
||||||
<function>sd_journal_add_conjunction()</function> are
|
<function>sd_journal_add_conjunction()</function> are combined in
|
||||||
combined in an AND with all matches added afterwards,
|
an AND with all matches added afterwards, until
|
||||||
until
|
<function>sd_journal_add_conjunction()</function> is invoked again
|
||||||
<function>sd_journal_add_conjunction()</function> is
|
to begin the next AND term. The combination of
|
||||||
invoked again to begin the next AND term. The
|
<function>sd_journal_add_match()</function>,
|
||||||
combination of
|
<function>sd_journal_add_disjunction()</function> and
|
||||||
<function>sd_journal_add_match()</function>,
|
<function>sd_journal_add_conjunction()</function> may be used to
|
||||||
<function>sd_journal_add_disjunction()</function> and
|
build complex search terms, even though full logical expressions
|
||||||
<function>sd_journal_add_conjunction()</function> may
|
are not available. Note that
|
||||||
be used to build complex search terms, even though
|
<function>sd_journal_add_conjunction()</function> operates one
|
||||||
full logical expressions are not available. Note that
|
level 'higher' than
|
||||||
<function>sd_journal_add_conjunction()</function>
|
<function>sd_journal_add_disjunction()</function>. It is hence
|
||||||
operates one level 'higher' than
|
possible to build an expression of AND terms, consisting of OR
|
||||||
<function>sd_journal_add_disjunction()</function>. It
|
terms, consisting of AND terms, consisting of OR terms of matches
|
||||||
is hence possible to build an expression of AND terms,
|
(the latter OR expression is implicitly created for matches with
|
||||||
consisting of OR terms, consisting of AND terms,
|
the same field name, see above).</para>
|
||||||
consisting of OR terms of matches (the latter OR
|
|
||||||
expression is implicitly created for matches with the
|
|
||||||
same field name, see above).</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_flush_matches()</function>
|
<para><function>sd_journal_flush_matches()</function> may be used
|
||||||
may be used to flush all matches, disjunction and
|
to flush all matches, disjunction and conjunction terms again.
|
||||||
conjunction terms again. After this call all filtering
|
After this call all filtering is removed and all entries in the
|
||||||
is removed and all entries in the journal will be
|
journal will be iterated again.</para>
|
||||||
iterated again.</para>
|
|
||||||
|
|
||||||
<para>Note that filtering via matches only applies to
|
<para>Note that filtering via matches only applies to the way the
|
||||||
the way the journal is read, it has no effect on storage
|
journal is read, it has no effect on storage on disk.</para>
|
||||||
on disk.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_add_match()</function>,
|
<para><function>sd_journal_add_match()</function>,
|
||||||
<function>sd_journal_add_disjunction()</function> and
|
<function>sd_journal_add_disjunction()</function> and
|
||||||
<function>sd_journal_add_conjunction()</function>
|
<function>sd_journal_add_conjunction()</function>
|
||||||
return 0 on success or a negative errno-style error
|
return 0 on success or a negative errno-style error
|
||||||
code. <function>sd_journal_flush_matches()</function>
|
code. <function>sd_journal_flush_matches()</function>
|
||||||
returns nothing.</para>
|
returns nothing.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_add_match()</function>,
|
<para>The <function>sd_journal_add_match()</function>,
|
||||||
<function>sd_journal_add_disjunction()</function>,
|
<function>sd_journal_add_disjunction()</function>,
|
||||||
<function>sd_journal_add_conjunction()</function> and
|
<function>sd_journal_add_conjunction()</function> and
|
||||||
<function>sd_journal_flush_matches()</function>
|
<function>sd_journal_flush_matches()</function>
|
||||||
interfaces are available as a shared library, which can
|
interfaces are available as a shared library, which can
|
||||||
be compiled and linked to with the
|
be compiled and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>The following example adds matches to a journal
|
<para>The following example adds matches to a journal context
|
||||||
context object to iterate only through messages
|
object to iterate only through messages generated by the Avahi
|
||||||
generated by the Avahi service at the four error log
|
service at the four error log levels, plus all messages of the
|
||||||
levels, plus all messages of the message ID
|
message ID 03bb1dab98ab4ecfbf6fff2738bdd964 coming from any
|
||||||
03bb1dab98ab4ecfbf6fff2738bdd964 coming from any
|
service (this example lacks the necessary error checking):</para>
|
||||||
service (this example lacks the necessary error
|
|
||||||
checking):</para>
|
|
||||||
|
|
||||||
<programlisting>...
|
<programlisting>...
|
||||||
int add_matches(sd_journal *j) {
|
int add_matches(sd_journal *j) {
|
||||||
sd_journal_add_match(j, "_SYSTEMD_UNIT=avahi-daemon.service", 0);
|
sd_journal_add_match(j, "_SYSTEMD_UNIT=avahi-daemon.service", 0);
|
||||||
sd_journal_add_match(j, "PRIORITY=0", 0);
|
sd_journal_add_match(j, "PRIORITY=0", 0);
|
||||||
sd_journal_add_match(j, "PRIORITY=1", 0);
|
sd_journal_add_match(j, "PRIORITY=1", 0);
|
||||||
sd_journal_add_match(j, "PRIORITY=2", 0);
|
sd_journal_add_match(j, "PRIORITY=2", 0);
|
||||||
sd_journal_add_match(j, "PRIORITY=3", 0);
|
sd_journal_add_match(j, "PRIORITY=3", 0);
|
||||||
sd_journal_add_disjunction(j);
|
sd_journal_add_disjunction(j);
|
||||||
sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
|
sd_journal_add_match(j, "MESSAGE_ID=03bb1dab98ab4ecfbf6fff2738bdd964", 0);
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,119 +23,115 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_catalog">
|
<refentry id="sd_journal_get_catalog">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_catalog</title>
|
<title>sd_journal_get_catalog</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_catalog</refentrytitle>
|
<refentrytitle>sd_journal_get_catalog</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_catalog</refname>
|
<refname>sd_journal_get_catalog</refname>
|
||||||
<refname>sd_journal_get_catalog_for_message_id</refname>
|
<refname>sd_journal_get_catalog_for_message_id</refname>
|
||||||
<refpurpose>Retrieve message catalog entry</refpurpose>
|
<refpurpose>Retrieve message catalog entry</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_catalog</function></funcdef>
|
<funcdef>int <function>sd_journal_get_catalog</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>ret</parameter></paramdef>
|
<paramdef>char **<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_catalog_for_message_id</function></funcdef>
|
<funcdef>int <function>sd_journal_get_catalog_for_message_id</function></funcdef>
|
||||||
<paramdef>sd_id128_t <parameter>id</parameter></paramdef>
|
<paramdef>sd_id128_t <parameter>id</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>ret</parameter></paramdef>
|
<paramdef>char **<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_catalog()</function>
|
<para><function>sd_journal_get_catalog()</function> retrieves a
|
||||||
retrieves a message catalog entry for the current
|
message catalog entry for the current journal entry. This will
|
||||||
journal entry. This will look up an entry in the
|
look up an entry in the message catalog by using the
|
||||||
message catalog by using the
|
<literal>MESSAGE_ID=</literal> field of the current journal entry.
|
||||||
<literal>MESSAGE_ID=</literal> field of the current
|
Before returning the entry all journal field names in the catalog
|
||||||
journal entry. Before returning the entry all journal
|
entry text enclosed in "@" will be replaced by the respective
|
||||||
field names in the catalog entry text enclosed in "@"
|
field values of the current entry. If a field name referenced in
|
||||||
will be replaced by the respective field values of the
|
the message catalog entry does not exist, in the current journal
|
||||||
current entry. If a field name referenced in the
|
entry, the "@" will be removed, but the field name otherwise left
|
||||||
message catalog entry does not exist, in the current
|
untouched.</para>
|
||||||
journal entry, the "@" will be removed, but the field
|
|
||||||
name otherwise left untouched.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_catalog_for_message_id()</function>
|
<para><function>sd_journal_get_catalog_for_message_id()</function>
|
||||||
works similar to
|
works similar to <function>sd_journal_get_catalog()</function> but
|
||||||
<function>sd_journal_get_catalog()</function> but the
|
the entry is looked up by the specified message ID (no open
|
||||||
entry is looked up by the specified message ID (no
|
journal context is necessary for this), and no field substitution
|
||||||
open journal context is necessary for this), and no
|
is performed.</para>
|
||||||
field substitution is performed.</para>
|
|
||||||
|
|
||||||
<para>For more information about the journal message
|
<para>For more information about the journal message catalog
|
||||||
catalog please refer to the <ulink
|
please refer to the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/catalog">Journal
|
url="http://www.freedesktop.org/wiki/Software/systemd/catalog">Journal
|
||||||
Message Catalogs</ulink> documentation page.</para>
|
Message Catalogs</ulink> documentation page.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_catalog()</function>
|
<para><function>sd_journal_get_catalog()</function> and
|
||||||
and
|
<function>sd_journal_get_catalog_for_message_id()</function>
|
||||||
<function>sd_journal_get_catalog_for_message_id()</function>
|
return 0 on success or a negative errno-style error code. If no
|
||||||
return 0 on success or a negative errno-style error
|
matching message catalog entry is found, -ENOENT is
|
||||||
code. If no matching message catalog entry is found,
|
returned.</para>
|
||||||
-ENOENT is returned.</para>
|
|
||||||
|
|
||||||
<para>On successful return, <parameter>ret</parameter>
|
<para>On successful return, <parameter>ret</parameter> points to a
|
||||||
points to a new string, which must be freed with
|
new string, which must be freed with
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_get_catalog()</function> and
|
<para>The <function>sd_journal_get_catalog()</function> and
|
||||||
<function>sd_journal_get_catalog_for_message_id()</function>
|
<function>sd_journal_get_catalog_for_message_id()</function>
|
||||||
interfaces are available as a shared library, which can
|
interfaces are available as a shared library, which can be
|
||||||
be compiled and linked to with the
|
compiled and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+101
-107
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,128 +23,122 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_cursor">
|
<refentry id="sd_journal_get_cursor">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_cursor</title>
|
<title>sd_journal_get_cursor</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_cursor</refentrytitle>
|
<refentrytitle>sd_journal_get_cursor</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_cursor</refname>
|
<refname>sd_journal_get_cursor</refname>
|
||||||
<refname>sd_journal_test_cursor</refname>
|
<refname>sd_journal_test_cursor</refname>
|
||||||
<refpurpose>Get cursor string for or test cursor string against the current journal entry</refpurpose>
|
<refpurpose>Get cursor string for or test cursor string against the current journal entry</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_cursor</function></funcdef>
|
<funcdef>int <function>sd_journal_get_cursor</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>cursor</parameter></paramdef>
|
<paramdef>char **<parameter>cursor</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_test_cursor</function></funcdef>
|
<funcdef>int <function>sd_journal_test_cursor</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>cursor</parameter></paramdef>
|
<paramdef>const char *<parameter>cursor</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_cursor()</function>
|
<para><function>sd_journal_get_cursor()</function> returns a
|
||||||
returns a cursor string for the current journal
|
cursor string for the current journal entry. A cursor is a
|
||||||
entry. A cursor is a serialization of the current
|
serialization of the current journal position formatted as text.
|
||||||
journal position formatted as text. The string only
|
The string only contains printable characters and can be passed
|
||||||
contains printable characters and can be passed around
|
around in text form. The cursor identifies a journal entry
|
||||||
in text form. The cursor identifies a journal entry
|
globally and in a stable way and may be used to later seek to it
|
||||||
globally and in a stable way and may be used to later
|
via
|
||||||
seek to it via
|
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
|
The cursor string should be considered opaque and not be parsed by
|
||||||
cursor string should be considered opaque and not be
|
clients. Seeking to a cursor position without the specific entry
|
||||||
parsed by clients. Seeking to a cursor position
|
being available locally will seek to the next closest (in terms of
|
||||||
without the specific entry being available locally
|
time) available entry. The call takes two arguments: a journal
|
||||||
will seek to the next closest (in terms of time)
|
context object and a pointer to a string pointer where the cursor
|
||||||
available entry. The call takes two arguments: a
|
string will be placed. The string is allocated via libc
|
||||||
journal context object and a pointer to a string
|
<citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
pointer where the cursor string will be placed. The
|
and should be freed after use with
|
||||||
string is allocated via libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>malloc</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
and should be freed after use with
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>Note that
|
<para>Note that <function>sd_journal_get_cursor()</function> will
|
||||||
<function>sd_journal_get_cursor()</function> will not
|
not work before
|
||||||
work before
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
(or related call) has been called at least once, in order to
|
||||||
(or related call) has been called at least once, in
|
position the read pointer at a valid entry.</para>
|
||||||
order to position the read pointer at a valid
|
|
||||||
entry.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_test_cursor()</function>
|
<para><function>sd_journal_test_cursor()</function>
|
||||||
may be used to check whether the current position in
|
may be used to check whether the current position in
|
||||||
the journal matches the specified cursor. This is
|
the journal matches the specified cursor. This is
|
||||||
useful since cursor strings do not uniquely identify
|
useful since cursor strings do not uniquely identify
|
||||||
an entry: the same entry might be referred to by
|
an entry: the same entry might be referred to by
|
||||||
multiple different cursor strings, and hence string
|
multiple different cursor strings, and hence string
|
||||||
comparing cursors is not possible. Use this call to
|
comparing cursors is not possible. Use this call to
|
||||||
verify after an invocation of
|
verify after an invocation of
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
whether the entry being sought to was actually found
|
whether the entry being sought to was actually found
|
||||||
in the journal or the next closest entry was used
|
in the journal or the next closest entry was used
|
||||||
instead.</para>
|
instead.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_cursor()</function>
|
<para><function>sd_journal_get_cursor()</function> returns 0 on
|
||||||
returns 0 on success or a negative errno-style error
|
success or a negative errno-style error code.
|
||||||
code. <function>sd_journal_test_cursor()</function>
|
<function>sd_journal_test_cursor()</function> returns positive if
|
||||||
returns positive if the current entry matches the
|
the current entry matches the specified cursor, 0 if it does not
|
||||||
specified cursor, 0 if it does not match the specified
|
match the specified cursor or a negative errno-style error code on
|
||||||
cursor or a negative errno-style error code on
|
failure.</para>
|
||||||
failure.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_get_cursor()</function>
|
<para>The <function>sd_journal_get_cursor()</function> and
|
||||||
and <function>sd_journal_test_cursor()</function>
|
<function>sd_journal_test_cursor()</function> interfaces are
|
||||||
interfaces are available as a shared library, which can
|
available as a shared library, which can be compiled and linked to
|
||||||
be compiled and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,132 +23,123 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_cutoff_realtime_usec">
|
<refentry id="sd_journal_get_cutoff_realtime_usec">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_cutoff_realtime_usec</title>
|
<title>sd_journal_get_cutoff_realtime_usec</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle>
|
<refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_cutoff_realtime_usec</refname>
|
<refname>sd_journal_get_cutoff_realtime_usec</refname>
|
||||||
<refname>sd_journal_get_cutoff_monotonic_usec</refname>
|
<refname>sd_journal_get_cutoff_monotonic_usec</refname>
|
||||||
<refpurpose>Read cut-off timestamps from the current journal entry</refpurpose>
|
<refpurpose>Read cut-off timestamps from the current journal entry</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_cutoff_realtime_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_get_cutoff_realtime_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>from</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>from</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>to</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>to</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_cutoff_monotonic_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_get_cutoff_monotonic_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>sd_id128_t <parameter>boot_id</parameter></paramdef>
|
<paramdef>sd_id128_t <parameter>boot_id</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>from</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>from</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>to</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>to</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_cutoff_realtime_usec()</function>
|
<para><function>sd_journal_get_cutoff_realtime_usec()</function>
|
||||||
retrieves the realtime (wallclock) timestamps of the
|
retrieves the realtime (wallclock) timestamps of the first and
|
||||||
first and last entries accessible in the journal. It
|
last entries accessible in the journal. It takes three arguments:
|
||||||
takes three arguments: the journal context object
|
the journal context object <parameter>j</parameter> and two
|
||||||
<parameter>j</parameter> and two pointers
|
pointers <parameter>from</parameter> and <parameter>to</parameter>
|
||||||
<parameter>from</parameter> and
|
pointing at 64-bit unsigned integers to store the timestamps in.
|
||||||
<parameter>to</parameter> pointing at 64-bit unsigned
|
The timestamps are in microseconds since the epoch, i.e.
|
||||||
integers to store the timestamps in. The timestamps
|
<constant>CLOCK_REALTIME</constant>. Either one of the two
|
||||||
are in microseconds since the epoch,
|
timestamp arguments may be passed as <constant>NULL</constant> in
|
||||||
i.e. <constant>CLOCK_REALTIME</constant>. Either one
|
case the timestamp is not needed, but not both.</para>
|
||||||
of the two timestamp arguments may be passed as
|
|
||||||
<constant>NULL</constant> in case the timestamp is not
|
|
||||||
needed, but not both.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_cutoff_monotonic_usec()</function>
|
<para><function>sd_journal_get_cutoff_monotonic_usec()</function>
|
||||||
retrieves the monotonic timestamps of the first and
|
retrieves the monotonic timestamps of the first and last entries
|
||||||
last entries accessible in the journal. It takes three
|
accessible in the journal. It takes three arguments: the journal
|
||||||
arguments: the journal context object
|
context object <parameter>j</parameter>, a 128-bit identifier for
|
||||||
<parameter>j</parameter>, a 128-bit identifier for the
|
the boot <parameter>boot_id</parameter>, and two pointers to
|
||||||
boot <parameter>boot_id</parameter>, and two pointers
|
64-bit unsigned integers to store the timestamps,
|
||||||
to 64-bit unsigned integers to store the timestamps,
|
<parameter>from</parameter> and <parameter>to</parameter>. The
|
||||||
<parameter>from</parameter> and
|
timestamps are in microseconds since boot-up of the specific boot,
|
||||||
<parameter>to</parameter>. The timestamps are in
|
i.e. <constant>CLOCK_MONOTONIC</constant>. Since the monotonic
|
||||||
microseconds since boot-up of the specific boot,
|
clock begins new with every reboot it only defines a well-defined
|
||||||
i.e. <constant>CLOCK_MONOTONIC</constant>. Since the
|
point in time when used together with an identifier identifying
|
||||||
monotonic clock begins new with every reboot it only
|
the boot, see
|
||||||
defines a well-defined point in time when used
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
together with an identifier identifying the boot, see
|
for more information. The function will return the timestamps for
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
the boot identified by the passed boot ID. Either one of the two
|
||||||
for more information. The function will return the
|
timestamp arguments may be passed as <constant>NULL</constant> in
|
||||||
timestamps for the boot identified by the passed boot
|
case the timestamp is not needed, but not both.</para>
|
||||||
ID. Either one of the two timestamp arguments may be
|
</refsect1>
|
||||||
passed as <constant>NULL</constant> in case the
|
|
||||||
timestamp is not needed, but not both.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_cutoff_realtime_usec()</function>
|
<para><function>sd_journal_get_cutoff_realtime_usec()</function>
|
||||||
and
|
and <function>sd_journal_get_cutoff_monotonic_usec()</function>
|
||||||
<function>sd_journal_get_cutoff_monotonic_usec()</function>
|
return 1 on success, 0 if not suitable entries are in the journal
|
||||||
return 1 on success, 0 if not suitable entries are in
|
or a negative errno-style error code.</para>
|
||||||
the journal or a negative errno-style error code.</para>
|
|
||||||
|
|
||||||
<para>Locations pointed to by parameters
|
<para>Locations pointed to by parameters
|
||||||
<parameter>from</parameter> and
|
<parameter>from</parameter> and <parameter>to</parameter> will be
|
||||||
<parameter>to</parameter> will be set only if the
|
set only if the return value is positive, and obviously, the
|
||||||
return value is positive, and obviously, the
|
parameters are non-null.</para>
|
||||||
parameters are non-null.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The
|
<para>The
|
||||||
<function>sd_journal_get_cutoff_realtime_usec()</function>
|
<function>sd_journal_get_cutoff_realtime_usec()</function> and
|
||||||
and
|
<function>sd_journal_get_cutoff_monotonic_usec()</function>
|
||||||
<function>sd_journal_get_cutoff_monotonic_usec()</function>
|
interfaces are available as a shared library, which can be
|
||||||
interfaces are available as a shared library, which can
|
compiled and linked to with the
|
||||||
be compiled and linked to with the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+177
-192
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,228 +23,213 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_data">
|
<refentry id="sd_journal_get_data">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_data</title>
|
<title>sd_journal_get_data</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_data</refentrytitle>
|
<refentrytitle>sd_journal_get_data</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_data</refname>
|
<refname>sd_journal_get_data</refname>
|
||||||
<refname>sd_journal_enumerate_data</refname>
|
<refname>sd_journal_enumerate_data</refname>
|
||||||
<refname>sd_journal_restart_data</refname>
|
<refname>sd_journal_restart_data</refname>
|
||||||
<refname>SD_JOURNAL_FOREACH_DATA</refname>
|
<refname>SD_JOURNAL_FOREACH_DATA</refname>
|
||||||
<refname>sd_journal_set_data_threshold</refname>
|
<refname>sd_journal_set_data_threshold</refname>
|
||||||
<refname>sd_journal_get_data_threshold</refname>
|
<refname>sd_journal_get_data_threshold</refname>
|
||||||
<refpurpose>Read data fields from the current journal entry</refpurpose>
|
<refpurpose>Read data fields from the current journal entry</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_data</function></funcdef>
|
<funcdef>int <function>sd_journal_get_data</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>field</parameter></paramdef>
|
<paramdef>const char *<parameter>field</parameter></paramdef>
|
||||||
<paramdef>const void **<parameter>data</parameter></paramdef>
|
<paramdef>const void **<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_enumerate_data</function></funcdef>
|
<funcdef>int <function>sd_journal_enumerate_data</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const void **<parameter>data</parameter></paramdef>
|
<paramdef>const void **<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>void <function>sd_journal_restart_data</function></funcdef>
|
<funcdef>void <function>sd_journal_restart_data</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef><function>SD_JOURNAL_FOREACH_DATA</function></funcdef>
|
<funcdef><function>SD_JOURNAL_FOREACH_DATA</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const void *<parameter>data</parameter></paramdef>
|
<paramdef>const void *<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t <parameter>length</parameter></paramdef>
|
<paramdef>size_t <parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_set_data_threshold</function></funcdef>
|
<funcdef>int <function>sd_journal_set_data_threshold</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>size_t <parameter>sz</parameter></paramdef>
|
<paramdef>size_t <parameter>sz</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_data_threshold</function></funcdef>
|
<funcdef>int <function>sd_journal_get_data_threshold</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>size_t *<parameter>sz</parameter></paramdef>
|
<paramdef>size_t *<parameter>sz</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_data()</function> gets
|
<para><function>sd_journal_get_data()</function> gets the data
|
||||||
the data object associated with a specific field from
|
object associated with a specific field from the current journal
|
||||||
the current journal entry. It takes four arguments:
|
entry. It takes four arguments: the journal context object, a
|
||||||
the journal context object, a string with the field
|
string with the field name to request, plus a pair of pointers to
|
||||||
name to request, plus a pair of pointers to
|
pointer/size variables where the data object and its size shall be
|
||||||
pointer/size variables where the data object and its
|
stored in. The field name should be an entry field name.
|
||||||
size shall be stored in. The field name should be an
|
Well-known field names are listed in
|
||||||
entry field name. Well-known field names are listed in
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>. The
|
The returned data is in a read-only memory map and is only valid
|
||||||
returned data is in a read-only memory map and is only
|
until the next invocation of
|
||||||
valid until the next invocation of
|
<function>sd_journal_get_data()</function> or
|
||||||
<function>sd_journal_get_data()</function> or
|
<function>sd_journal_enumerate_data()</function>, or the read
|
||||||
<function>sd_journal_enumerate_data()</function>, or
|
pointer is altered. Note that the data returned will be prefixed
|
||||||
the read pointer is altered. Note that the data
|
with the field name and '='. Also note that by default data fields
|
||||||
returned will be prefixed with the field name and
|
larger than 64K might get truncated to 64K. This threshold may be
|
||||||
'='. Also note that by default data fields larger than
|
changed and turned off with
|
||||||
64K might get truncated to 64K. This threshold may be
|
<function>sd_journal_set_data_threshold()</function> (see
|
||||||
changed and turned off with
|
below).</para>
|
||||||
<function>sd_journal_set_data_threshold()</function> (see
|
|
||||||
below).</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_enumerate_data()</function>
|
<para><function>sd_journal_enumerate_data()</function> may be used
|
||||||
may be used to iterate through all fields of the
|
to iterate through all fields of the current entry. On each
|
||||||
current entry. On each invocation the data for the
|
invocation the data for the next field is returned. The order of
|
||||||
next field is returned. The order of these fields is
|
these fields is not defined. The data returned is in the same
|
||||||
not defined. The data returned is in the same format
|
format as with <function>sd_journal_get_data()</function> and also
|
||||||
as with <function>sd_journal_get_data()</function> and
|
follows the same life-time semantics.</para>
|
||||||
also follows the same life-time semantics.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_restart_data()</function>
|
<para><function>sd_journal_restart_data()</function> resets the
|
||||||
resets the data enumeration index to the beginning of
|
data enumeration index to the beginning of the entry. The next
|
||||||
the entry. The next invocation of
|
invocation of <function>sd_journal_enumerate_data()</function>
|
||||||
<function>sd_journal_enumerate_data()</function> will return the first
|
will return the first field of the entry again.</para>
|
||||||
field of the entry again.</para>
|
|
||||||
|
|
||||||
<para>Note that the
|
<para>Note that the <function>SD_JOURNAL_FOREACH_DATA()</function>
|
||||||
<function>SD_JOURNAL_FOREACH_DATA()</function> macro
|
macro may be used as a handy wrapper around
|
||||||
may be used as a handy wrapper around
|
<function>sd_journal_restart_data()</function> and
|
||||||
<function>sd_journal_restart_data()</function> and
|
<function>sd_journal_enumerate_data()</function>.</para>
|
||||||
<function>sd_journal_enumerate_data()</function>.</para>
|
|
||||||
|
|
||||||
<para>Note that these functions will not work before
|
<para>Note that these functions will not work before
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
(or related call) has been called at least
|
(or related call) has been called at least once, in order to
|
||||||
once, in order to position the read pointer at a valid entry.</para>
|
position the read pointer at a valid entry.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_set_data_threshold()</function>
|
<para><function>sd_journal_set_data_threshold()</function> may be
|
||||||
may be used to change the data field size threshold
|
used to change the data field size threshold for data returned by
|
||||||
for data returned by
|
<function>sd_journal_get_data()</function>,
|
||||||
<function>sd_journal_get_data()</function>,
|
<function>sd_journal_enumerate_data()</function> and
|
||||||
<function>sd_journal_enumerate_data()</function> and
|
<function>sd_journal_enumerate_unique()</function>. This threshold
|
||||||
<function>sd_journal_enumerate_unique()</function>. This
|
is a hint only: it indicates that the client program is interested
|
||||||
threshold is a hint only: it indicates that the client
|
only in the initial parts of the data fields, up to the threshold
|
||||||
program is interested only in the initial parts of the
|
in size -- but the library might still return larger data objects.
|
||||||
data fields, up to the threshold in size -- but the
|
That means applications should not rely exclusively on this
|
||||||
library might still return larger data objects. That
|
setting to limit the size of the data fields returned, but need to
|
||||||
means applications should not rely exclusively on this
|
apply a explicit size limit on the returned data as well. This
|
||||||
setting to limit the size of the data fields returned,
|
threshold defaults to 64K by default. To retrieve the complete
|
||||||
but need to apply a explicit size limit on the
|
data fields this threshold should be turned off by setting it to
|
||||||
returned data as well. This threshold defaults to 64K
|
0, so that the library always returns the complete data objects.
|
||||||
by default. To retrieve the complete data fields this
|
It is recommended to set this threshold as low as possible since
|
||||||
threshold should be turned off by setting it to 0, so
|
this relieves the library from having to decompress large
|
||||||
that the library always returns the complete data
|
compressed data objects in full.</para>
|
||||||
objects. It is recommended to set this threshold as
|
|
||||||
low as possible since this relieves the library from
|
|
||||||
having to decompress large compressed data objects in
|
|
||||||
full.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_data_threshold()</function>
|
<para><function>sd_journal_get_data_threshold()</function> returns
|
||||||
returns the currently configured data field size
|
the currently configured data field size threshold.</para>
|
||||||
threshold.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_data()</function>
|
<para><function>sd_journal_get_data()</function> returns 0 on
|
||||||
returns 0 on success or a negative errno-style error
|
success or a negative errno-style error code. If the current entry
|
||||||
code. If the current entry does not include the
|
does not include the specified field, -ENOENT is returned. If
|
||||||
specified field, -ENOENT is returned. If
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
has not been called at least once, -EADDRNOTAVAIL is returned.
|
||||||
has not been called at least once, -EADDRNOTAVAIL is
|
<function>sd_journal_enumerate_data()</function> returns a
|
||||||
returned. <function>sd_journal_enumerate_data()</function>
|
positive integer if the next field has been read, 0 when no more
|
||||||
returns a positive integer if the next field has been
|
fields are known, or a negative errno-style error code.
|
||||||
read, 0 when no more fields are known, or a negative
|
<function>sd_journal_restart_data()</function> returns nothing.
|
||||||
errno-style error
|
<function>sd_journal_set_data_threshold()</function> and
|
||||||
code. <function>sd_journal_restart_data()</function>
|
<function>sd_journal_get_threshold()</function> return 0 on
|
||||||
returns
|
success or a negative errno-style error code.</para>
|
||||||
nothing. <function>sd_journal_set_data_threshold()</function>
|
</refsect1>
|
||||||
and <function>sd_journal_get_threshold()</function>
|
|
||||||
return 0 on success or a negative errno-style error
|
|
||||||
code.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_get_data()</function>,
|
<para>The <function>sd_journal_get_data()</function>,
|
||||||
<function>sd_journal_enumerate_data()</function>,
|
<function>sd_journal_enumerate_data()</function>,
|
||||||
<function>sd_journal_restart_data()</function>,
|
<function>sd_journal_restart_data()</function>,
|
||||||
<function>sd_journal_set_data_threshold()</function>
|
<function>sd_journal_set_data_threshold()</function> and
|
||||||
and
|
<function>sd_journal_get_data_threshold()</function> interfaces
|
||||||
<function>sd_journal_get_data_threshold()</function>
|
are available as a shared library, which can be compiled and
|
||||||
interfaces are available as a shared library, which can
|
linked to with the
|
||||||
be compiled and linked to with the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for a complete example how to use
|
for a complete example how to use
|
||||||
<function>sd_journal_get_data()</function>.</para>
|
<function>sd_journal_get_data()</function>.</para>
|
||||||
|
|
||||||
<para>Use the
|
<para>Use the
|
||||||
<function>SD_JOURNAL_FOREACH_DATA</function> macro to
|
<function>SD_JOURNAL_FOREACH_DATA</function> macro to
|
||||||
iterate through all fields of the current journal
|
iterate through all fields of the current journal
|
||||||
entry:</para>
|
entry:</para>
|
||||||
|
|
||||||
<programlisting>...
|
<programlisting>...
|
||||||
int print_fields(sd_journal *j) {
|
int print_fields(sd_journal *j) {
|
||||||
const void *data;
|
const void *data;
|
||||||
size_t length;
|
size_t length;
|
||||||
SD_JOURNAL_FOREACH_DATA(j, data, length)
|
SD_JOURNAL_FOREACH_DATA(j, data, length)
|
||||||
printf("%.*s\n", (int) length, data);
|
printf("%.*s\n", (int) length, data);
|
||||||
}
|
}
|
||||||
...</programlisting>
|
...</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_query_unique</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+256
-273
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,327 +23,310 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_fd">
|
<refentry id="sd_journal_get_fd">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_fd</title>
|
<title>sd_journal_get_fd</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_fd</refentrytitle>
|
<refentrytitle>sd_journal_get_fd</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_fd</refname>
|
<refname>sd_journal_get_fd</refname>
|
||||||
<refname>sd_journal_get_events</refname>
|
<refname>sd_journal_get_events</refname>
|
||||||
<refname>sd_journal_get_timeout</refname>
|
<refname>sd_journal_get_timeout</refname>
|
||||||
<refname>sd_journal_process</refname>
|
<refname>sd_journal_process</refname>
|
||||||
<refname>sd_journal_wait</refname>
|
<refname>sd_journal_wait</refname>
|
||||||
<refname>sd_journal_reliable_fd</refname>
|
<refname>sd_journal_reliable_fd</refname>
|
||||||
<refname>SD_JOURNAL_NOP</refname>
|
<refname>SD_JOURNAL_NOP</refname>
|
||||||
<refname>SD_JOURNAL_APPEND</refname>
|
<refname>SD_JOURNAL_APPEND</refname>
|
||||||
<refname>SD_JOURNAL_INVALIDATE</refname>
|
<refname>SD_JOURNAL_INVALIDATE</refname>
|
||||||
<refpurpose>Journal change notification
|
<refpurpose>Journal change notification
|
||||||
interface</refpurpose>
|
interface</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_fd</function></funcdef>
|
<funcdef>int <function>sd_journal_get_fd</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_events</function></funcdef>
|
<funcdef>int <function>sd_journal_get_events</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_timeout</function></funcdef>
|
<funcdef>int <function>sd_journal_get_timeout</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>timeout_usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>timeout_usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_process</function></funcdef>
|
<funcdef>int <function>sd_journal_process</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_wait</function></funcdef>
|
<funcdef>int <function>sd_journal_wait</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>timeout_usec</parameter></paramdef>
|
<paramdef>uint64_t <parameter>timeout_usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_reliable_fd</function></funcdef>
|
<funcdef>int <function>sd_journal_reliable_fd</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_fd()</function> returns
|
<para><function>sd_journal_get_fd()</function> returns a file
|
||||||
a file descriptor that may be asynchronously polled in
|
descriptor that may be asynchronously polled in an external event
|
||||||
an external event loop and is signaled as soon as the
|
loop and is signaled as soon as the journal changes, because new
|
||||||
journal changes, because new entries or files were
|
entries or files were added, rotation took place, or files have
|
||||||
added, rotation took place, or files have been
|
been deleted, and similar. The file descriptor is suitable for
|
||||||
deleted, and similar. The file descriptor is suitable
|
usage in
|
||||||
for usage in
|
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>. Use
|
Use <function>sd_journal_get_events()</function> for an events
|
||||||
<function>sd_journal_get_events()</function> for an
|
mask to watch for. The call takes one argument: the journal
|
||||||
events mask to watch for. The call takes one argument:
|
context object. Note that not all file systems are capable of
|
||||||
the journal context object. Note that not all file
|
generating the necessary events for wakeups from this file
|
||||||
systems are capable of generating the necessary events
|
descriptor for changes to be noticed immediately. In particular
|
||||||
for wakeups from this file descriptor for changes to
|
network files systems do not generate suitable file change events
|
||||||
be noticed immediately. In particular network files
|
in all cases. Cases like this can be detected with
|
||||||
systems do not generate suitable file change events in
|
<function>sd_journal_reliable_fd()</function>, below.
|
||||||
all cases. Cases like this can be detected with
|
<function>sd_journal_get_timeout()</function> will ensure in these
|
||||||
<function>sd_journal_reliable_fd()</function>,
|
cases that wake-ups happen frequently enough for changes to be
|
||||||
below. <function>sd_journal_get_timeout()</function>
|
noticed, although with a certain latency.</para>
|
||||||
will ensure in these cases that wake-ups happen
|
|
||||||
frequently enough for changes to be noticed, although
|
|
||||||
with a certain latency.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_events()</function>
|
<para><function>sd_journal_get_events()</function> will return the
|
||||||
will return the <function>poll()</function> mask to
|
<function>poll()</function> mask to wait for. This function will
|
||||||
wait for. This function will return a combination of
|
return a combination of <constant>POLLIN</constant> and
|
||||||
<constant>POLLIN</constant> and
|
<constant>POLLOUT</constant> and similar to fill into the
|
||||||
<constant>POLLOUT</constant> and similar to fill into
|
<literal>.events</literal> field of <varname>struct
|
||||||
the <literal>.events</literal> field of
|
pollfd</varname>.</para>
|
||||||
<varname>struct pollfd</varname>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_timeout()</function>
|
<para><function>sd_journal_get_timeout()</function> will return a
|
||||||
will return a timeout value for usage in
|
timeout value for usage in <function>poll()</function>. This
|
||||||
<function>poll()</function>. This returns a value in
|
returns a value in microseconds since the epoch of
|
||||||
microseconds since the epoch of
|
<constant>CLOCK_MONOTONIC</constant> for timing out
|
||||||
<constant>CLOCK_MONOTONIC</constant> for timing out
|
<function>poll()</function> in <varname>timeout_usec</varname>.
|
||||||
<function>poll()</function> in
|
See
|
||||||
<varname>timeout_usec</varname>. See
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
for details about <constant>CLOCK_MONOTONIC</constant>. If there
|
||||||
for details about
|
is no timeout to wait for, this will fill in <constant>(uint64_t)
|
||||||
<constant>CLOCK_MONOTONIC</constant>. If there is no
|
-1</constant> instead. Note that <function>poll()</function> takes
|
||||||
timeout to wait for, this will fill in
|
a relative timeout in milliseconds rather than an absolute timeout
|
||||||
<constant>(uint64_t) -1</constant> instead. Note that
|
in microseconds. To convert the absolute 'us' timeout into
|
||||||
<function>poll()</function> takes a relative timeout
|
relative 'ms', use code like the following:</para>
|
||||||
in milliseconds rather than an absolute timeout in
|
|
||||||
microseconds. To convert the absolute 'us' timeout
|
|
||||||
into relative 'ms', use code like the
|
|
||||||
following:</para>
|
|
||||||
|
|
||||||
<programlisting>uint64_t t;
|
<programlisting>uint64_t t;
|
||||||
int msec;
|
int msec;
|
||||||
sd_journal_get_timeout(m, &t);
|
sd_journal_get_timeout(m, &t);
|
||||||
if (t == (uint64_t) -1)
|
if (t == (uint64_t) -1)
|
||||||
msec = -1;
|
msec = -1;
|
||||||
else {
|
else {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
uint64_t n;
|
uint64_t n;
|
||||||
clock_getttime(CLOCK_MONOTONIC, &ts);
|
clock_getttime(CLOCK_MONOTONIC, &ts);
|
||||||
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||||
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para>The code above does not do any error checking
|
<para>The code above does not do any error checking for brevity's
|
||||||
for brevity's sake. The calculated <varname>msec</varname>
|
sake. The calculated <varname>msec</varname> integer can be passed
|
||||||
integer can be passed directly as
|
directly as <function>poll()</function>'s timeout
|
||||||
<function>poll()</function>'s timeout
|
parameter.</para>
|
||||||
parameter.</para>
|
|
||||||
|
|
||||||
<para>After each <function>poll()</function> wake-up
|
<para>After each <function>poll()</function> wake-up
|
||||||
<function>sd_journal_process()</function> needs to be
|
<function>sd_journal_process()</function> needs to be called to
|
||||||
called to process events. This call will also indicate
|
process events. This call will also indicate what kind of change
|
||||||
what kind of change has been detected (see below; note
|
has been detected (see below; note that spurious wake-ups are
|
||||||
that spurious wake-ups are possible).</para>
|
possible).</para>
|
||||||
|
|
||||||
<para>A synchronous alternative for using
|
<para>A synchronous alternative for using
|
||||||
<function>sd_journal_get_fd()</function>,
|
<function>sd_journal_get_fd()</function>,
|
||||||
<function>sd_journal_get_events()</function>,
|
<function>sd_journal_get_events()</function>,
|
||||||
<function>sd_journal_get_timeout()</function> and
|
<function>sd_journal_get_timeout()</function> and
|
||||||
<function>sd_journal_process()</function> is
|
<function>sd_journal_process()</function> is
|
||||||
<function>sd_journal_wait()</function>. It will
|
<function>sd_journal_wait()</function>. It will synchronously wait
|
||||||
synchronously wait until the journal gets changed. The
|
until the journal gets changed. The maximum time this call sleeps
|
||||||
maximum time this call sleeps may be controlled with
|
may be controlled with the <parameter>timeout_usec</parameter>
|
||||||
the <parameter>timeout_usec</parameter>
|
parameter. Pass <constant>(uint64_t) -1</constant> to wait
|
||||||
parameter. Pass <constant>(uint64_t) -1</constant> to
|
indefinitely. Internally this call simply combines
|
||||||
wait indefinitely. Internally this call simply
|
<function>sd_journal_get_fd()</function>,
|
||||||
combines <function>sd_journal_get_fd()</function>,
|
<function>sd_journal_get_events()</function>,
|
||||||
<function>sd_journal_get_events()</function>,
|
<function>sd_journal_get_timeout()</function>,
|
||||||
<function>sd_journal_get_timeout()</function>,
|
<function>poll()</function> and
|
||||||
<function>poll()</function> and
|
<function>sd_journal_process()</function> into one.</para>
|
||||||
<function>sd_journal_process()</function> into
|
|
||||||
one.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_reliable_fd()</function>
|
<para><function>sd_journal_reliable_fd()</function> may be used to
|
||||||
may be used to check whether the wakeup events from
|
check whether the wakeup events from the file descriptor returned
|
||||||
the file descriptor returned by
|
by <function>sd_journal_get_fd()</function> are known to be
|
||||||
<function>sd_journal_get_fd()</function> are known to
|
immediately triggered. On certain file systems where file change
|
||||||
be immediately triggered. On certain file systems
|
events from the OS are not available (such as NFS) changes need to
|
||||||
where file change events from the OS are not available
|
be polled for repeatedly, and hence are detected only with a
|
||||||
(such as NFS) changes need to be polled for
|
certain latency. This call will return a positive value if the
|
||||||
repeatedly, and hence are detected only with a certain
|
journal changes are detected immediately and zero when they need
|
||||||
latency. This call will return a positive value if the
|
to be polled for and hence might be noticed only with a certain
|
||||||
journal changes are detected immediately and zero when
|
latency. Note that there's usually no need to invoke this function
|
||||||
they need to be polled for and hence might be noticed
|
directly as <function>sd_journal_get_timeout()</function> on these
|
||||||
only with a certain latency. Note that there's usually
|
file systems will ask for timeouts explicitly anyway.</para>
|
||||||
no need to invoke this function directly as
|
</refsect1>
|
||||||
<function>sd_journal_get_timeout()</function> on these
|
|
||||||
file systems will ask for timeouts explicitly
|
|
||||||
anyway.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_fd()</function> returns
|
<para><function>sd_journal_get_fd()</function> returns a valid
|
||||||
a valid file descriptor on success or a negative
|
file descriptor on success or a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_get_events()</function>
|
<para><function>sd_journal_get_events()</function> returns a
|
||||||
returns a combination of <constant>POLLIN</constant>,
|
combination of <constant>POLLIN</constant>,
|
||||||
<constant>POLLOUT</constant> and suchlike on success or
|
<constant>POLLOUT</constant> and suchlike on success or a negative
|
||||||
a negative errno-style error code.</para>
|
errno-style error code.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_reliable_fd()</function>
|
<para><function>sd_journal_reliable_fd()</function> returns a
|
||||||
returns a positive integer if the file descriptor
|
positive integer if the file descriptor returned by
|
||||||
returned by <function>sd_journal_get_fd()</function>
|
<function>sd_journal_get_fd()</function> will generate wake-ups
|
||||||
will generate wake-ups immediately for all journal
|
immediately for all journal changes. Returns 0 if there might be a
|
||||||
changes. Returns 0 if there might be a latency
|
latency involved.</para>
|
||||||
involved.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_process()</function> and
|
<para><function>sd_journal_process()</function> and
|
||||||
<function>sd_journal_wait()</function> return one of
|
<function>sd_journal_wait()</function> return one of
|
||||||
<constant>SD_JOURNAL_NOP</constant>,
|
<constant>SD_JOURNAL_NOP</constant>,
|
||||||
<constant>SD_JOURNAL_APPEND</constant> or
|
<constant>SD_JOURNAL_APPEND</constant> or
|
||||||
<constant>SD_JOURNAL_INVALIDATE</constant> on success or
|
<constant>SD_JOURNAL_INVALIDATE</constant> on success or a
|
||||||
a negative errno-style error code. If
|
negative errno-style error code. If
|
||||||
<constant>SD_JOURNAL_NOP</constant> is returned, the
|
<constant>SD_JOURNAL_NOP</constant> is returned, the journal did
|
||||||
journal did not change since the last invocation. If
|
not change since the last invocation. If
|
||||||
<constant>SD_JOURNAL_APPEND</constant> is returned, new
|
<constant>SD_JOURNAL_APPEND</constant> is returned, new entries
|
||||||
entries have been appended to the end of the
|
have been appended to the end of the journal. If
|
||||||
journal. If <constant>SD_JOURNAL_INVALIDATE</constant>,
|
<constant>SD_JOURNAL_INVALIDATE</constant>, journal files were
|
||||||
journal files were added or removed (possibly due to
|
added or removed (possibly due to rotation). In the latter event,
|
||||||
rotation). In the latter event, live-view UIs should
|
live-view UIs should probably refresh their entire display, while
|
||||||
probably refresh their entire display, while in the
|
in the case of <constant>SD_JOURNAL_APPEND</constant>, it is
|
||||||
case of <constant>SD_JOURNAL_APPEND</constant>, it is
|
sufficient to simply continue reading at the previous end of the
|
||||||
sufficient to simply continue reading at the previous
|
journal.</para>
|
||||||
end of the journal.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_get_fd()</function>,
|
<para>The <function>sd_journal_get_fd()</function>,
|
||||||
<function>sd_journal_get_events()</function>,
|
<function>sd_journal_get_events()</function>,
|
||||||
<function>sd_journal_reliable_fd()</function>,
|
<function>sd_journal_reliable_fd()</function>,
|
||||||
<function>sd_journal_process()</function> and
|
<function>sd_journal_process()</function> and
|
||||||
<function>sd_journal_wait()</function> interfaces are
|
<function>sd_journal_wait()</function> interfaces are available as
|
||||||
available as a shared library, which can be compiled and
|
a shared library, which can be compiled and linked to with the
|
||||||
linked to with the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>Iterating through the journal, in a live view tracking all changes:</para>
|
<para>Iterating through the journal, in a live view tracking all
|
||||||
|
changes:</para>
|
||||||
|
|
||||||
<programlisting>#include <stdio.h>
|
<programlisting>#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int r;
|
int r;
|
||||||
sd_journal *j;
|
sd_journal *j;
|
||||||
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
const void *d;
|
const void *d;
|
||||||
size_t l;
|
size_t l;
|
||||||
r = sd_journal_next(j);
|
r = sd_journal_next(j);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
/* Reached the end, let's wait for changes, and try again */
|
/* Reached the end, let's wait for changes, and try again */
|
||||||
r = sd_journal_wait(j, (uint64_t) -1);
|
r = sd_journal_wait(j, (uint64_t) -1);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
r = sd_journal_get_data(j, "MESSAGE", &d, &l);
|
r = sd_journal_get_data(j, "MESSAGE", &d, &l);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
printf("%.*s\n", (int) l, (const char*) d);
|
printf("%.*s\n", (int) l, (const char*) d);
|
||||||
}
|
}
|
||||||
sd_journal_close(j);
|
sd_journal_close(j);
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para>Waiting with <function>poll()</function> (this
|
<para>Waiting with <function>poll()</function> (this
|
||||||
example lacks all error checking for the sake of
|
example lacks all error checking for the sake of
|
||||||
simplicity):</para>
|
simplicity):</para>
|
||||||
|
|
||||||
<programlisting>#include <sys/poll.h>
|
<programlisting>#include <sys/poll.h>
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
|
|
||||||
int wait_for_changes(sd_journal *j) {
|
int wait_for_changes(sd_journal *j) {
|
||||||
struct pollfd pollfd;
|
struct pollfd pollfd;
|
||||||
int msec;
|
int msec;
|
||||||
|
|
||||||
sd_journal_get_timeout(m, &t);
|
sd_journal_get_timeout(m, &t);
|
||||||
if (t == (uint64_t) -1)
|
if (t == (uint64_t) -1)
|
||||||
msec = -1;
|
msec = -1;
|
||||||
else {
|
else {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
uint64_t n;
|
uint64_t n;
|
||||||
clock_getttime(CLOCK_MONOTONIC, &ts);
|
clock_getttime(CLOCK_MONOTONIC, &ts);
|
||||||
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||||
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
pollfd.fd = sd_journal_get_fd(j);
|
pollfd.fd = sd_journal_get_fd(j);
|
||||||
pollfd.events = sd_journal_get_events(j);
|
pollfd.events = sd_journal_get_events(j);
|
||||||
poll(&pollfd, 1, msec);
|
poll(&pollfd, 1, msec);
|
||||||
return sd_journal_process(j);
|
return sd_journal_process(j);
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,124 +23,119 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_realtime_usec">
|
<refentry id="sd_journal_get_realtime_usec">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_realtime_usec</title>
|
<title>sd_journal_get_realtime_usec</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_realtime_usec</refentrytitle>
|
<refentrytitle>sd_journal_get_realtime_usec</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_realtime_usec</refname>
|
<refname>sd_journal_get_realtime_usec</refname>
|
||||||
<refname>sd_journal_get_monotonic_usec</refname>
|
<refname>sd_journal_get_monotonic_usec</refname>
|
||||||
<refpurpose>Read timestamps from the current journal entry</refpurpose>
|
<refpurpose>Read timestamps from the current journal entry</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_realtime_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_get_realtime_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_monotonic_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_get_monotonic_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
||||||
<paramdef>sd_id128_t *<parameter>boot_id</parameter></paramdef>
|
<paramdef>sd_id128_t *<parameter>boot_id</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_realtime_usec()</function>
|
<para><function>sd_journal_get_realtime_usec()</function> gets the
|
||||||
gets the realtime (wallclock) timestamp of the
|
realtime (wallclock) timestamp of the current journal entry. It
|
||||||
current journal entry. It takes two arguments: the
|
takes two arguments: the journal context object and a pointer to a
|
||||||
journal context object and a pointer to a 64-bit
|
64-bit unsigned integer to store the timestamp in. The timestamp
|
||||||
unsigned integer to store the timestamp in. The
|
is in microseconds since the epoch, i.e.
|
||||||
timestamp is in microseconds since the epoch,
|
<constant>CLOCK_REALTIME</constant>.</para>
|
||||||
i.e. <constant>CLOCK_REALTIME</constant>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_get_monotonic_usec()</function>
|
<para><function>sd_journal_get_monotonic_usec()</function> gets
|
||||||
gets the monotonic timestamp of the current journal
|
the monotonic timestamp of the current journal entry. It takes
|
||||||
entry. It takes three arguments: the journal context
|
three arguments: the journal context object, a pointer to a 64-bit
|
||||||
object, a pointer to a 64-bit unsigned integer to
|
unsigned integer to store the timestamp in, as well as a 128-bit
|
||||||
store the timestamp in, as well as a 128-bit ID buffer
|
ID buffer to store the boot ID of the monotonic timestamp. The
|
||||||
to store the boot ID of the monotonic timestamp.
|
timestamp is in microseconds since boot-up of the specific boot,
|
||||||
The timestamp is in microseconds since boot-up of
|
i.e. <constant>CLOCK_MONOTONIC</constant>. Since the monotonic
|
||||||
the specific boot,
|
clock begins new with every reboot, it only defines a well-defined
|
||||||
i.e. <constant>CLOCK_MONOTONIC</constant>. Since the
|
point in time when used together with an identifier identifying
|
||||||
monotonic clock begins new with every reboot, it only
|
the boot. See
|
||||||
defines a well-defined point in time when used
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
together with an identifier identifying the boot. See
|
for more information. If the boot ID parameter is passed
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<constant>NULL</constant>, the function will fail if the monotonic
|
||||||
for more information. If the boot ID parameter is
|
timestamp of the current entry is not of the current system
|
||||||
passed <constant>NULL</constant>, the function will
|
boot.</para>
|
||||||
fail if the monotonic timestamp of the current entry
|
|
||||||
is not of the current system boot.</para>
|
|
||||||
|
|
||||||
<para>Note that these functions will not work before
|
<para>Note that these functions will not work before
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
(or related call) has been called at least
|
(or related call) has been called at least
|
||||||
once, in order to position the read pointer at a valid entry.</para>
|
once, in order to position the read pointer at a valid entry.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_realtime_usec()</function>
|
<para><function>sd_journal_get_realtime_usec()</function> and
|
||||||
and
|
<function>sd_journal_get_monotonic_usec()</function> returns 0 on
|
||||||
<function>sd_journal_get_monotonic_usec()</function>
|
success or a negative errno-style error code. If the boot ID
|
||||||
returns 0 on success or a negative errno-style error
|
parameter was passed <constant>NULL</constant> and the monotonic
|
||||||
code. If the boot ID parameter was passed <constant>NULL</constant> and the
|
timestamp of the current journal entry is not of the current
|
||||||
monotonic timestamp of the current journal entry is
|
system boot, <constant>-ESTALE</constant> is returned by
|
||||||
not of the current system boot, -ESTALE is returned by <function>sd_journal_get_monotonic_usec()</function>.</para>
|
<function>sd_journal_get_monotonic_usec()</function>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The
|
<para>The <function>sd_journal_get_realtime_usec()</function> and
|
||||||
<function>sd_journal_get_realtime_usec()</function>
|
<function>sd_journal_get_monotonic_usec()</function> interfaces
|
||||||
and
|
are available as a shared library, which can be compiled and
|
||||||
<function>sd_journal_get_monotonic_usec()</function>
|
linked to with the
|
||||||
interfaces are available as a shared library, which can
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
be compiled and linked to with the
|
file.</para>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
</refsect1>
|
||||||
file.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_id128_get_boot</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_cutoff_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,81 +23,78 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_get_usage">
|
<refentry id="sd_journal_get_usage">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_get_usage</title>
|
<title>sd_journal_get_usage</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_get_usage</refentrytitle>
|
<refentrytitle>sd_journal_get_usage</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_get_usage</refname>
|
<refname>sd_journal_get_usage</refname>
|
||||||
<refpurpose>Journal disk usage</refpurpose>
|
<refpurpose>Journal disk usage</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_get_usage</function></funcdef>
|
<funcdef>int <function>sd_journal_get_usage</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>bytes</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>bytes</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_usage()</function>
|
<para><function>sd_journal_get_usage()</function> determines the
|
||||||
determines the total disk space currently used by
|
total disk space currently used by journal files (in bytes). If
|
||||||
journal files (in bytes). If
|
<constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed when opening
|
||||||
<constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed
|
the journal, this value will only reflect the size of journal
|
||||||
when opening the journal, this value will only reflect
|
files of the local host, otherwise of all hosts.</para>
|
||||||
the size of journal files of the local host, otherwise
|
</refsect1>
|
||||||
of all hosts.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_get_usage()</function>
|
<para><function>sd_journal_get_usage()</function> returns 0 on
|
||||||
returns 0 on success or a negative errno-style error
|
success or a negative errno-style error code.</para>
|
||||||
code.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_get_usage()</function>
|
<para>The <function>sd_journal_get_usage()</function> interface is
|
||||||
interface is available as a shared library, which can be
|
available as a shared library, which can be compiled and linked to
|
||||||
compiled and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+147
-153
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,191 +23,185 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_next">
|
<refentry id="sd_journal_next">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_next</title>
|
<title>sd_journal_next</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_next</refentrytitle>
|
<refentrytitle>sd_journal_next</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_next</refname>
|
<refname>sd_journal_next</refname>
|
||||||
<refname>sd_journal_previous</refname>
|
<refname>sd_journal_previous</refname>
|
||||||
<refname>sd_journal_next_skip</refname>
|
<refname>sd_journal_next_skip</refname>
|
||||||
<refname>sd_journal_previous_skip</refname>
|
<refname>sd_journal_previous_skip</refname>
|
||||||
<refname>SD_JOURNAL_FOREACH</refname>
|
<refname>SD_JOURNAL_FOREACH</refname>
|
||||||
<refname>SD_JOURNAL_FOREACH_BACKWARDS</refname>
|
<refname>SD_JOURNAL_FOREACH_BACKWARDS</refname>
|
||||||
<refpurpose>Advance or set back the read pointer in the journal</refpurpose>
|
<refpurpose>Advance or set back the read pointer in the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_next</function></funcdef>
|
<funcdef>int <function>sd_journal_next</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_previous</function></funcdef>
|
<funcdef>int <function>sd_journal_previous</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_next_skip</function></funcdef>
|
<funcdef>int <function>sd_journal_next_skip</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>skip</parameter></paramdef>
|
<paramdef>uint64_t <parameter>skip</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_previous_skip</function></funcdef>
|
<funcdef>int <function>sd_journal_previous_skip</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>skip</parameter></paramdef>
|
<paramdef>uint64_t <parameter>skip</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef><function>SD_JOURNAL_FOREACH</function></funcdef>
|
<funcdef><function>SD_JOURNAL_FOREACH</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef><function>SD_JOURNAL_FOREACH_BACKWARDS</function></funcdef>
|
<funcdef><function>SD_JOURNAL_FOREACH_BACKWARDS</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_next()</function> advances
|
<para><function>sd_journal_next()</function> advances the read
|
||||||
the read pointer into the journal by one entry. The
|
pointer into the journal by one entry. The only argument taken is
|
||||||
only argument taken is a journal context object as
|
a journal context object as allocated via
|
||||||
allocated via
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>. After
|
After successful invocation the entry may be read with functions
|
||||||
successful invocation the entry may be read with
|
such as
|
||||||
functions such as
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>Similarly, <function>sd_journal_previous()</function> sets
|
<para>Similarly, <function>sd_journal_previous()</function> sets
|
||||||
the read pointer back one entry.</para>
|
the read pointer back one entry.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_next_skip()</function> and
|
<para><function>sd_journal_next_skip()</function> and
|
||||||
<function>sd_journal_previous_skip()</function>
|
<function>sd_journal_previous_skip()</function> advance/set back
|
||||||
advance/set back the read pointer by multiple entries
|
the read pointer by multiple entries at once, as specified in the
|
||||||
at once, as specified in the <varname>skip</varname>
|
<varname>skip</varname> parameter.</para>
|
||||||
parameter.</para>
|
|
||||||
|
|
||||||
<para>The journal is strictly ordered by reception
|
<para>The journal is strictly ordered by reception time, and hence
|
||||||
time, and hence advancing to the next entry guarantees
|
advancing to the next entry guarantees that the entry then
|
||||||
that the entry then pointing to is later in time than
|
pointing to is later in time than then previous one, or has the
|
||||||
then previous one, or has the same timestamp.</para>
|
same timestamp.</para>
|
||||||
|
|
||||||
<para>Note that
|
<para>Note that
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
and related calls will fail unless
|
and related calls will fail unless
|
||||||
<function>sd_journal_next()</function> has been
|
<function>sd_journal_next()</function> has been invoked at least
|
||||||
invoked at least once in order to position the read
|
once in order to position the read pointer on a journal
|
||||||
pointer on a journal entry.</para>
|
entry.</para>
|
||||||
|
|
||||||
<para>Note that the
|
<para>Note that the <function>SD_JOURNAL_FOREACH()</function>
|
||||||
<function>SD_JOURNAL_FOREACH()</function> macro may be used
|
macro may be used as a wrapper around
|
||||||
as a wrapper around
|
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and <function>sd_journal_next()</function> in order to make
|
||||||
and <function>sd_journal_next()</function> in order to
|
iterating through the journal easier. See below for an example.
|
||||||
make iterating through the journal easier. See below
|
Similarly, <function>SD_JOURNAL_FOREACH_BACKWARDS()</function> may
|
||||||
for an example. Similarly,
|
be used for iterating the journal in reverse order.</para>
|
||||||
<function>SD_JOURNAL_FOREACH_BACKWARDS()</function>
|
</refsect1>
|
||||||
may be used for iterating the journal in reverse
|
|
||||||
order.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The four calls return the number of entries
|
<para>The four calls return the number of entries advanced/set
|
||||||
advanced/set back on success or a negative errno-style
|
back on success or a negative errno-style error code. When the end
|
||||||
error code. When the end or beginning of the journal
|
or beginning of the journal is reached, a number smaller than
|
||||||
is reached, a number smaller than requested is
|
requested is returned. More specifically, if
|
||||||
returned. More specifically, if
|
<function>sd_journal_next()</function> or
|
||||||
<function>sd_journal_next()</function> or
|
<function>sd_journal_previous()</function> reach the end/beginning
|
||||||
<function>sd_journal_previous()</function> reach the
|
of the journal they will return 0, instead of 1 when they are
|
||||||
end/beginning of the journal they will return 0,
|
successful. This should be considered an EOF marker.</para>
|
||||||
instead of 1 when they are successful. This should be
|
</refsect1>
|
||||||
considered an EOF marker.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_next()</function>, <function>sd_journal_previous()</function>,
|
<para>The <function>sd_journal_next()</function>,
|
||||||
<function>sd_journal_next_skip()</function> and
|
<function>sd_journal_previous()</function>,
|
||||||
<function>sd_journal_previous_skip()</function> interfaces are
|
<function>sd_journal_next_skip()</function> and
|
||||||
available as a shared library, which can be compiled and
|
<function>sd_journal_previous_skip()</function> interfaces are
|
||||||
linked to with the
|
available as a shared library, which can be compiled and linked to
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
with the
|
||||||
file.</para>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</refsect1>
|
file.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>Iterating through the journal:</para>
|
<para>Iterating through the journal:</para>
|
||||||
|
|
||||||
<programlisting>#include <stdio.h>
|
<programlisting>#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int r;
|
int r;
|
||||||
sd_journal *j;
|
sd_journal *j;
|
||||||
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
SD_JOURNAL_FOREACH(j) {
|
SD_JOURNAL_FOREACH(j) {
|
||||||
const char *d;
|
const char *d;
|
||||||
size_t l;
|
size_t l;
|
||||||
|
|
||||||
r = sd_journal_get_data(j, "MESSAGE", (const void **)&d, &l);
|
r = sd_journal_get_data(j, "MESSAGE", (const void **)&d, &l);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%.*s\n", (int) l, d);
|
printf("%.*s\n", (int) l, d);
|
||||||
}
|
}
|
||||||
sd_journal_close(j);
|
sd_journal_close(j);
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+183
-197
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,231 +23,217 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_open">
|
<refentry id="sd_journal_open">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_open</title>
|
<title>sd_journal_open</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_open</refentrytitle>
|
<refentrytitle>sd_journal_open</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_open</refname>
|
<refname>sd_journal_open</refname>
|
||||||
<refname>sd_journal_open_directory</refname>
|
<refname>sd_journal_open_directory</refname>
|
||||||
<refname>sd_journal_open_files</refname>
|
<refname>sd_journal_open_files</refname>
|
||||||
<refname>sd_journal_open_container</refname>
|
<refname>sd_journal_open_container</refname>
|
||||||
<refname>sd_journal_close</refname>
|
<refname>sd_journal_close</refname>
|
||||||
<refname>sd_journal</refname>
|
<refname>sd_journal</refname>
|
||||||
<refname>SD_JOURNAL_LOCAL_ONLY</refname>
|
<refname>SD_JOURNAL_LOCAL_ONLY</refname>
|
||||||
<refname>SD_JOURNAL_RUNTIME_ONLY</refname>
|
<refname>SD_JOURNAL_RUNTIME_ONLY</refname>
|
||||||
<refname>SD_JOURNAL_SYSTEM</refname>
|
<refname>SD_JOURNAL_SYSTEM</refname>
|
||||||
<refname>SD_JOURNAL_CURRENT_USER</refname>
|
<refname>SD_JOURNAL_CURRENT_USER</refname>
|
||||||
<refpurpose>Open the system journal for reading</refpurpose>
|
<refpurpose>Open the system journal for reading</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_open</function></funcdef>
|
<funcdef>int <function>sd_journal_open</function></funcdef>
|
||||||
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
||||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_open_directory</function></funcdef>
|
<funcdef>int <function>sd_journal_open_directory</function></funcdef>
|
||||||
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>path</parameter></paramdef>
|
<paramdef>const char *<parameter>path</parameter></paramdef>
|
||||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_open_files</function></funcdef>
|
<funcdef>int <function>sd_journal_open_files</function></funcdef>
|
||||||
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
||||||
<paramdef>const char **<parameter>paths</parameter></paramdef>
|
<paramdef>const char **<parameter>paths</parameter></paramdef>
|
||||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_open_container</function></funcdef>
|
<funcdef>int <function>sd_journal_open_container</function></funcdef>
|
||||||
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
<paramdef>sd_journal **<parameter>ret</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>machine</parameter></paramdef>
|
<paramdef>const char *<parameter>machine</parameter></paramdef>
|
||||||
<paramdef>int <parameter>flags</parameter></paramdef>
|
<paramdef>int <parameter>flags</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>void <function>sd_journal_close</function></funcdef>
|
<funcdef>void <function>sd_journal_close</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_open()</function> opens
|
<para><function>sd_journal_open()</function> opens the log journal
|
||||||
the log journal for reading. It will find all journal
|
for reading. It will find all journal files automatically and
|
||||||
files automatically and interleave them automatically
|
interleave them automatically when reading. As first argument it
|
||||||
when reading. As first argument it takes a pointer to
|
takes a pointer to a <varname>sd_journal</varname> pointer, which
|
||||||
a <varname>sd_journal</varname> pointer, which on
|
on success will contain a journal context object. The second
|
||||||
success will contain a journal context object. The
|
argument is a flags field, which may consist of the following
|
||||||
second argument is a flags field, which may consist of
|
flags ORed together: <constant>SD_JOURNAL_LOCAL_ONLY</constant>
|
||||||
the following flags ORed together:
|
makes sure only journal files generated on the local machine will
|
||||||
<constant>SD_JOURNAL_LOCAL_ONLY</constant> makes sure
|
be opened. <constant>SD_JOURNAL_RUNTIME_ONLY</constant> makes sure
|
||||||
only journal files generated on the local machine will
|
only volatile journal files will be opened, excluding those which
|
||||||
be opened. <constant>SD_JOURNAL_RUNTIME_ONLY</constant>
|
are stored on persistent storage.
|
||||||
makes sure only volatile journal files will be opened,
|
<constant>SD_JOURNAL_SYSTEM</constant> will cause journal files of
|
||||||
excluding those which are stored on persistent
|
system services and the kernel (in opposition to user session
|
||||||
storage. <constant>SD_JOURNAL_SYSTEM</constant>
|
processes) to be opened.
|
||||||
will cause journal files of system services and the
|
<constant>SD_JOURNAL_CURRENT_USER</constant> will cause journal
|
||||||
kernel (in opposition to user session processes) to
|
files of the current user to be opened. If neither
|
||||||
be opened. <constant>SD_JOURNAL_CURRENT_USER</constant>
|
<constant>SD_JOURNAL_SYSTEM</constant> nor
|
||||||
will cause journal files of the current user to be
|
<constant>SD_JOURNAL_CURRENT_USER</constant> are specified, all
|
||||||
opened. If neither <constant>SD_JOURNAL_SYSTEM</constant>
|
journal file types will be opened.</para>
|
||||||
nor <constant>SD_JOURNAL_CURRENT_USER</constant> are
|
|
||||||
specified, all journal file types will be opened.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_open_directory()</function>
|
<para><function>sd_journal_open_directory()</function> is similar
|
||||||
is similar to <function>sd_journal_open()</function>
|
to <function>sd_journal_open()</function> but takes an absolute
|
||||||
but takes an absolute directory path as argument. All
|
directory path as argument. All journal files in this directory
|
||||||
journal files in this directory will be opened and
|
will be opened and interleaved automatically. This call also takes
|
||||||
interleaved automatically. This call also takes a
|
a flags argument, but it must be passed as 0 as no flags are
|
||||||
flags argument, but it must be passed as 0 as no flags
|
currently understood for this call.</para>
|
||||||
are currently understood for this call.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_open_files()</function>
|
<para><function>sd_journal_open_files()</function> is similar to
|
||||||
is similar to <function>sd_journal_open()</function>
|
<function>sd_journal_open()</function> but takes a
|
||||||
but takes a <constant>NULL</constant>-terminated list
|
<constant>NULL</constant>-terminated list of file paths to open.
|
||||||
of file paths to open. All files will be opened and
|
All files will be opened and interleaved automatically. This call
|
||||||
interleaved automatically. This call also takes a
|
also takes a flags argument, but it must be passed as 0 as no
|
||||||
flags argument, but it must be passed as 0 as no flags
|
flags are currently understood for this call. Please note that in
|
||||||
are currently understood for this call. Please note
|
the case of a live journal, this function is only useful for
|
||||||
that in the case of a live journal, this function is only
|
debugging, because individual journal files can be rotated at any
|
||||||
useful for debugging, because individual journal files
|
moment, and the opening of specific files is inherently
|
||||||
can be rotated at any moment, and the opening of
|
racy.</para>
|
||||||
specific files is inherently racy.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_open_container()</function>
|
<para><function>sd_journal_open_container()</function> is similar
|
||||||
is similar to <function>sd_journal_open()</function>
|
to <function>sd_journal_open()</function> but opens the journal
|
||||||
but opens the journal files of a running
|
files of a running OS container. The specified machine name refers
|
||||||
OS container. The specified machine name refers to a
|
to a container that is registered with
|
||||||
container that is registered with
|
<citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
<citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para><varname>sd_journal</varname> objects cannot be
|
<para><varname>sd_journal</varname> objects cannot be used in the
|
||||||
used in the child after a fork. Functions which take a
|
child after a fork. Functions which take a journal object as an
|
||||||
journal object as an argument
|
argument (<function>sd_journal_next()</function> and others) will
|
||||||
(<function>sd_journal_next()</function> and others)
|
return <constant>-ECHILD</constant> after a fork.
|
||||||
will return <constant>-ECHILD</constant> after a fork.
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_close()</function> will
|
<para><function>sd_journal_close()</function> will close the
|
||||||
close the journal context allocated with
|
journal context allocated with
|
||||||
<function>sd_journal_open()</function> or
|
<function>sd_journal_open()</function> or
|
||||||
<function>sd_journal_open_directory()</function> and
|
<function>sd_journal_open_directory()</function> and free its
|
||||||
free its resources.</para>
|
resources.</para>
|
||||||
|
|
||||||
<para>When opening the journal only journal files
|
<para>When opening the journal only journal files accessible to
|
||||||
accessible to the calling user will be opened. If
|
the calling user will be opened. If journal files are not
|
||||||
journal files are not accessible to the caller, this
|
accessible to the caller, this will be silently ignored.</para>
|
||||||
will be silently ignored.</para>
|
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for an example of how to iterate through the journal
|
for an example of how to iterate through the journal after opening
|
||||||
after opening it with
|
it with <function>sd_journal_open()</function>.</para>
|
||||||
<function>sd_journal_open()</function>.</para>
|
|
||||||
|
|
||||||
<para>A journal context object returned by
|
<para>A journal context object returned by
|
||||||
<function>sd_journal_open()</function> references a
|
<function>sd_journal_open()</function> references a specific
|
||||||
specific journal entry as <emphasis>current</emphasis> entry,
|
journal entry as <emphasis>current</emphasis> entry, similar to a
|
||||||
similar to a file seek index in a classic file system
|
file seek index in a classic file system file, but without
|
||||||
file, but without absolute positions. It may be
|
absolute positions. It may be altered with
|
||||||
altered with
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and
|
||||||
and
|
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_head</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and related calls. The current entry position may be exported in
|
||||||
and related calls. The current entry position may be
|
<emphasis>cursor</emphasis> strings, as accessible via
|
||||||
exported in <emphasis>cursor</emphasis> strings, as accessible
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
via
|
Cursor strings may be used to globally identify a specific journal
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Cursor
|
entry in a stable way and then later to seek to it (or if the
|
||||||
strings may be used to globally identify a specific
|
specific entry is not available locally, to its closest entry in
|
||||||
journal entry in a stable way and then later to seek
|
time)
|
||||||
to it (or if the specific entry is not available
|
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
locally, to its closest entry in time)
|
|
||||||
<citerefentry><refentrytitle>sd_journal_seek_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
|
||||||
|
|
||||||
<para>Notification of journal changes is available via
|
<para>Notification of journal changes is available via
|
||||||
<function>sd_journal_get_fd()</function> and related
|
<function>sd_journal_get_fd()</function> and related calls.</para>
|
||||||
calls.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_open()</function>,
|
<para>The <function>sd_journal_open()</function>,
|
||||||
<function>sd_journal_open_directory()</function>, and
|
<function>sd_journal_open_directory()</function>, and
|
||||||
<function>sd_journal_open_files()</function> calls
|
<function>sd_journal_open_files()</function> calls return 0 on
|
||||||
return 0 on success or a negative errno-style error
|
success or a negative errno-style error code.
|
||||||
code. <function>sd_journal_close()</function> returns
|
<function>sd_journal_close()</function> returns nothing.</para>
|
||||||
nothing.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_open()</function>,
|
<para>The <function>sd_journal_open()</function>,
|
||||||
<function>sd_journal_open_directory()</function> and
|
<function>sd_journal_open_directory()</function> and
|
||||||
<function>sd_journal_close()</function> interfaces are
|
<function>sd_journal_close()</function> interfaces are available
|
||||||
available as a shared library, which can be compiled and
|
as a shared library, which can be compiled and linked to with the
|
||||||
linked to with the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para><function>sd_journal_open()</function>,
|
<para><function>sd_journal_open()</function>,
|
||||||
<function>sd_journal_close()</function>,
|
<function>sd_journal_close()</function>,
|
||||||
<constant>SD_JOURNAL_LOCAL_ONLY</constant>,
|
<constant>SD_JOURNAL_LOCAL_ONLY</constant>,
|
||||||
<constant>SD_JOURNAL_RUNTIME_ONLY</constant>,
|
<constant>SD_JOURNAL_RUNTIME_ONLY</constant>,
|
||||||
<constant>SD_JOURNAL_SYSTEM_ONLY</constant> were added
|
<constant>SD_JOURNAL_SYSTEM_ONLY</constant> were added in
|
||||||
in systemd-38.</para>
|
systemd-38.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_open_directory()</function>
|
<para><function>sd_journal_open_directory()</function> was added
|
||||||
was added in systemd-187.</para>
|
in systemd-187.</para>
|
||||||
|
|
||||||
<para><constant>SD_JOURNAL_SYSTEM</constant>,
|
<para><constant>SD_JOURNAL_SYSTEM</constant>,
|
||||||
<constant>SD_JOURNAL_CURRENT_USER</constant>,
|
<constant>SD_JOURNAL_CURRENT_USER</constant>, and
|
||||||
and <function>sd_journal_open_files()</function>
|
<function>sd_journal_open_files()</function> were added in
|
||||||
were added in systemd-205.
|
systemd-205. <constant>SD_JOURNAL_SYSTEM_ONLY</constant> was
|
||||||
<constant>SD_JOURNAL_SYSTEM_ONLY</constant>
|
deprecated.</para>
|
||||||
was deprecated.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-machined</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+203
-213
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,248 +23,238 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_print">
|
<refentry id="sd_journal_print">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_print</title>
|
<title>sd_journal_print</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_print</refentrytitle>
|
<refentrytitle>sd_journal_print</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_print</refname>
|
<refname>sd_journal_print</refname>
|
||||||
<refname>sd_journal_printv</refname>
|
<refname>sd_journal_printv</refname>
|
||||||
<refname>sd_journal_send</refname>
|
<refname>sd_journal_send</refname>
|
||||||
<refname>sd_journal_sendv</refname>
|
<refname>sd_journal_sendv</refname>
|
||||||
<refname>sd_journal_perror</refname>
|
<refname>sd_journal_perror</refname>
|
||||||
<refname>SD_JOURNAL_SUPPRESS_LOCATION</refname>
|
<refname>SD_JOURNAL_SUPPRESS_LOCATION</refname>
|
||||||
<refpurpose>Submit log entries to the journal</refpurpose>
|
<refpurpose>Submit log entries to the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_print</function></funcdef>
|
<funcdef>int <function>sd_journal_print</function></funcdef>
|
||||||
<paramdef>int <parameter>priority</parameter></paramdef>
|
<paramdef>int <parameter>priority</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>format</parameter></paramdef>
|
<paramdef>const char *<parameter>format</parameter></paramdef>
|
||||||
<paramdef>...</paramdef>
|
<paramdef>...</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_printv</function></funcdef>
|
<funcdef>int <function>sd_journal_printv</function></funcdef>
|
||||||
<paramdef>int <parameter>priority</parameter></paramdef>
|
<paramdef>int <parameter>priority</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>format</parameter></paramdef>
|
<paramdef>const char *<parameter>format</parameter></paramdef>
|
||||||
<paramdef>va_list <parameter>ap</parameter></paramdef>
|
<paramdef>va_list <parameter>ap</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_send</function></funcdef>
|
<funcdef>int <function>sd_journal_send</function></funcdef>
|
||||||
<paramdef>const char *<parameter>format</parameter></paramdef>
|
<paramdef>const char *<parameter>format</parameter></paramdef>
|
||||||
<paramdef>...</paramdef>
|
<paramdef>...</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_sendv</function></funcdef>
|
<funcdef>int <function>sd_journal_sendv</function></funcdef>
|
||||||
<paramdef>const struct iovec *<parameter>iov</parameter></paramdef>
|
<paramdef>const struct iovec *<parameter>iov</parameter></paramdef>
|
||||||
<paramdef>int <parameter>n</parameter></paramdef>
|
<paramdef>int <parameter>n</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_perror</function></funcdef>
|
<funcdef>int <function>sd_journal_perror</function></funcdef>
|
||||||
<paramdef>const char *<parameter>message</parameter></paramdef>
|
<paramdef>const char *<parameter>message</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_print()</function> may be
|
<para><function>sd_journal_print()</function> may be used to
|
||||||
used to submit simple, plain text log entries to the
|
submit simple, plain text log entries to the system journal. The
|
||||||
system journal. The first argument is a priority
|
first argument is a priority value. This is followed by a format
|
||||||
value. This is followed by a format string and its
|
string and its parameters, similar to
|
||||||
parameters, similar to
|
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
or
|
||||||
or
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
|
The priority value is one of
|
||||||
priority value is one of
|
<constant>LOG_EMERG</constant>,
|
||||||
<constant>LOG_EMERG</constant>,
|
<constant>LOG_ALERT</constant>,
|
||||||
<constant>LOG_ALERT</constant>,
|
<constant>LOG_CRIT</constant>,
|
||||||
<constant>LOG_CRIT</constant>,
|
<constant>LOG_ERR</constant>,
|
||||||
<constant>LOG_ERR</constant>,
|
<constant>LOG_WARNING</constant>,
|
||||||
<constant>LOG_WARNING</constant>,
|
<constant>LOG_NOTICE</constant>,
|
||||||
<constant>LOG_NOTICE</constant>,
|
<constant>LOG_INFO</constant>,
|
||||||
<constant>LOG_INFO</constant>,
|
<constant>LOG_DEBUG</constant>, as defined in
|
||||||
<constant>LOG_DEBUG</constant>, as defined in
|
<filename>syslog.h</filename>, see
|
||||||
<filename>syslog.h</filename>, see
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
for details. It is recommended to use this call to submit log
|
||||||
for details. It is recommended to use this call to
|
messages in the application locale or system locale and in UTF-8
|
||||||
submit log messages in the application locale or system
|
format, but no such restrictions are enforced.</para>
|
||||||
locale and in UTF-8 format, but no such restrictions
|
|
||||||
are enforced.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_printv()</function> is
|
<para><function>sd_journal_printv()</function> is similar to
|
||||||
similar to <function>sd_journal_print()</function> but
|
<function>sd_journal_print()</function> but takes a variable
|
||||||
takes a variable argument list encapsulated in an
|
argument list encapsulated in an object of type
|
||||||
object of type <varname>va_list</varname> (see
|
<varname>va_list</varname> (see
|
||||||
<citerefentry><refentrytitle>stdarg</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>stdarg</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for more information) instead of the format string. It
|
for more information) instead of the format string. It is
|
||||||
is otherwise equivalent in behavior.</para>
|
otherwise equivalent in behavior.</para>
|
||||||
|
|
||||||
<para><function>sd_journal_send()</function> may be
|
<para><function>sd_journal_send()</function> may be used to submit
|
||||||
used to submit structured log entries to the system
|
structured log entries to the system journal. It takes a series of
|
||||||
journal. It takes a series of format strings, each
|
format strings, each immediately followed by their associated
|
||||||
immediately followed by their associated parameters,
|
parameters, terminated by <constant>NULL</constant>. The strings
|
||||||
terminated by <constant>NULL</constant>. The strings passed should be of
|
passed should be of the format <literal>VARIABLE=value</literal>.
|
||||||
the format <literal>VARIABLE=value</literal>. The
|
The variable name must be in uppercase and consist only of
|
||||||
variable name must be in uppercase and consist only of
|
characters, numbers and underscores, and may not begin with an
|
||||||
characters, numbers and underscores, and may not begin
|
underscore. (All assignments that do not follow this syntax will
|
||||||
with an underscore. (All assignments that do not
|
be ignored.) The value can be of any size and format. It is highly
|
||||||
follow this syntax will be ignored.) The value can be
|
recommended to submit text strings formatted in the UTF-8
|
||||||
of any size and format. It is highly recommended to
|
character encoding only, and submit binary fields only when
|
||||||
submit text strings formatted in the UTF-8 character
|
formatting in UTF-8 strings is not sensible. A number of well
|
||||||
encoding only, and submit binary fields only when
|
known fields are defined, see
|
||||||
formatting in UTF-8 strings is not sensible. A number
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
of well known fields are defined, see
|
for details, but additional application defined fields may be
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
used. A variable may be assigned more than one value per
|
||||||
for details, but additional application defined fields
|
entry.</para>
|
||||||
may be used. A variable may be assigned more than one
|
|
||||||
value per entry.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_sendv()</function> is
|
<para><function>sd_journal_sendv()</function> is similar to
|
||||||
similar to <function>sd_journal_send()</function> but
|
<function>sd_journal_send()</function> but takes an array of
|
||||||
takes an array of <varname>struct iovec</varname> (as
|
<varname>struct iovec</varname> (as defined in
|
||||||
defined in <filename>uio.h</filename>, see
|
<filename>uio.h</filename>, see
|
||||||
<citerefentry><refentrytitle>readv</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>readv</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for details) instead of the format string. Each
|
for details) instead of the format string. Each structure should
|
||||||
structure should reference one field of the entry to
|
reference one field of the entry to submit. The second argument
|
||||||
submit. The second argument specifies the number of
|
specifies the number of structures in the array.
|
||||||
structures in the array.
|
<function>sd_journal_sendv()</function> is particularly useful to
|
||||||
<function>sd_journal_sendv()</function> is
|
submit binary objects to the journal where that is
|
||||||
particularly useful to submit binary objects to the
|
necessary.</para>
|
||||||
journal where that is necessary.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_perror()</function> is a
|
<para><function>sd_journal_perror()</function> is a similar to
|
||||||
similar to
|
<citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
and writes a message to the journal that consists of the passed
|
||||||
and writes a message to the journal that consists of
|
string, suffixed with ": " and a human readable representation of
|
||||||
the passed string, suffixed with ": " and a human
|
the current error code stored in
|
||||||
readable representation of the current error code
|
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
stored in
|
If the message string is passed as <constant>NULL</constant> or
|
||||||
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
|
empty string, only the error string representation will be
|
||||||
the message string is passed as <constant>NULL</constant> or empty string,
|
written, prefixed with nothing. An additional journal field ERRNO=
|
||||||
only the error string representation will be written,
|
is included in the entry containing the numeric error code
|
||||||
prefixed with nothing. An additional journal field
|
formatted as decimal string. The log priority used is
|
||||||
ERRNO= is included in the entry containing the numeric
|
<constant>LOG_ERR</constant> (3).</para>
|
||||||
error code formatted as decimal string. The log
|
|
||||||
priority used is <constant>LOG_ERR</constant> (3).</para>
|
|
||||||
|
|
||||||
<para>Note that <function>sd_journal_send()</function>
|
<para>Note that <function>sd_journal_send()</function> is a
|
||||||
is a wrapper around
|
wrapper around <function>sd_journal_sendv()</function> to make it
|
||||||
<function>sd_journal_sendv()</function> to make it
|
easier to use when only text strings shall be submitted. Also, the
|
||||||
easier to use when only text strings shall be
|
following two calls are mostly equivalent:</para>
|
||||||
submitted. Also, the following two calls are
|
|
||||||
mostly equivalent:</para>
|
|
||||||
|
|
||||||
<programlisting>sd_journal_print(LOG_INFO, "Hello World, this is PID %lu!", (unsigned long) getpid());
|
<programlisting>sd_journal_print(LOG_INFO, "Hello World, this is PID %lu!", (unsigned long) getpid());
|
||||||
|
|
||||||
sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(),
|
sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(),
|
||||||
"PRIORITY=%i", LOG_INFO,
|
"PRIORITY=%i", LOG_INFO,
|
||||||
NULL);</programlisting>
|
NULL);</programlisting>
|
||||||
|
|
||||||
<para>Note that these calls implicitly add fields for
|
<para>Note that these calls implicitly add fields for the source
|
||||||
the source file, function name and code line where
|
file, function name and code line where invoked. This is
|
||||||
invoked. This is implemented with macros. If this is
|
implemented with macros. If this is not desired, it can be turned
|
||||||
not desired, it can be turned off by defining
|
off by defining SD_JOURNAL_SUPPRESS_LOCATION before including
|
||||||
SD_JOURNAL_SUPPRESS_LOCATION before including
|
<filename>sd-journal.h</filename>.</para>
|
||||||
<filename>sd-journal.h</filename>.</para>
|
|
||||||
|
|
||||||
<para><citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<para><citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
and <function>sd_journal_print()</function> may
|
and <function>sd_journal_print()</function> may
|
||||||
largely be used interchangeably
|
largely be used interchangeably
|
||||||
functionality-wise. However, note that log messages
|
functionality-wise. However, note that log messages
|
||||||
logged via the former take a different path to the
|
logged via the former take a different path to the
|
||||||
journal server than the later, and hence global
|
journal server than the later, and hence global
|
||||||
chronological ordering between the two streams cannot
|
chronological ordering between the two streams cannot
|
||||||
be guaranteed. Using
|
be guaranteed. Using
|
||||||
<function>sd_journal_print()</function> has the
|
<function>sd_journal_print()</function> has the
|
||||||
benefit of logging source code line, filenames, and
|
benefit of logging source code line, filenames, and
|
||||||
functions as metadata along all entries, and
|
functions as metadata along all entries, and
|
||||||
guaranteeing chronological ordering with structured
|
guaranteeing chronological ordering with structured
|
||||||
log entries that are generated via
|
log entries that are generated via
|
||||||
<function>sd_journal_send()</function>. Using
|
<function>sd_journal_send()</function>. Using
|
||||||
<function>syslog()</function> has the benefit of being
|
<function>syslog()</function> has the benefit of being
|
||||||
more portable.</para>
|
more portable.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The four calls return 0 on success or a negative
|
<para>The four calls return 0 on success or a negative errno-style
|
||||||
errno-style error code. The
|
error code. The
|
||||||
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
variable itself is not altered.</para>
|
variable itself is not altered.</para>
|
||||||
|
|
||||||
<para>If
|
<para>If
|
||||||
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
is not running (the socket is not present), those
|
is not running (the socket is not present), those functions do
|
||||||
functions do nothing, and also return 0.</para>
|
nothing, and also return 0.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Async signal safety</title>
|
<title>Async signal safety</title>
|
||||||
<para><function>sd_journal_sendv()</function> is "async signal
|
<para><function>sd_journal_sendv()</function> is "async signal
|
||||||
safe" in the meaning of <citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
safe" in the meaning of
|
||||||
</para>
|
<citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para><function>sd_journal_print</function>,
|
<para><function>sd_journal_print</function>,
|
||||||
<function>sd_journal_printv</function>,
|
<function>sd_journal_printv</function>,
|
||||||
<function>sd_journal_send</function>, and
|
<function>sd_journal_send</function>, and
|
||||||
<function>sd_journal_perror</function> are
|
<function>sd_journal_perror</function> are
|
||||||
not async signal safe.</para>
|
not async signal safe.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_print()</function>,
|
<para>The <function>sd_journal_print()</function>,
|
||||||
<function>sd_journal_printv()</function>,
|
<function>sd_journal_printv()</function>,
|
||||||
<function>sd_journal_send()</function> and
|
<function>sd_journal_send()</function> and
|
||||||
<function>sd_journal_sendv()</function> interfaces
|
<function>sd_journal_sendv()</function> interfaces are available
|
||||||
are available as a shared library, which can be compiled
|
as a shared library, which can be compiled and linked to with the
|
||||||
and linked to with the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
file.</para>
|
||||||
file.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_stream_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>perror</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>signal</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>socket</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+149
-158
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,193 +23,184 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_query_unique">
|
<refentry id="sd_journal_query_unique">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_query_unique</title>
|
<title>sd_journal_query_unique</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_query_unique</refentrytitle>
|
<refentrytitle>sd_journal_query_unique</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_query_unique</refname>
|
<refname>sd_journal_query_unique</refname>
|
||||||
<refname>sd_journal_enumerate_unique</refname>
|
<refname>sd_journal_enumerate_unique</refname>
|
||||||
<refname>sd_journal_restart_unique</refname>
|
<refname>sd_journal_restart_unique</refname>
|
||||||
<refname>SD_JOURNAL_FOREACH_UNIQUE</refname>
|
<refname>SD_JOURNAL_FOREACH_UNIQUE</refname>
|
||||||
<refpurpose>Read unique data fields from the journal</refpurpose>
|
<refpurpose>Read unique data fields from the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_query_unique</function></funcdef>
|
<funcdef>int <function>sd_journal_query_unique</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>field</parameter></paramdef>
|
<paramdef>const char *<parameter>field</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_enumerate_unique</function></funcdef>
|
<funcdef>int <function>sd_journal_enumerate_unique</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const void **<parameter>data</parameter></paramdef>
|
<paramdef>const void **<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
<paramdef>size_t *<parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>void <function>sd_journal_restart_unique</function></funcdef>
|
<funcdef>void <function>sd_journal_restart_unique</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef><function>SD_JOURNAL_FOREACH_UNIQUE</function></funcdef>
|
<funcdef><function>SD_JOURNAL_FOREACH_UNIQUE</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const void *<parameter>data</parameter></paramdef>
|
<paramdef>const void *<parameter>data</parameter></paramdef>
|
||||||
<paramdef>size_t <parameter>length</parameter></paramdef>
|
<paramdef>size_t <parameter>length</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_query_unique()</function>
|
<para><function>sd_journal_query_unique()</function> queries the
|
||||||
queries the journal for all unique values the
|
journal for all unique values the specified field can take. It
|
||||||
specified field can take. It takes two arguments: the
|
takes two arguments: the journal to query and the field name to
|
||||||
journal to query and the field name to look
|
look for. Well-known field names are listed on
|
||||||
for. Well-known field names are listed on
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Field
|
Field names must be specified without a trailing '='. After this
|
||||||
names must be specified without a trailing '='. After
|
function has been executed successfully the field values may be
|
||||||
this function has been executed successfully the field
|
queried using <function>sd_journal_enumerate_unique()</function>.
|
||||||
values may be queried using
|
Invoking this call a second time will change the field name being
|
||||||
<function>sd_journal_enumerate_unique()</function>. Invoking
|
queried and reset the enumeration index to the first field value
|
||||||
this call a second time will change the field name
|
that matches.</para>
|
||||||
being queried and reset the enumeration index to the
|
|
||||||
first field value that matches.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_enumerate_unique()</function>
|
<para><function>sd_journal_enumerate_unique()</function> may be
|
||||||
may be used to iterate through all data fields which
|
used to iterate through all data fields which match the previously
|
||||||
match the previously selected field name as set with
|
selected field name as set with
|
||||||
<function>sd_journal_query_unique()</function>. On
|
<function>sd_journal_query_unique()</function>. On each invocation
|
||||||
each invocation the next field data matching the field
|
the next field data matching the field name is returned. The order
|
||||||
name is returned. The order of the returned data
|
of the returned data fields is not defined. It takes three
|
||||||
fields is not defined. It takes three arguments: the
|
arguments: the journal context object, plus a pair of pointers to
|
||||||
journal context object, plus a pair of pointers to
|
pointer/size variables where the data object and its size shall be
|
||||||
pointer/size variables where the data object and its
|
stored in. The returned data is in a read-only memory map and is
|
||||||
size shall be stored in. The returned data is in a
|
only valid until the next invocation of
|
||||||
read-only memory map and is only valid until the next
|
<function>sd_journal_enumerate_unique()</function>. Note that the
|
||||||
invocation of
|
data returned will be prefixed with the field name and '='. Note
|
||||||
<function>sd_journal_enumerate_unique()</function>. Note
|
that this call is subject to the data field size threshold as
|
||||||
that the data returned will be prefixed with the field
|
controlled by
|
||||||
name and '='. Note that this call is subject to the
|
<function>sd_journal_set_data_threshold()</function>.</para>
|
||||||
data field size threshold as controlled by
|
|
||||||
<function>sd_journal_set_data_threshold()</function>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_restart_unique()</function>
|
<para><function>sd_journal_restart_unique()</function> resets the
|
||||||
resets the data enumeration index to the beginning of
|
data enumeration index to the beginning of the list. The next
|
||||||
the list. The next invocation of
|
invocation of <function>sd_journal_enumerate_unique()</function>
|
||||||
<function>sd_journal_enumerate_unique()</function>
|
will return the first field data matching the field name
|
||||||
will return the first field data matching the field
|
again.</para>
|
||||||
name again.</para>
|
|
||||||
|
|
||||||
<para>Note that the
|
<para>Note that the
|
||||||
<function>SD_JOURNAL_FOREACH_UNIQUE()</function> macro
|
<function>SD_JOURNAL_FOREACH_UNIQUE()</function> macro may be used
|
||||||
may be used as a handy wrapper around
|
as a handy wrapper around
|
||||||
<function>sd_journal_restart_unique()</function> and
|
<function>sd_journal_restart_unique()</function> and
|
||||||
<function>sd_journal_enumerate_unique()</function>.</para>
|
<function>sd_journal_enumerate_unique()</function>.</para>
|
||||||
|
|
||||||
<para>Note that these functions currently are not
|
<para>Note that these functions currently are not influenced by
|
||||||
influenced by matches set with
|
matches set with <function>sd_journal_add_match()</function> but
|
||||||
<function>sd_journal_add_match()</function> but this
|
this might change in a later version of this software.</para>
|
||||||
might change in a later version of this
|
</refsect1>
|
||||||
software.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para><function>sd_journal_query_unique()</function>
|
<para><function>sd_journal_query_unique()</function> returns 0 on
|
||||||
returns 0 on success or a negative errno-style error
|
success or a negative errno-style error code.
|
||||||
code. <function>sd_journal_enumerate_unique()</function>
|
<function>sd_journal_enumerate_unique()</function> returns a
|
||||||
returns a positive integer if the next field data has
|
positive integer if the next field data has been read, 0 when no
|
||||||
been read, 0 when no more fields are known, or a
|
more fields are known, or a negative errno-style error code.
|
||||||
negative errno-style error
|
<function>sd_journal_restart_unique()</function> returns
|
||||||
code. <function>sd_journal_restart_unique()</function>
|
nothing.</para>
|
||||||
returns nothing.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_query_unique()</function>,
|
<para>The <function>sd_journal_query_unique()</function>,
|
||||||
<function>sd_journal_enumerate_unique()</function> and
|
<function>sd_journal_enumerate_unique()</function> and
|
||||||
<function>sd_journal_restart_unique()</function>
|
<function>sd_journal_restart_unique()</function> interfaces are
|
||||||
interfaces are available as a shared library, which can
|
available as a shared library, which can be compiled and linked to
|
||||||
be compiled and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>Use the
|
<para>Use the <function>SD_JOURNAL_FOREACH_UNIQUE</function> macro
|
||||||
<function>SD_JOURNAL_FOREACH_UNIQUE</function> macro
|
to iterate through all values a field of the journal can take. The
|
||||||
to iterate through all values a field of the journal
|
following example lists all unit names referenced in the
|
||||||
can take. The following example lists all unit names
|
journal:</para>
|
||||||
referenced in the journal:</para>
|
|
||||||
|
|
||||||
<programlisting>#include <stdio.h>
|
<programlisting>#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <systemd/sd-journal.h>
|
#include <systemd/sd-journal.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
sd_journal *j;
|
sd_journal *j;
|
||||||
const void *d;
|
const void *d;
|
||||||
size_t l;
|
size_t l;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
r = sd_journal_query_unique(j, "_SYSTEMD_UNIT");
|
r = sd_journal_query_unique(j, "_SYSTEMD_UNIT");
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
fprintf(stderr, "Failed to query journal: %s\n", strerror(-r));
|
fprintf(stderr, "Failed to query journal: %s\n", strerror(-r));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
SD_JOURNAL_FOREACH_UNIQUE(j, d, l)
|
SD_JOURNAL_FOREACH_UNIQUE(j, d, l)
|
||||||
printf("%.*s\n", (int) l, (const char*) d);
|
printf("%.*s\n", (int) l, (const char*) d);
|
||||||
sd_journal_close(j);
|
sd_journal_close(j);
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_add_match</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+124
-131
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,157 +23,150 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_seek_head">
|
<refentry id="sd_journal_seek_head">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_seek_head</title>
|
<title>sd_journal_seek_head</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_seek_head</refentrytitle>
|
<refentrytitle>sd_journal_seek_head</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_seek_head</refname>
|
<refname>sd_journal_seek_head</refname>
|
||||||
<refname>sd_journal_seek_tail</refname>
|
<refname>sd_journal_seek_tail</refname>
|
||||||
<refname>sd_journal_seek_monotonic_usec</refname>
|
<refname>sd_journal_seek_monotonic_usec</refname>
|
||||||
<refname>sd_journal_seek_realtime_usec</refname>
|
<refname>sd_journal_seek_realtime_usec</refname>
|
||||||
<refname>sd_journal_seek_cursor</refname>
|
<refname>sd_journal_seek_cursor</refname>
|
||||||
<refpurpose>Seek to a position in the
|
<refpurpose>Seek to a position in the
|
||||||
journal</refpurpose>
|
journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_seek_head</function></funcdef>
|
<funcdef>int <function>sd_journal_seek_head</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_seek_tail</function></funcdef>
|
<funcdef>int <function>sd_journal_seek_tail</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_seek_monotonic_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_seek_monotonic_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>sd_id128_t <parameter>boot_id</parameter></paramdef>
|
<paramdef>sd_id128_t <parameter>boot_id</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t <parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_seek_realtime_usec</function></funcdef>
|
<funcdef>int <function>sd_journal_seek_realtime_usec</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>uint64_t <parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t <parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_seek_cursor</function></funcdef>
|
<funcdef>int <function>sd_journal_seek_cursor</function></funcdef>
|
||||||
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
<paramdef>sd_journal *<parameter>j</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>cursor</parameter></paramdef>
|
<paramdef>const char *<parameter>cursor</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_seek_head()</function>
|
<para><function>sd_journal_seek_head()</function> seeks to the
|
||||||
seeks to the beginning of the journal, i.e. the oldest
|
beginning of the journal, i.e. the oldest available entry.</para>
|
||||||
available entry.</para>
|
|
||||||
|
|
||||||
<para>Similarly,
|
<para>Similarly, <function>sd_journal_seek_tail()</function> may
|
||||||
<function>sd_journal_seek_tail()</function> may be
|
be used to seek to the end of the journal, i.e. the most recent
|
||||||
used to seek to the end of the journal, i.e. the most
|
available entry.</para>
|
||||||
recent available entry.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_seek_monotonic_usec()</function>
|
<para><function>sd_journal_seek_monotonic_usec()</function> seeks
|
||||||
seeks to the entry with the specified monotonic
|
to the entry with the specified monotonic timestamp, i.e.
|
||||||
timestamp,
|
<constant>CLOCK_MONOTONIC</constant>. Since monotonic time
|
||||||
i.e. <constant>CLOCK_MONOTONIC</constant>. Since
|
restarts on every reboot a boot ID needs to be specified as
|
||||||
monotonic time restarts on every reboot a boot ID
|
well.</para>
|
||||||
needs to be specified as well.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_seek_realtime_usec()</function>
|
<para><function>sd_journal_seek_realtime_usec()</function> seeks
|
||||||
seeks to the entry with the specified realtime
|
to the entry with the specified realtime (wallclock) timestamp,
|
||||||
(wallclock) timestamp,
|
i.e. <constant>CLOCK_REALTIME</constant>. Note that the realtime
|
||||||
i.e. <constant>CLOCK_REALTIME</constant>. Note that
|
clock is not necessarily monotonic. If a realtime timestamp is
|
||||||
the realtime clock is not necessarily monotonic. If a
|
ambiguous, it is not defined which position is sought to.</para>
|
||||||
realtime timestamp is ambiguous, it is not defined
|
|
||||||
which position is sought to.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_seek_cursor()</function>
|
<para><function>sd_journal_seek_cursor()</function> seeks to the
|
||||||
seeks to the entry located at the specified cursor
|
entry located at the specified cursor string. For details on
|
||||||
string. For details on cursors, see
|
cursors, see
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
no entry matching the specified cursor is found the
|
If no entry matching the specified cursor is found the call will
|
||||||
call will seek to the next closest entry (in terms of
|
seek to the next closest entry (in terms of time) instead. To
|
||||||
time) instead. To verify whether the newly selected
|
verify whether the newly selected entry actually matches the
|
||||||
entry actually matches the cursor, use
|
cursor, use
|
||||||
<citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>sd_journal_test_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
|
||||||
|
|
||||||
<para>Note that these calls do not actually make any
|
<para>Note that these calls do not actually make any entry the new
|
||||||
entry the new current entry, this needs to be done in
|
current entry, this needs to be done in a separate step with a
|
||||||
a separate step with a subsequent
|
subsequent
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
invocation (or a similar call). Only then, entry data
|
invocation (or a similar call). Only then, entry data may be
|
||||||
may be retrieved via
|
retrieved via
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
no entry exists that matches exactly the specified
|
If no entry exists that matches exactly the specified seek
|
||||||
seek address, the next closest is sought to. If
|
address, the next closest is sought to. If
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
is used, the closest following entry will be sought to,
|
is used, the closest following entry will be sought to, if
|
||||||
if
|
<citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sd_journal_previous</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
is used the closest preceding entry is sought to.</para>
|
||||||
is used the closest preceding entry is sought
|
</refsect1>
|
||||||
to.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>The functions return 0 on success or a negative
|
<para>The functions return 0 on success or a negative errno-style
|
||||||
errno-style error code.</para>
|
error code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_journal_seek_head()</function>,
|
<para>The <function>sd_journal_seek_head()</function>,
|
||||||
<function>sd_journal_seek_tail()</function>,
|
<function>sd_journal_seek_tail()</function>,
|
||||||
<function>sd_journal_seek_monotonic_usec()</function>,
|
<function>sd_journal_seek_monotonic_usec()</function>,
|
||||||
<function>sd_journal_seek_realtime_usec()</function>,
|
<function>sd_journal_seek_realtime_usec()</function>,
|
||||||
and <function>sd_journal_seek_cursor()</function>
|
and <function>sd_journal_seek_cursor()</function>
|
||||||
interfaces are available as a shared library, which can
|
interfaces are available as a shared library, which can
|
||||||
be compiled and linked to with the
|
be compiled and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_next</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_data</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_get_cursor</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_journal_get_realtime_usec</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+109
-116
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,108 +23,101 @@
|
|||||||
|
|
||||||
<refentry id="sd_journal_stream_fd">
|
<refentry id="sd_journal_stream_fd">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_journal_stream_fd</title>
|
<title>sd_journal_stream_fd</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_journal_stream_fd</refentrytitle>
|
<refentrytitle>sd_journal_stream_fd</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_journal_stream_fd</refname>
|
<refname>sd_journal_stream_fd</refname>
|
||||||
<refpurpose>Create log stream file descriptor to the journal</refpurpose>
|
<refpurpose>Create log stream file descriptor to the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_journal_stream_fd</function></funcdef>
|
<funcdef>int <function>sd_journal_stream_fd</function></funcdef>
|
||||||
<paramdef>const char *<parameter>identifier</parameter></paramdef>
|
<paramdef>const char *<parameter>identifier</parameter></paramdef>
|
||||||
<paramdef>int <parameter>priority</parameter></paramdef>
|
<paramdef>int <parameter>priority</parameter></paramdef>
|
||||||
<paramdef>int <parameter>level_prefix</parameter></paramdef>
|
<paramdef>int <parameter>level_prefix</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_journal_stream_fd()</function> may
|
<para><function>sd_journal_stream_fd()</function> may be used to
|
||||||
be used to create a log stream file descriptor. Log
|
create a log stream file descriptor. Log messages written to this
|
||||||
messages written to this file descriptor as simple
|
file descriptor as simple newline-separated text strings are
|
||||||
newline-separated text strings are written to the
|
written to the journal. This file descriptor can be used
|
||||||
journal. This file descriptor can be used internally
|
internally by applications or be made standard output or standard
|
||||||
by applications or be made standard output or standard
|
error of other processes executed.</para>
|
||||||
error of other processes executed.</para>
|
|
||||||
|
|
||||||
<para><function>sd_journal_stream_fd()</function>
|
<para><function>sd_journal_stream_fd()</function> takes a short
|
||||||
takes a short program identifier string as first
|
program identifier string as first argument, which will be written
|
||||||
argument, which will be written to the journal as
|
to the journal as _SYSLOG_IDENTIFIER= field for each log entry
|
||||||
_SYSLOG_IDENTIFIER= field for each log entry (see
|
(see
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
for more information). The second argument shall be
|
for more information). The second argument shall be the default
|
||||||
the default priority level for all messages. The
|
priority level for all messages. The priority level is one of
|
||||||
priority level is one of <constant>LOG_EMERG</constant>,
|
<constant>LOG_EMERG</constant>, <constant>LOG_ALERT</constant>,
|
||||||
<constant>LOG_ALERT</constant>,
|
<constant>LOG_CRIT</constant>, <constant>LOG_ERR</constant>,
|
||||||
<constant>LOG_CRIT</constant>,
|
<constant>LOG_WARNING</constant>, <constant>LOG_NOTICE</constant>,
|
||||||
<constant>LOG_ERR</constant>,
|
<constant>LOG_INFO</constant>, <constant>LOG_DEBUG</constant>, as
|
||||||
<constant>LOG_WARNING</constant>,
|
defined in <filename>syslog.h</filename>, see
|
||||||
<constant>LOG_NOTICE</constant>,
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<constant>LOG_INFO</constant>,
|
for details. The third argument is a boolean: if true kernel-style
|
||||||
<constant>LOG_DEBUG</constant>, as defined in
|
log level prefixes (such as <constant>SD_WARNING</constant>) are
|
||||||
<filename>syslog.h</filename>, see
|
interpreted, see
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for details. The third argument is a boolean: if true
|
for more information.</para>
|
||||||
kernel-style log level prefixes (such as
|
|
||||||
<constant>SD_WARNING</constant>) are interpreted, see
|
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
for more information.</para>
|
|
||||||
|
|
||||||
<para>It is recommended that applications log UTF-8
|
<para>It is recommended that applications log UTF-8 messages only
|
||||||
messages only with this API, but this is not
|
with this API, but this is not enforced.</para>
|
||||||
enforced.</para>
|
</refsect1>
|
||||||
|
|
||||||
</refsect1>
|
<refsect1>
|
||||||
|
<title>Return Value</title>
|
||||||
|
|
||||||
<refsect1>
|
<para>The call returns a valid write-only file descriptor on
|
||||||
<title>Return Value</title>
|
success or a negative errno-style error code.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<para>The call returns a valid write-only file descriptor on success or a
|
<refsect1>
|
||||||
negative errno-style error code.</para>
|
<title>Notes</title>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<para>The <function>sd_journal_stream_fd()</function> interface is
|
||||||
<title>Notes</title>
|
available as a shared library, which can be compiled and linked to
|
||||||
|
with the
|
||||||
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
|
file.</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<para>The <function>sd_journal_stream_fd()</function>
|
<refsect1>
|
||||||
interface is available as a shared library, which can
|
<title>Examples</title>
|
||||||
be compiled and linked to with the
|
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
|
||||||
file.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<para>Creating a log stream suitable for
|
||||||
<title>Examples</title>
|
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>:</para>
|
||||||
|
|
||||||
<para>Creating a log stream suitable for
|
<programlisting>#include <syslog.h>
|
||||||
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>:</para>
|
|
||||||
|
|
||||||
<programlisting>#include <syslog.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -132,39 +125,39 @@
|
|||||||
#include <systemd/sd-daemon.h>
|
#include <systemd/sd-daemon.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int fd;
|
int fd;
|
||||||
FILE *log;
|
FILE *log;
|
||||||
fd = sd_journal_stream_fd("test", LOG_INFO, 1);
|
fd = sd_journal_stream_fd("test", LOG_INFO, 1);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "Failed to create stream fd: %s\n", strerror(-fd));
|
fprintf(stderr, "Failed to create stream fd: %s\n", strerror(-fd));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
log = fdopen(fd, "w");
|
log = fdopen(fd, "w");
|
||||||
if (!log) {
|
if (!log) {
|
||||||
fprintf(stderr, "Failed to create file object: %m\n");
|
fprintf(stderr, "Failed to create file object: %m\n");
|
||||||
close(fd);
|
close(fd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
fprintf(log, "Hello World!\n");
|
fprintf(log, "Hello World!\n");
|
||||||
fprintf(log, SD_WARNING "This is a warning!\n");
|
fprintf(log, SD_WARNING "This is a warning!\n");
|
||||||
fclose(log);
|
fclose(log);
|
||||||
return 0;
|
return 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>fprintf</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+128
-137
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,164 +22,155 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd_listen_fds"
|
<refentry id="sd_listen_fds"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_listen_fds</title>
|
<title>sd_listen_fds</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_listen_fds</refentrytitle>
|
<refentrytitle>sd_listen_fds</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_listen_fds</refname>
|
<refname>sd_listen_fds</refname>
|
||||||
<refname>SD_LISTEN_FDS_START</refname>
|
<refname>SD_LISTEN_FDS_START</refname>
|
||||||
<refpurpose>Check for file descriptors passed by the system manager</refpurpose>
|
<refpurpose>Check for file descriptors passed by the system manager</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcsynopsisinfo>#define SD_LISTEN_FDS_START 3</funcsynopsisinfo>
|
<funcsynopsisinfo>#define SD_LISTEN_FDS_START 3</funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_listen_fds</function></funcdef>
|
<funcdef>int <function>sd_listen_fds</function></funcdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_listen_fds()</function> shall be
|
<para><function>sd_listen_fds()</function> shall be called by a
|
||||||
called by a daemon to check for file descriptors
|
daemon to check for file descriptors passed by the init system as
|
||||||
passed by the init system as part of the socket-based
|
part of the socket-based activation logic.</para>
|
||||||
activation logic.</para>
|
|
||||||
|
|
||||||
<para>If the <parameter>unset_environment</parameter>
|
<para>If the <parameter>unset_environment</parameter> parameter is
|
||||||
parameter is non-zero,
|
non-zero, <function>sd_listen_fds()</function> will unset the
|
||||||
<function>sd_listen_fds()</function> will unset the
|
<varname>$LISTEN_FDS</varname> and <varname>$LISTEN_PID</varname>
|
||||||
<varname>$LISTEN_FDS</varname> and <varname>$LISTEN_PID</varname>
|
environment variables before returning (regardless of whether the
|
||||||
environment variables before returning (regardless of
|
function call itself succeeded or not). Further calls to
|
||||||
whether the function call itself succeeded or
|
<function>sd_listen_fds()</function> will then fail, but the
|
||||||
not). Further calls to
|
variables are no longer inherited by child processes.</para>
|
||||||
<function>sd_listen_fds()</function> will then fail,
|
|
||||||
but the variables are no longer inherited by child
|
|
||||||
processes.</para>
|
|
||||||
|
|
||||||
<para>If a daemon receives more than one file
|
<para>If a daemon receives more than one file descriptor, they
|
||||||
descriptor, they will be passed in the same order as
|
will be passed in the same order as configured in the systemd
|
||||||
configured in the systemd socket unit file (see
|
socket unit file (see
|
||||||
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for details). Nonetheless, it is recommended to verify
|
for details). Nonetheless, it is recommended to verify the correct
|
||||||
the correct socket types before using them. To
|
socket types before using them. To simplify this checking, the
|
||||||
simplify this checking, the functions
|
functions
|
||||||
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
are provided. In order to maximize flexibility, it is
|
are provided. In order to maximize flexibility, it is recommended
|
||||||
recommended to make these checks as loose as possible
|
to make these checks as loose as possible without allowing
|
||||||
without allowing incorrect setups. i.e. often, the
|
incorrect setups. i.e. often, the actual port number a socket is
|
||||||
actual port number a socket is bound to matters little
|
bound to matters little for the service to work, hence it should
|
||||||
for the service to work, hence it should not be
|
not be verified. On the other hand, whether a socket is a datagram
|
||||||
verified. On the other hand, whether a socket is a
|
or stream socket matters a lot for the most common program logics
|
||||||
datagram or stream socket matters a lot for the most
|
and should be checked.</para>
|
||||||
common program logics and should be checked.</para>
|
|
||||||
|
|
||||||
<para>This function call will set the FD_CLOEXEC flag
|
<para>This function call will set the FD_CLOEXEC flag for all
|
||||||
for all passed file descriptors to avoid further
|
passed file descriptors to avoid further inheritance to children
|
||||||
inheritance to children of the calling process.</para>
|
of the calling process.</para>
|
||||||
|
|
||||||
<para>If multiple socket units activate the same
|
<para>If multiple socket units activate the same service the order
|
||||||
service the order of the file descriptors passed to
|
of the file descriptors passed to its main process is undefined.
|
||||||
its main process is undefined. If additional file
|
If additional file descriptors have been passed to the service
|
||||||
descriptors have been passed to the service manager
|
manager using
|
||||||
using
|
<citerefentry><refentrytitle>sd_pid_notify_with_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
|
||||||
<citerefentry><refentrytitle>sd_pid_notify_with_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>'s
|
<literal>FDSTORE=1</literal> messages, these file descriptors are
|
||||||
<literal>FDSTORE=1</literal> messages, these file
|
passed last, in arbitrary order, and with duplicates
|
||||||
descriptors are passed last, in arbitrary order, and
|
removed.</para>
|
||||||
with duplicates removed.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On failure, this call returns a negative
|
<para>On failure, this call returns a negative errno-style error
|
||||||
errno-style error code. If
|
code. If
|
||||||
<varname>$LISTEN_FDS</varname>/<varname>$LISTEN_PID</varname>
|
<varname>$LISTEN_FDS</varname>/<varname>$LISTEN_PID</varname> was
|
||||||
was not set or was not correctly set for this daemon and
|
not set or was not correctly set for this daemon and hence no file
|
||||||
hence no file descriptors were received, 0 is
|
descriptors were received, 0 is returned. Otherwise, the number of
|
||||||
returned. Otherwise, the number of file descriptors
|
file descriptors passed is returned. The application may find them
|
||||||
passed is returned. The application may find them
|
starting with file descriptor SD_LISTEN_FDS_START, i.e. file
|
||||||
starting with file descriptor SD_LISTEN_FDS_START,
|
descriptor 3.</para>
|
||||||
i.e. file descriptor 3.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
||||||
|
|
||||||
<para>Internally, this function checks whether the
|
<para>Internally, this function checks whether the
|
||||||
<varname>$LISTEN_PID</varname> environment variable
|
<varname>$LISTEN_PID</varname> environment variable equals the
|
||||||
equals the daemon PID. If not, it returns
|
daemon PID. If not, it returns immediately. Otherwise, it parses
|
||||||
immediately. Otherwise, it parses the number passed in
|
the number passed in the <varname>$LISTEN_FDS</varname>
|
||||||
the <varname>$LISTEN_FDS</varname> environment
|
environment variable, then sets the FD_CLOEXEC flag for the parsed
|
||||||
variable, then sets the FD_CLOEXEC flag for the parsed
|
number of file descriptors starting from SD_LISTEN_FDS_START.
|
||||||
number of file descriptors starting from
|
Finally, it returns the parsed number.</para>
|
||||||
SD_LISTEN_FDS_START. Finally, it returns the parsed
|
</refsect1>
|
||||||
number.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$LISTEN_PID</varname></term>
|
<term><varname>$LISTEN_PID</varname></term>
|
||||||
<term><varname>$LISTEN_FDS</varname></term>
|
<term><varname>$LISTEN_FDS</varname></term>
|
||||||
|
|
||||||
<listitem><para>Set by the init system
|
<listitem><para>Set by the init system
|
||||||
for supervised processes that use
|
for supervised processes that use
|
||||||
socket-based activation. This
|
socket-based activation. This
|
||||||
environment variable specifies the
|
environment variable specifies the
|
||||||
data
|
data
|
||||||
<function>sd_listen_fds()</function>
|
<function>sd_listen_fds()</function>
|
||||||
parses. See above for
|
parses. See above for
|
||||||
details.</para></listitem>
|
details.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_fifo</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_socket</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_socket_inet</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_is_socket_unix</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+175
-187
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,223 +23,211 @@
|
|||||||
|
|
||||||
<refentry id="sd_login_monitor_new" conditional='HAVE_PAM'>
|
<refentry id="sd_login_monitor_new" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_login_monitor_new</title>
|
<title>sd_login_monitor_new</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_login_monitor_new</refentrytitle>
|
<refentrytitle>sd_login_monitor_new</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_login_monitor_new</refname>
|
<refname>sd_login_monitor_new</refname>
|
||||||
<refname>sd_login_monitor_unref</refname>
|
<refname>sd_login_monitor_unref</refname>
|
||||||
<refname>sd_login_monitor_flush</refname>
|
<refname>sd_login_monitor_flush</refname>
|
||||||
<refname>sd_login_monitor_get_fd</refname>
|
<refname>sd_login_monitor_get_fd</refname>
|
||||||
<refname>sd_login_monitor_get_events</refname>
|
<refname>sd_login_monitor_get_events</refname>
|
||||||
<refname>sd_login_monitor_get_timeout</refname>
|
<refname>sd_login_monitor_get_timeout</refname>
|
||||||
<refname>sd_login_monitor</refname>
|
<refname>sd_login_monitor</refname>
|
||||||
<refpurpose>Monitor login sessions, seats, users and virtual machines/containers</refpurpose>
|
<refpurpose>Monitor login sessions, seats, users and virtual machines/containers</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_login_monitor_new</function></funcdef>
|
<funcdef>int <function>sd_login_monitor_new</function></funcdef>
|
||||||
<paramdef>const char *<parameter>category</parameter></paramdef>
|
<paramdef>const char *<parameter>category</parameter></paramdef>
|
||||||
<paramdef>sd_login_monitor **<parameter>ret</parameter></paramdef>
|
<paramdef>sd_login_monitor **<parameter>ret</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>sd_login_monitor *<function>sd_login_monitor_unref</function></funcdef>
|
<funcdef>sd_login_monitor *<function>sd_login_monitor_unref</function></funcdef>
|
||||||
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_login_monitor_flush</function></funcdef>
|
<funcdef>int <function>sd_login_monitor_flush</function></funcdef>
|
||||||
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_login_monitor_get_fd</function></funcdef>
|
<funcdef>int <function>sd_login_monitor_get_fd</function></funcdef>
|
||||||
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_login_monitor_get_events</function></funcdef>
|
<funcdef>int <function>sd_login_monitor_get_events</function></funcdef>
|
||||||
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_login_monitor_get_timeout</function></funcdef>
|
<funcdef>int <function>sd_login_monitor_get_timeout</function></funcdef>
|
||||||
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
<paramdef>sd_login_monitor *<parameter>m</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>timeout_usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>timeout_usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_login_monitor_new()</function> may
|
<para><function>sd_login_monitor_new()</function> may be used to
|
||||||
be used to monitor login sessions, users, seats, and
|
monitor login sessions, users, seats, and virtual
|
||||||
virtual machines/containers. Via a monitor object a
|
machines/containers. Via a monitor object a file descriptor can be
|
||||||
file descriptor can be integrated into an application
|
integrated into an application defined event loop which is woken
|
||||||
defined event loop which is woken up each time a user
|
up each time a user logs in, logs out or a seat is added or
|
||||||
logs in, logs out or a seat is added or removed, or a
|
removed, or a session, user, seat or virtual machine/container
|
||||||
session, user, seat or virtual machine/container
|
changes state otherwise. The first parameter takes a string which
|
||||||
changes state otherwise. The first parameter takes a
|
can be <literal>seat</literal> (to get only notifications about
|
||||||
string which can be <literal>seat</literal> (to get
|
seats being added, removed or changed), <literal>session</literal>
|
||||||
only notifications about seats being added, removed or
|
(to get only notifications about sessions being created or removed
|
||||||
changed), <literal>session</literal> (to get only
|
or changed), <literal>uid</literal> (to get only notifications
|
||||||
notifications about sessions being created or removed
|
when a user changes state in respect to logins) or
|
||||||
or changed), <literal>uid</literal> (to get only
|
<literal>machine</literal> (to get only notifications when a
|
||||||
notifications when a user changes state in respect to
|
virtual machine or container is started or stopped). If
|
||||||
logins) or <literal>machine</literal> (to get only
|
notifications shall be generated in all these conditions,
|
||||||
notifications when a virtual machine or container is
|
<constant>NULL</constant> may be passed. Note that in the future
|
||||||
started or stopped). If notifications shall be
|
additional categories may be defined. The second parameter returns
|
||||||
generated in all these conditions, <constant>NULL</constant> may be
|
a monitor object and needs to be freed with the
|
||||||
passed. Note that in the future additional categories
|
<function>sd_login_monitor_unref()</function> call after
|
||||||
may be defined. The second parameter returns a monitor
|
use.</para>
|
||||||
object and needs to be freed with the
|
|
||||||
<function>sd_login_monitor_unref()</function> call
|
|
||||||
after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_login_monitor_unref()</function>
|
<para><function>sd_login_monitor_unref()</function> may be used to
|
||||||
may be used to destroy a monitor object. Note that
|
destroy a monitor object. Note that this will invalidate any file
|
||||||
this will invalidate any file descriptor returned by
|
descriptor returned by
|
||||||
<function>sd_login_monitor_get_fd()</function>.</para>
|
<function>sd_login_monitor_get_fd()</function>.</para>
|
||||||
|
|
||||||
<para><function>sd_login_monitor_flush()</function>
|
<para><function>sd_login_monitor_flush()</function> may be used to
|
||||||
may be used to reset the wakeup state of the monitor
|
reset the wakeup state of the monitor object. Whenever an event
|
||||||
object. Whenever an event causes the monitor to wake
|
causes the monitor to wake up the event loop via the file
|
||||||
up the event loop via the file descriptor this
|
descriptor this function needs to be called to reset the wake-up
|
||||||
function needs to be called to reset the wake-up
|
state. If this call is not invoked, the file descriptor will
|
||||||
state. If this call is not invoked, the file descriptor
|
immediately wake up the event loop again.</para>
|
||||||
will immediately wake up the event loop again.</para>
|
|
||||||
|
|
||||||
<para><function>sd_login_monitor_get_fd()</function>
|
<para><function>sd_login_monitor_get_fd()</function> may be used
|
||||||
may be used to retrieve the file descriptor of the
|
to retrieve the file descriptor of the monitor object that may be
|
||||||
monitor object that may be integrated in an
|
integrated in an application defined event loop, based around
|
||||||
application defined event loop, based around
|
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
or a similar interface. The application should include the
|
||||||
or a similar interface. The application should include
|
returned file descriptor as wake-up source for the events mask
|
||||||
the returned file descriptor as wake-up source for the
|
returned by <function>sd_login_monitor_get_events()</function>. It
|
||||||
events mask returned by
|
should pass a timeout value as returned by
|
||||||
<function>sd_login_monitor_get_events()</function>. It
|
<function>sd_login_monitor_get_timeout()</function>. Whenever a
|
||||||
should pass a timeout value as returned by
|
wake-up is triggered the file descriptor needs to be reset via
|
||||||
<function>sd_login_monitor_get_timeout()</function>. Whenever
|
<function>sd_login_monitor_flush()</function>. An application
|
||||||
a wake-up is triggered the file descriptor needs to be
|
needs to reread the login state with a function like
|
||||||
reset via
|
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<function>sd_login_monitor_flush()</function>. An
|
or similar to determine what changed.</para>
|
||||||
application needs to reread the login state with a
|
|
||||||
function like
|
|
||||||
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
or similar to determine what changed.</para>
|
|
||||||
|
|
||||||
<para><function>sd_login_monitor_get_events()</function>
|
<para><function>sd_login_monitor_get_events()</function> will
|
||||||
will return the <function>poll()</function> mask to
|
return the <function>poll()</function> mask to wait for. This
|
||||||
wait for. This function will return a combination of
|
function will return a combination of <constant>POLLIN</constant>,
|
||||||
<constant>POLLIN</constant>, <constant>POLLOUT</constant>
|
<constant>POLLOUT</constant> and similar to fill into the
|
||||||
and similar to fill into the
|
<literal>.events</literal> field of <varname>struct
|
||||||
<literal>.events</literal> field of <varname>struct
|
pollfd</varname>.</para>
|
||||||
pollfd</varname>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_login_monitor_get_timeout()</function>
|
<para><function>sd_login_monitor_get_timeout()</function> will
|
||||||
will return a timeout value for usage in
|
return a timeout value for usage in <function>poll()</function>.
|
||||||
<function>poll()</function>. This returns a value in
|
This returns a value in microseconds since the epoch of
|
||||||
microseconds since the epoch of <constant>CLOCK_MONOTONIC</constant>
|
<constant>CLOCK_MONOTONIC</constant> for timing out
|
||||||
for timing out <function>poll()</function> in
|
<function>poll()</function> in <varname>timeout_usec</varname>.
|
||||||
<varname>timeout_usec</varname>. See
|
See
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
for details about
|
for details about <constant>CLOCK_MONOTONIC</constant>. If there
|
||||||
<constant>CLOCK_MONOTONIC</constant>. If there is no
|
is no timeout to wait for this will fill in <constant>(uint64_t)
|
||||||
timeout to wait for this will fill in
|
-1</constant> instead. Note that <function>poll()</function> takes
|
||||||
<constant>(uint64_t) -1</constant> instead. Note that
|
a relative timeout in milliseconds rather than an absolute timeout
|
||||||
<function>poll()</function> takes a relative timeout
|
in microseconds. To convert the absolute 'us' timeout into
|
||||||
in milliseconds rather than an absolute timeout in
|
relative 'ms', use code like the following:</para>
|
||||||
microseconds. To convert the absolute 'us' timeout into
|
|
||||||
relative 'ms', use code like the following:</para>
|
|
||||||
|
|
||||||
<programlisting>uint64_t t;
|
<programlisting>uint64_t t;
|
||||||
int msec;
|
int msec;
|
||||||
sd_login_monitor_get_timeout(m, &t);
|
sd_login_monitor_get_timeout(m, &t);
|
||||||
if (t == (uint64_t) -1)
|
if (t == (uint64_t) -1)
|
||||||
msec = -1;
|
msec = -1;
|
||||||
else {
|
else {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
uint64_t n;
|
uint64_t n;
|
||||||
clock_getttime(CLOCK_MONOTONIC, &ts);
|
clock_getttime(CLOCK_MONOTONIC, &ts);
|
||||||
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
|
||||||
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
msec = t > n ? (int) ((t - n + 999) / 1000) : 0;
|
||||||
}</programlisting>
|
}</programlisting>
|
||||||
|
|
||||||
<para>The code above does not do any error checking
|
<para>The code above does not do any error checking for brevity's
|
||||||
for brevity's sake. The calculated <varname>msec</varname>
|
sake. The calculated <varname>msec</varname> integer can be passed
|
||||||
integer can be passed directly as
|
directly as <function>poll()</function>'s timeout
|
||||||
<function>poll()</function>'s timeout
|
parameter.</para>
|
||||||
parameter.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success,
|
<para>On success,
|
||||||
<function>sd_login_monitor_new()</function>,
|
<function>sd_login_monitor_new()</function>,
|
||||||
<function>sd_login_monitor_flush()</function> and
|
<function>sd_login_monitor_flush()</function> and
|
||||||
<function>sd_login_monitor_get_timeout()</function>
|
<function>sd_login_monitor_get_timeout()</function>
|
||||||
return 0 or a positive integer. On success,
|
return 0 or a positive integer. On success,
|
||||||
<function>sd_login_monitor_get_fd()</function> returns
|
<function>sd_login_monitor_get_fd()</function> returns
|
||||||
a Unix file descriptor. On success,
|
a Unix file descriptor. On success,
|
||||||
<function>sd_login_monitor_get_events()</function>
|
<function>sd_login_monitor_get_events()</function>
|
||||||
returns a combination of <constant>POLLIN</constant>,
|
returns a combination of <constant>POLLIN</constant>,
|
||||||
<constant>POLLOUT</constant> and suchlike. On failure,
|
<constant>POLLOUT</constant> and suchlike. On failure,
|
||||||
these calls return a negative errno-style error
|
these calls return a negative errno-style error
|
||||||
code.</para>
|
code.</para>
|
||||||
|
|
||||||
<para><function>sd_login_monitor_unref()</function>
|
<para><function>sd_login_monitor_unref()</function>
|
||||||
always returns <constant>NULL</constant>.</para>
|
always returns <constant>NULL</constant>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_login_monitor_new()</function>,
|
<para>The <function>sd_login_monitor_new()</function>,
|
||||||
<function>sd_login_monitor_unref()</function>,
|
<function>sd_login_monitor_unref()</function>,
|
||||||
<function>sd_login_monitor_flush()</function>,
|
<function>sd_login_monitor_flush()</function>,
|
||||||
<function>sd_login_monitor_get_fd()</function>,
|
<function>sd_login_monitor_get_fd()</function>,
|
||||||
<function>sd_login_monitor_get_events()</function> and
|
<function>sd_login_monitor_get_events()</function> and
|
||||||
<function>sd_login_monitor_get_timeout()</function>
|
<function>sd_login_monitor_get_timeout()</function>
|
||||||
interfaces are available as a shared library, which can
|
interfaces are available as a shared library, which can be
|
||||||
be compiled and linked to with the
|
compiled and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_get_seats</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>poll</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>clock_gettime</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,104 +23,101 @@
|
|||||||
|
|
||||||
<refentry id="sd_machine_get_class">
|
<refentry id="sd_machine_get_class">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_machine_get_class</title>
|
<title>sd_machine_get_class</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_machine_get_class</refentrytitle>
|
<refentrytitle>sd_machine_get_class</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_machine_get_class</refname>
|
<refname>sd_machine_get_class</refname>
|
||||||
<refname>sd_machine_get_ifindices</refname>
|
<refname>sd_machine_get_ifindices</refname>
|
||||||
<refpurpose>Determine the class and network interface
|
<refpurpose>Determine the class and network interface indices of a
|
||||||
indices of a locally running virtual machine or
|
locally running virtual machine or container.</refpurpose>
|
||||||
container.</refpurpose>
|
</refnamediv>
|
||||||
</refnamediv>
|
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_machine_get_class</function></funcdef>
|
<funcdef>int <function>sd_machine_get_class</function></funcdef>
|
||||||
<paramdef>const char* <parameter>machine</parameter></paramdef>
|
<paramdef>const char* <parameter>machine</parameter></paramdef>
|
||||||
<paramdef>char *<parameter>class</parameter></paramdef>
|
<paramdef>char *<parameter>class</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_machine_get_ifindices</function></funcdef>
|
<funcdef>int <function>sd_machine_get_ifindices</function></funcdef>
|
||||||
<paramdef>const char* <parameter>machine</parameter></paramdef>
|
<paramdef>const char* <parameter>machine</parameter></paramdef>
|
||||||
<paramdef>int **<parameter>ifindices</parameter></paramdef>
|
<paramdef>int **<parameter>ifindices</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_machine_get_class()</function> may
|
<para><function>sd_machine_get_class()</function> may be used to
|
||||||
be used to determine the class of a locally running
|
determine the class of a locally running virtual machine or
|
||||||
virtual machine or container that is registered with
|
container that is registered with
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
string returned is either <literal>vm</literal> or
|
The string returned is either <literal>vm</literal> or
|
||||||
<literal>container</literal>. The returned string
|
<literal>container</literal>. The returned string needs to be
|
||||||
needs to be freed with the libc <citerefentry
|
freed with the libc <citerefentry
|
||||||
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
call after use.</para>
|
call after use.</para>
|
||||||
|
|
||||||
<para><function>sd_machine_get_ifindices()</function>
|
<para><function>sd_machine_get_ifindices()</function> may be used
|
||||||
may be used to determine the numeric indices of the
|
to determine the numeric indices of the network interfaces on the
|
||||||
network interfaces on the host that are pointing
|
host that are pointing towards the specified locally running
|
||||||
towards the specified locally running virtual machine
|
virtual machine or container that is registered with
|
||||||
or container that is registered with
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
|
The returned array needs to be freed with the libc <citerefentry
|
||||||
returned array needs to be freed with the libc
|
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry
|
call after use.</para>
|
||||||
project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
</refsect1>
|
||||||
call after use.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, these calls return 0 or a positive
|
<para>On success, these calls return 0 or a positive integer. On
|
||||||
integer. On failure, these calls return a negative
|
failure, these calls return a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_machine_get_class()</function> and
|
<para>The <function>sd_machine_get_class()</function> and
|
||||||
<function>sd_machine_get_ifindices()</function> interfaces are
|
<function>sd_machine_get_ifindices()</function> interfaces are
|
||||||
available as a shared library, which can be compiled
|
available as a shared library, which can be compiled and linked to
|
||||||
and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_pid_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_pid_get_machine_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+291
-343
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,407 +22,355 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd_notify"
|
<refentry id="sd_notify"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_notify</title>
|
<title>sd_notify</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_notify</refentrytitle>
|
<refentrytitle>sd_notify</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_notify</refname>
|
<refname>sd_notify</refname>
|
||||||
<refname>sd_notifyf</refname>
|
<refname>sd_notifyf</refname>
|
||||||
<refname>sd_pid_notify</refname>
|
<refname>sd_pid_notify</refname>
|
||||||
<refname>sd_pid_notifyf</refname>
|
<refname>sd_pid_notifyf</refname>
|
||||||
<refname>sd_pid_notify_with_fds</refname>
|
<refname>sd_pid_notify_with_fds</refname>
|
||||||
<refpurpose>Notify service manager about start-up completion and other service status changes</refpurpose>
|
<refpurpose>Notify service manager about start-up completion and other service status changes</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_notify</function></funcdef>
|
<funcdef>int <function>sd_notify</function></funcdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>state</parameter></paramdef>
|
<paramdef>const char *<parameter>state</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_notifyf</function></funcdef>
|
<funcdef>int <function>sd_notifyf</function></funcdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>format</parameter></paramdef>
|
<paramdef>const char *<parameter>format</parameter></paramdef>
|
||||||
<paramdef>...</paramdef>
|
<paramdef>...</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_notify</function></funcdef>
|
<funcdef>int <function>sd_pid_notify</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>state</parameter></paramdef>
|
<paramdef>const char *<parameter>state</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_notifyf</function></funcdef>
|
<funcdef>int <function>sd_pid_notifyf</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>format</parameter></paramdef>
|
<paramdef>const char *<parameter>format</parameter></paramdef>
|
||||||
<paramdef>...</paramdef>
|
<paramdef>...</paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_notify_with_fds</function></funcdef>
|
<funcdef>int <function>sd_pid_notify_with_fds</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>state</parameter></paramdef>
|
<paramdef>const char *<parameter>state</parameter></paramdef>
|
||||||
<paramdef>const int *<parameter>fds</parameter></paramdef>
|
<paramdef>const int *<parameter>fds</parameter></paramdef>
|
||||||
<paramdef>unsigned <parameter>n_fds</parameter></paramdef>
|
<paramdef>unsigned <parameter>n_fds</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
<para><function>sd_notify()</function> may be called
|
<para><function>sd_notify()</function> may be called by a service
|
||||||
by a service to notify the service manager about
|
to notify the service manager about state changes. It can be used
|
||||||
state changes. It can be used to send arbitrary
|
to send arbitrary information, encoded in an
|
||||||
information, encoded in an environment-block-like
|
environment-block-like string. Most importantly it can be used for
|
||||||
string. Most importantly it can be used for start-up
|
start-up completion notification.</para>
|
||||||
completion notification.</para>
|
|
||||||
|
|
||||||
<para>If the <parameter>unset_environment</parameter>
|
<para>If the <parameter>unset_environment</parameter> parameter is
|
||||||
parameter is non-zero, <function>sd_notify()</function>
|
non-zero, <function>sd_notify()</function> will unset the
|
||||||
will unset the <varname>$NOTIFY_SOCKET</varname>
|
<varname>$NOTIFY_SOCKET</varname> environment variable before
|
||||||
environment variable before returning (regardless of
|
returning (regardless of whether the function call itself
|
||||||
whether the function call itself succeeded or
|
succeeded or not). Further calls to
|
||||||
not). Further calls to
|
<function>sd_notify()</function> will then fail, but the variable
|
||||||
<function>sd_notify()</function> will then fail, but
|
is no longer inherited by child processes.</para>
|
||||||
the variable is no longer inherited by child
|
|
||||||
processes.</para>
|
|
||||||
|
|
||||||
<para>The <parameter>state</parameter> parameter
|
<para>The <parameter>state</parameter> parameter should contain a
|
||||||
should contain a newline-separated list of variable
|
newline-separated list of variable assignments, similar in style
|
||||||
assignments, similar in style to an environment
|
to an environment block. A trailing newline is implied if none is
|
||||||
block. A trailing newline is implied if none is
|
specified. The string may contain any kind of variable
|
||||||
specified. The string may contain any kind of variable
|
assignments, but the following shall be considered
|
||||||
assignments, but the following shall be considered
|
well-known:</para>
|
||||||
well-known:</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>READY=1</term>
|
<term>READY=1</term>
|
||||||
|
|
||||||
<listitem><para>Tells the service
|
<listitem><para>Tells the service manager that service startup
|
||||||
manager that service startup is
|
is finished. This is only used by systemd if the service
|
||||||
finished. This is only used by systemd
|
definition file has Type=notify set. Since there is little
|
||||||
if the service definition file has
|
value in signaling non-readiness, the only value services
|
||||||
Type=notify set. Since there is little
|
should send is <literal>READY=1</literal> (i.e.
|
||||||
value in signaling non-readiness, the
|
<literal>READY=0</literal> is not defined).</para></listitem>
|
||||||
only value services should send is
|
</varlistentry>
|
||||||
<literal>READY=1</literal>
|
|
||||||
(i.e. <literal>READY=0</literal> is
|
|
||||||
not defined).</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>RELOADING=1</term>
|
<term>RELOADING=1</term>
|
||||||
|
|
||||||
<listitem><para>Tells the service manager
|
<listitem><para>Tells the service manager that the service is
|
||||||
that the service is reloading its
|
reloading its configuration. This is useful to allow the
|
||||||
configuration. This is useful to allow
|
service manager to track the service's internal state, and
|
||||||
the service manager to track the service's
|
present it to the user. Note that a service that sends this
|
||||||
internal state, and present it to the
|
notification must also send a <literal>READY=1</literal>
|
||||||
user. Note that a service that sends
|
notification when it completed reloading its
|
||||||
this notification must also send a
|
configuration.</para></listitem>
|
||||||
<literal>READY=1</literal>
|
</varlistentry>
|
||||||
notification when it completed
|
|
||||||
reloading its
|
|
||||||
configuration.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>STOPPING=1</term>
|
<term>STOPPING=1</term>
|
||||||
|
|
||||||
<listitem><para>Tells the service manager
|
<listitem><para>Tells the service manager that the service is
|
||||||
that the service is beginning its
|
beginning its shutdown. This is useful to allow the service
|
||||||
shutdown. This is useful to allow the
|
manager to track the service's internal state, and present it
|
||||||
service manager to track the service's
|
to the user.</para></listitem>
|
||||||
internal state, and present it to the
|
</varlistentry>
|
||||||
user.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>STATUS=...</term>
|
<term>STATUS=...</term>
|
||||||
|
|
||||||
<listitem><para>Passes a single-line
|
<listitem><para>Passes a single-line UTF-8 status string back
|
||||||
UTF-8 status string back to the service manager
|
to the service manager that describes the service state. This
|
||||||
that describes the service state. This
|
is free-form and can be used for various purposes: general
|
||||||
is free-form and can be used for
|
state feedback, fsck-like programs could pass completion
|
||||||
various purposes: general state
|
percentages and failing programs could pass a human readable
|
||||||
feedback, fsck-like programs could
|
error message. Example: <literal>STATUS=Completed 66% of file
|
||||||
pass completion percentages and
|
system check...</literal></para></listitem>
|
||||||
failing programs could pass a human
|
</varlistentry>
|
||||||
readable error message. Example:
|
|
||||||
<literal>STATUS=Completed 66% of file
|
|
||||||
system
|
|
||||||
check...</literal></para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>ERRNO=...</term>
|
<term>ERRNO=...</term>
|
||||||
|
|
||||||
<listitem><para>If a service fails, the
|
<listitem><para>If a service fails, the errno-style error
|
||||||
errno-style error code, formatted as
|
code, formatted as string. Example: <literal>ERRNO=2</literal>
|
||||||
string. Example: <literal>ERRNO=2</literal> for
|
for ENOENT.</para></listitem>
|
||||||
ENOENT.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>BUSERROR=...</term>
|
<term>BUSERROR=...</term>
|
||||||
|
|
||||||
<listitem><para>If a service fails, the
|
<listitem><para>If a service fails, the D-Bus error-style
|
||||||
D-Bus error-style error code. Example:
|
error code. Example:
|
||||||
<literal>BUSERROR=org.freedesktop.DBus.Error.TimedOut</literal></para></listitem>
|
<literal>BUSERROR=org.freedesktop.DBus.Error.TimedOut</literal></para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>MAINPID=...</term>
|
<term>MAINPID=...</term>
|
||||||
|
|
||||||
<listitem><para>The main process ID (PID) of the
|
<listitem><para>The main process ID (PID) of the service, in
|
||||||
service, in case the service manager did
|
case the service manager did not fork off the process itself.
|
||||||
not fork off the process
|
Example: <literal>MAINPID=4711</literal></para></listitem>
|
||||||
itself. Example:
|
</varlistentry>
|
||||||
<literal>MAINPID=4711</literal></para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>WATCHDOG=1</term>
|
<term>WATCHDOG=1</term>
|
||||||
|
|
||||||
<listitem><para>Tells the service manager to
|
<listitem><para>Tells the service manager to update the
|
||||||
update the watchdog timestamp. This is
|
watchdog timestamp. This is the keep-alive ping that services
|
||||||
the keep-alive ping that services need
|
need to issue in regular intervals if
|
||||||
to issue in regular intervals if
|
<varname>WatchdogSec=</varname> is enabled for it. See
|
||||||
<varname>WatchdogSec=</varname> is
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
enabled for it. See
|
for information how to enable this functionality and
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
for information how to enable this
|
for the details of how the service can check if the the
|
||||||
functionality and
|
watchdog is enabled. </para></listitem>
|
||||||
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
</varlistentry>
|
||||||
for the details of how the service can
|
|
||||||
check if the the watchdog is enabled.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>FDSTORE=1</term>
|
<term>FDSTORE=1</term>
|
||||||
|
|
||||||
<listitem><para>Stores additional file
|
<listitem><para>Stores additional file descriptors in the
|
||||||
descriptors in the service
|
service manager. File descriptors sent this way will be
|
||||||
manager. File descriptors sent this
|
maintained per-service by the service manager and be passed
|
||||||
way will be maintained per-service by
|
again using the usual file descriptor passing logic on the
|
||||||
the service manager and be passed
|
next invocation of the service (see
|
||||||
again using the usual file descriptor
|
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>).
|
||||||
passing logic on the next invocation
|
This is useful for implementing service restart schemes where
|
||||||
of the service (see
|
services serialize their state to <filename>/run</filename>,
|
||||||
<citerefentry><refentrytitle>sd_listen_fds</refentrytitle><manvolnum>3</manvolnum></citerefentry>). This
|
push their file descriptors to the system manager, and are
|
||||||
is useful for implementing service
|
then restarted, retrieving their state again via socket
|
||||||
restart schemes where services
|
passing and <filename>/run</filename>. Note that the service
|
||||||
serialize their state to
|
manager will accept messages for a service only if
|
||||||
<filename>/run</filename>, push their
|
<varname>FileDescriptorStoreMax=</varname> is set to non-zero
|
||||||
file descriptors to the system
|
for it (defaults to zero). See
|
||||||
manager, and are then restarted,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
retrieving their state again via
|
for details. Multiple arrays of file descriptors may be sent
|
||||||
socket passing and
|
in separate messages, in which case the arrays are combined.
|
||||||
<filename>/run</filename>. Note that
|
Note that the service manager removes duplicate file
|
||||||
the service manager will accept
|
descriptors before passing them to the service. Use
|
||||||
messages for a service only if
|
<function>sd_pid_notify_with_fds()</function> to send messages
|
||||||
<varname>FileDescriptorStoreMax=</varname>
|
with <literal>FDSTORE=1</literal>, see
|
||||||
is set to non-zero for it (defaults to
|
below.</para></listitem>
|
||||||
zero). See
|
</varlistentry>
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
for details. Multiple arrays of file
|
|
||||||
descriptors may be sent in separate
|
|
||||||
messages, in which case the arrays are
|
|
||||||
combined. Note that the service
|
|
||||||
manager removes duplicate file
|
|
||||||
descriptors before passing them to the
|
|
||||||
service. Use
|
|
||||||
<function>sd_pid_notify_with_fds()</function>
|
|
||||||
to send messages with
|
|
||||||
<literal>FDSTORE=1</literal>, see
|
|
||||||
below.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>It is recommended to prefix variable names that
|
<para>It is recommended to prefix variable names that are not
|
||||||
are not listed above with <varname>X_</varname> to
|
listed above with <varname>X_</varname> to avoid namespace
|
||||||
avoid namespace clashes.</para>
|
clashes.</para>
|
||||||
|
|
||||||
<para>Note that systemd will accept status data sent
|
<para>Note that systemd will accept status data sent from a
|
||||||
from a service only if the
|
service only if the <varname>NotifyAccess=</varname> option is
|
||||||
<varname>NotifyAccess=</varname> option is correctly
|
correctly set in the service definition file. See
|
||||||
set in the service definition file. See
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for details.</para>
|
||||||
for details.</para>
|
|
||||||
|
|
||||||
<para><function>sd_notifyf()</function> is similar to
|
<para><function>sd_notifyf()</function> is similar to
|
||||||
<function>sd_notify()</function> but takes a
|
<function>sd_notify()</function> but takes a
|
||||||
<function>printf()</function>-like format string plus
|
<function>printf()</function>-like format string plus
|
||||||
arguments.</para>
|
arguments.</para>
|
||||||
|
|
||||||
<para><function>sd_pid_notify()</function> and
|
<para><function>sd_pid_notify()</function> and
|
||||||
<function>sd_pid_notifyf()</function> are similar to
|
<function>sd_pid_notifyf()</function> are similar to
|
||||||
<function>sd_notify()</function> and
|
<function>sd_notify()</function> and
|
||||||
<function>sd_notifyf()</function> but take a process
|
<function>sd_notifyf()</function> but take a process ID (PID) to
|
||||||
ID (PID) to use as originating PID for the message as
|
use as originating PID for the message as first argument. This is
|
||||||
first argument. This is useful to send notification
|
useful to send notification messages on behalf of other processes,
|
||||||
messages on behalf of other processes, provided the
|
provided the appropriate privileges are available. If the PID
|
||||||
appropriate privileges are available. If the PID
|
argument is specified as 0 the process ID of the calling process
|
||||||
argument is specified as 0 the process ID of the
|
is used, in which case the calls are fully equivalent to
|
||||||
calling process is used, in which case the calls are
|
<function>sd_notify()</function> and
|
||||||
fully equivalent to <function>sd_notify()</function>
|
<function>sd_notifyf()</function>.</para>
|
||||||
and <function>sd_notifyf()</function>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_notify_with_fds()</function> is
|
<para><function>sd_pid_notify_with_fds()</function> is similar to
|
||||||
similar to <function>sd_pid_notify()</function> but
|
<function>sd_pid_notify()</function> but takes an additional array
|
||||||
takes an additional array of file descriptors. These
|
of file descriptors. These file descriptors are sent along the
|
||||||
file descriptors are sent along the notification
|
notification message to the service manager. This is particularly
|
||||||
message to the service manager. This is particularly
|
useful for sending <literal>FDSTORE=1</literal> messages, as
|
||||||
useful for sending <literal>FDSTORE=1</literal>
|
described above. The additional arguments are a pointer to the
|
||||||
messages, as described above. The additional arguments
|
file descriptor array plus the number of file descriptors in the
|
||||||
are a pointer to the file descriptor array plus the
|
array. If the number of file descriptors is passed as 0, the call
|
||||||
number of file descriptors in the array. If the number
|
is fully equivalent to <function>sd_pid_notify()</function>, i.e.
|
||||||
of file descriptors is passed as 0, the call is fully
|
no file descriptors are passed. Note that sending file descriptors
|
||||||
equivalent to <function>sd_pid_notify()</function>,
|
to the service manager on messages that do not expect them (i.e.
|
||||||
i.e. no file descriptors are passed. Note that sending
|
without <literal>FDSTORE=1</literal>) they are immediately closed
|
||||||
file descriptors to the service manager on messages
|
on reception.</para>
|
||||||
that do not expect them (i.e. without
|
</refsect1>
|
||||||
<literal>FDSTORE=1</literal>) they are immediately
|
|
||||||
closed on reception.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On failure, these calls return a negative
|
<para>On failure, these calls return a negative errno-style error
|
||||||
errno-style error code. If
|
code. If <varname>$NOTIFY_SOCKET</varname> was not set and hence
|
||||||
<varname>$NOTIFY_SOCKET</varname> was not set and
|
no status data could be sent, 0 is returned. If the status was
|
||||||
hence no status data could be sent, 0 is returned. If
|
sent, these functions return with a positive return value. In
|
||||||
the status was sent, these functions return with a
|
order to support both, init systems that implement this scheme and
|
||||||
positive return value. In order to support both, init
|
those which do not, it is generally recommended to ignore the
|
||||||
systems that implement this scheme and those which
|
return value of this call.</para>
|
||||||
do not, it is generally recommended to ignore the return
|
</refsect1>
|
||||||
value of this call.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
||||||
|
|
||||||
<para>Internally, these functions send a single
|
<para>Internally, these functions send a single datagram with the
|
||||||
datagram with the state string as payload to the
|
state string as payload to the <constant>AF_UNIX</constant> socket
|
||||||
<constant>AF_UNIX</constant> socket referenced in the
|
referenced in the <varname>$NOTIFY_SOCKET</varname> environment
|
||||||
<varname>$NOTIFY_SOCKET</varname> environment
|
variable. If the first character of
|
||||||
variable. If the first character of
|
<varname>$NOTIFY_SOCKET</varname> is <literal>@</literal>, the
|
||||||
<varname>$NOTIFY_SOCKET</varname> is <literal>@</literal>, the string is
|
string is understood as Linux abstract namespace socket. The
|
||||||
understood as Linux abstract namespace socket. The
|
datagram is accompanied by the process credentials of the sending
|
||||||
datagram is accompanied by the process credentials of
|
service, using SCM_CREDENTIALS.</para>
|
||||||
the sending service, using SCM_CREDENTIALS.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$NOTIFY_SOCKET</varname></term>
|
<term><varname>$NOTIFY_SOCKET</varname></term>
|
||||||
|
|
||||||
<listitem><para>Set by the service manager
|
<listitem><para>Set by the service manager for supervised
|
||||||
for supervised processes for status
|
processes for status and start-up completion notification.
|
||||||
and start-up completion
|
This environment variable specifies the socket
|
||||||
notification. This environment variable
|
<function>sd_notify()</function> talks to. See above for
|
||||||
specifies the socket
|
details.</para></listitem>
|
||||||
<function>sd_notify()</function> talks
|
</varlistentry>
|
||||||
to. See above for details.</para></listitem>
|
</variablelist>
|
||||||
</varlistentry>
|
</refsect1>
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Start-up Notification</title>
|
<title>Start-up Notification</title>
|
||||||
|
|
||||||
<para>When a service finished starting up, it
|
<para>When a service finished starting up, it might issue the
|
||||||
might issue the following call to notify
|
following call to notify the service manager:</para>
|
||||||
the service manager:</para>
|
|
||||||
|
|
||||||
<programlisting>sd_notify(0, "READY=1");</programlisting>
|
<programlisting>sd_notify(0, "READY=1");</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Extended Start-up Notification</title>
|
<title>Extended Start-up Notification</title>
|
||||||
|
|
||||||
<para>A service could send the following after
|
<para>A service could send the following after completing
|
||||||
completing initialization:</para>
|
initialization:</para>
|
||||||
|
|
||||||
<programlisting>sd_notifyf(0, "READY=1\n"
|
<programlisting>sd_notifyf(0, "READY=1\n"
|
||||||
"STATUS=Processing requests...\n"
|
"STATUS=Processing requests...\n"
|
||||||
"MAINPID=%lu",
|
"MAINPID=%lu",
|
||||||
(unsigned long) getpid());</programlisting>
|
(unsigned long) getpid());</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Error Cause Notification</title>
|
<title>Error Cause Notification</title>
|
||||||
|
|
||||||
<para>A service could send the following shortly before exiting, on failure:</para>
|
<para>A service could send the following shortly before exiting, on failure:</para>
|
||||||
|
|
||||||
<programlisting>sd_notifyf(0, "STATUS=Failed to start up: %s\n"
|
<programlisting>sd_notifyf(0, "STATUS=Failed to start up: %s\n"
|
||||||
"ERRNO=%i",
|
"ERRNO=%i",
|
||||||
strerror(errno),
|
strerror(errno),
|
||||||
errno);</programlisting>
|
errno);</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Store a File Descriptor in the Service Manager</title>
|
<title>Store a File Descriptor in the Service Manager</title>
|
||||||
|
|
||||||
<para>To store an open file descriptor in the
|
<para>To store an open file descriptor in the service manager,
|
||||||
service manager, in order to continue
|
in order to continue operation after a service restart without
|
||||||
operation after a service restart without
|
losing state use <literal>FDSTORE=1</literal>:</para>
|
||||||
losing state use
|
|
||||||
<literal>FDSTORE=1</literal>:</para>
|
|
||||||
|
|
||||||
<programlisting>sd_pid_notify_with_fds(0, 0, "FDSTORE=1", &fd, 1);</programlisting>
|
<programlisting>sd_pid_notify_with_fds(0, 0, "FDSTORE=1", &fd, 1);</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_watchdog_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+203
-214
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,250 +23,239 @@
|
|||||||
|
|
||||||
<refentry id="sd_pid_get_session" conditional='HAVE_PAM'>
|
<refentry id="sd_pid_get_session" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_pid_get_session</title>
|
<title>sd_pid_get_session</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_pid_get_session</refentrytitle>
|
<refentrytitle>sd_pid_get_session</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_pid_get_session</refname>
|
<refname>sd_pid_get_session</refname>
|
||||||
<refname>sd_pid_get_unit</refname>
|
<refname>sd_pid_get_unit</refname>
|
||||||
<refname>sd_pid_get_user_unit</refname>
|
<refname>sd_pid_get_user_unit</refname>
|
||||||
<refname>sd_pid_get_owner_uid</refname>
|
<refname>sd_pid_get_owner_uid</refname>
|
||||||
<refname>sd_pid_get_machine_name</refname>
|
<refname>sd_pid_get_machine_name</refname>
|
||||||
<refname>sd_pid_get_slice</refname>
|
<refname>sd_pid_get_slice</refname>
|
||||||
<refname>sd_peer_get_session</refname>
|
<refname>sd_peer_get_session</refname>
|
||||||
<refname>sd_peer_get_unit</refname>
|
<refname>sd_peer_get_unit</refname>
|
||||||
<refname>sd_peer_get_user_unit</refname>
|
<refname>sd_peer_get_user_unit</refname>
|
||||||
<refname>sd_peer_get_owner_uid</refname>
|
<refname>sd_peer_get_owner_uid</refname>
|
||||||
<refname>sd_peer_get_machine_name</refname>
|
<refname>sd_peer_get_machine_name</refname>
|
||||||
<refname>sd_peer_get_slice</refname>
|
<refname>sd_peer_get_slice</refname>
|
||||||
<refpurpose>Determine session, service, owner of a
|
<refpurpose>Determine session, service, owner of a
|
||||||
session, container/VM or slice of a specific
|
session, container/VM or slice of a specific
|
||||||
PID or socket peer</refpurpose>
|
PID or socket peer</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_session</function></funcdef>
|
<funcdef>int <function>sd_pid_get_session</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>session</parameter></paramdef>
|
<paramdef>char **<parameter>session</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_unit</function></funcdef>
|
<funcdef>int <function>sd_pid_get_unit</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>unit</parameter></paramdef>
|
<paramdef>char **<parameter>unit</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_user_unit</function></funcdef>
|
<funcdef>int <function>sd_pid_get_user_unit</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>unit</parameter></paramdef>
|
<paramdef>char **<parameter>unit</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_owner_uid</function></funcdef>
|
<funcdef>int <function>sd_pid_get_owner_uid</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_machine_name</function></funcdef>
|
<funcdef>int <function>sd_pid_get_machine_name</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>name</parameter></paramdef>
|
<paramdef>char **<parameter>name</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_pid_get_slice</function></funcdef>
|
<funcdef>int <function>sd_pid_get_slice</function></funcdef>
|
||||||
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
<paramdef>pid_t <parameter>pid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>slice</parameter></paramdef>
|
<paramdef>char **<parameter>slice</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_session</function></funcdef>
|
<funcdef>int <function>sd_peer_get_session</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>session</parameter></paramdef>
|
<paramdef>char **<parameter>session</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_unit</function></funcdef>
|
<funcdef>int <function>sd_peer_get_unit</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>unit</parameter></paramdef>
|
<paramdef>char **<parameter>unit</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_user_unit</function></funcdef>
|
<funcdef>int <function>sd_peer_get_user_unit</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>unit</parameter></paramdef>
|
<paramdef>char **<parameter>unit</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_owner_uid</function></funcdef>
|
<funcdef>int <function>sd_peer_get_owner_uid</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_machine_name</function></funcdef>
|
<funcdef>int <function>sd_peer_get_machine_name</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>name</parameter></paramdef>
|
<paramdef>char **<parameter>name</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_peer_get_slice</function></funcdef>
|
<funcdef>int <function>sd_peer_get_slice</function></funcdef>
|
||||||
<paramdef>int <parameter>fd</parameter></paramdef>
|
<paramdef>int <parameter>fd</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>slice</parameter></paramdef>
|
<paramdef>char **<parameter>slice</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_pid_get_session()</function> may be
|
<para><function>sd_pid_get_session()</function> may be used to
|
||||||
used to determine the login session identifier of a
|
determine the login session identifier of a process identified by
|
||||||
process identified by the specified process
|
the specified process identifier. The session identifier is a
|
||||||
identifier. The session identifier is a short string,
|
short string, suitable for usage in file system paths. Note that
|
||||||
suitable for usage in file system paths. Note that not
|
not all processes are part of a login session (e.g. system service
|
||||||
all processes are part of a login session (e.g. system
|
processes, user processes that are shared between multiple
|
||||||
service processes, user processes that are shared
|
sessions of the same user, or kernel threads). For processes not
|
||||||
between multiple sessions of the same user, or kernel
|
being part of a login session this function will fail. The
|
||||||
threads). For processes not being part of a login
|
returned string needs to be freed with the libc
|
||||||
session this function will fail. The returned string
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
needs to be freed with the libc
|
call after use.</para>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_get_unit()</function> may be
|
<para><function>sd_pid_get_unit()</function> may be used to
|
||||||
used to determine the systemd system unit (i.e. system
|
determine the systemd system unit (i.e. system service) identifier
|
||||||
service) identifier of a process identified by the
|
of a process identified by the specified PID. The unit name is a
|
||||||
specified PID. The unit name is a short string,
|
short string, suitable for usage in file system paths. Note that
|
||||||
suitable for usage in file system paths. Note that not
|
not all processes are part of a system unit/service (e.g. user
|
||||||
all processes are part of a system unit/service
|
processes, or kernel threads). For processes not being part of a
|
||||||
(e.g. user processes, or kernel threads). For
|
systemd system unit this function will fail. (More specifically:
|
||||||
processes not being part of a systemd system unit this
|
this call will not work for processes that are part of user units,
|
||||||
function will fail. (More specifically: this call will
|
use <function>sd_pid_get_user_unit()</function> for that.) The
|
||||||
not work for processes that are part of user units,
|
returned string needs to be freed with the libc
|
||||||
use <function>sd_pid_get_user_unit()</function> for
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
that.) The returned string needs to be freed with the
|
call after use.</para>
|
||||||
libc
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_get_user_unit()</function> may
|
<para><function>sd_pid_get_user_unit()</function> may be used to
|
||||||
be used to determine the systemd user unit (i.e. user
|
determine the systemd user unit (i.e. user service) identifier of
|
||||||
service) identifier of a process identified by the
|
a process identified by the specified PID. This is similar to
|
||||||
specified PID. This is similar to
|
<function>sd_pid_get_unit()</function> but applies to user units
|
||||||
<function>sd_pid_get_unit()</function> but applies to
|
instead of system units.</para>
|
||||||
user units instead of system units.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_get_owner_uid()</function> may
|
<para><function>sd_pid_get_owner_uid()</function> may be used to
|
||||||
be used to determine the Unix user identifier of the
|
determine the Unix user identifier of the owner of the session of
|
||||||
owner of the session of a process identified the
|
a process identified the specified PID. Note that this function
|
||||||
specified PID. Note that this function will succeed
|
will succeed for user processes which are shared between multiple
|
||||||
for user processes which are shared between multiple
|
login sessions of the same user, where
|
||||||
login sessions of the same user, where
|
<function>sd_pid_get_session()</function> will fail. For processes
|
||||||
<function>sd_pid_get_session()</function> will
|
not being part of a login session and not being a shared process
|
||||||
fail. For processes not being part of a login session
|
of a user this function will fail.</para>
|
||||||
and not being a shared process of a user this function
|
|
||||||
will fail.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_get_machine_name()</function>
|
<para><function>sd_pid_get_machine_name()</function> may be used
|
||||||
may be used to determine the name of the VM or
|
to determine the name of the VM or container is a member of. The
|
||||||
container is a member of. The machine name is a short
|
machine name is a short string, suitable for usage in file system
|
||||||
string, suitable for usage in file system paths. The
|
paths. The returned string needs to be freed with the libc
|
||||||
returned string needs to be freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_pid_get_slice()</function> may be
|
<para><function>sd_pid_get_slice()</function> may be used to
|
||||||
used to determine the slice unit the process is a
|
determine the slice unit the process is a member of. See
|
||||||
member of. See
|
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for details about slices. The returned string needs to be freed
|
||||||
for details about slices. The returned string needs to
|
with the libc
|
||||||
be freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para>If the <varname>pid</varname> parameter of any
|
<para>If the <varname>pid</varname> parameter of any of these
|
||||||
of these functions is passed as 0, the operation is
|
functions is passed as 0, the operation is executed for the
|
||||||
executed for the calling process.</para>
|
calling process.</para>
|
||||||
|
|
||||||
<para>The <function>sd_peer_get_session()</function>,
|
<para>The <function>sd_peer_get_session()</function>,
|
||||||
<function>sd_peer_get_unit()</function>,
|
<function>sd_peer_get_unit()</function>,
|
||||||
<function>sd_peer_get_user_unit()</function>,
|
<function>sd_peer_get_user_unit()</function>,
|
||||||
<function>sd_peer_get_owner_uid()</function>,
|
<function>sd_peer_get_owner_uid()</function>,
|
||||||
<function>sd_peer_get_machine_name()</function> and
|
<function>sd_peer_get_machine_name()</function> and
|
||||||
<function>sd_peer_get_slice()</function> calls operate
|
<function>sd_peer_get_slice()</function> calls operate similar to
|
||||||
similar to their PID counterparts, but operate on a
|
their PID counterparts, but operate on a connected AF_UNIX socket
|
||||||
connected AF_UNIX socket and retrieve information
|
and retrieve information about the connected peer process.</para>
|
||||||
about the connected peer process.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success, these calls return 0 or a positive
|
<para>On success, these calls return 0 or a positive integer. On
|
||||||
integer. On failure, these calls return a negative
|
failure, these calls return a negative errno-style error
|
||||||
errno-style error code.</para>
|
code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_pid_get_session()</function>,
|
<para>The <function>sd_pid_get_session()</function>,
|
||||||
<function>sd_pid_get_unit()</function>,
|
<function>sd_pid_get_unit()</function>,
|
||||||
<function>sd_pid_get_user_unit()</function>,
|
<function>sd_pid_get_user_unit()</function>,
|
||||||
<function>sd_pid_get_owner_uid()</function>,
|
<function>sd_pid_get_owner_uid()</function>,
|
||||||
<function>sd_pid_get_machine_name()</function>,
|
<function>sd_pid_get_machine_name()</function>,
|
||||||
<function>sd_pid_get_slice()</function>,
|
<function>sd_pid_get_slice()</function>,
|
||||||
<function>sd_peer_get_session()</function>,
|
<function>sd_peer_get_session()</function>,
|
||||||
<function>sd_peer_get_unit()</function>,
|
<function>sd_peer_get_unit()</function>,
|
||||||
<function>sd_peer_get_user_unit()</function>,
|
<function>sd_peer_get_user_unit()</function>,
|
||||||
<function>sd_peer_get_owner_uid()</function>,
|
<function>sd_peer_get_owner_uid()</function>,
|
||||||
<function>sd_peer_get_machine_name()</function> and
|
<function>sd_peer_get_machine_name()</function> and
|
||||||
<function>sd_peer_get_slice()</function> interfaces are
|
<function>sd_peer_get_slice()</function> interfaces are
|
||||||
available as a shared library, which can be compiled
|
available as a shared library, which can be compiled
|
||||||
and linked to with the
|
and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
|
|
||||||
<para>Note that the login session identifier as
|
<para>Note that the login session identifier as
|
||||||
returned by <function>sd_pid_get_session()</function>
|
returned by <function>sd_pid_get_session()</function>
|
||||||
is completely unrelated to the process session
|
is completely unrelated to the process session
|
||||||
identifier as returned by
|
identifier as returned by
|
||||||
<citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>.</para>
|
<citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_session_is_active</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>getsid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+127
-135
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,161 +23,153 @@
|
|||||||
|
|
||||||
<refentry id="sd_seat_get_active" conditional='HAVE_PAM'>
|
<refentry id="sd_seat_get_active" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_seat_get_active</title>
|
<title>sd_seat_get_active</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_seat_get_active</refentrytitle>
|
<refentrytitle>sd_seat_get_active</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_seat_get_active</refname>
|
<refname>sd_seat_get_active</refname>
|
||||||
<refname>sd_seat_get_sessions</refname>
|
<refname>sd_seat_get_sessions</refname>
|
||||||
<refname>sd_seat_can_multi_session</refname>
|
<refname>sd_seat_can_multi_session</refname>
|
||||||
<refname>sd_seat_can_tty</refname>
|
<refname>sd_seat_can_tty</refname>
|
||||||
<refname>sd_seat_can_graphical</refname>
|
<refname>sd_seat_can_graphical</refname>
|
||||||
<refpurpose>Determine state of a specific seat</refpurpose>
|
<refpurpose>Determine state of a specific seat</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_seat_get_active</function></funcdef>
|
<funcdef>int <function>sd_seat_get_active</function></funcdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>session</parameter></paramdef>
|
<paramdef>char **<parameter>session</parameter></paramdef>
|
||||||
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_seat_get_sessions</function></funcdef>
|
<funcdef>int <function>sd_seat_get_sessions</function></funcdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
||||||
<paramdef>uid_t **<parameter>uid</parameter></paramdef>
|
<paramdef>uid_t **<parameter>uid</parameter></paramdef>
|
||||||
<paramdef>unsigned int *<parameter>n_uids</parameter></paramdef>
|
<paramdef>unsigned int *<parameter>n_uids</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_seat_can_multi_session</function></funcdef>
|
<funcdef>int <function>sd_seat_can_multi_session</function></funcdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_seat_can_tty</function></funcdef>
|
<funcdef>int <function>sd_seat_can_tty</function></funcdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_seat_can_graphical</function></funcdef>
|
<funcdef>int <function>sd_seat_can_graphical</function></funcdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_seat_get_active()</function> may be
|
<para><function>sd_seat_get_active()</function> may be used to
|
||||||
used to determine which session is currently active on
|
determine which session is currently active on a seat, if there is
|
||||||
a seat, if there is any. Returns the session
|
any. Returns the session identifier and the user identifier of the
|
||||||
identifier and the user identifier of the Unix user
|
Unix user the session is belonging to. Either the session or the
|
||||||
the session is belonging to. Either the session or the
|
user identifier parameter can be passed <constant>NULL</constant>,
|
||||||
user identifier parameter can be passed
|
in case only one of the parameters shall be queried. The returned
|
||||||
<constant>NULL</constant>, in case only one of the
|
string needs to be freed with the libc
|
||||||
parameters shall be queried. The returned string needs
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
to be freed with the libc
|
call after use.</para>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_seat_get_sessions()</function> may
|
<para><function>sd_seat_get_sessions()</function> may be used to
|
||||||
be used to determine all sessions on the specified
|
determine all sessions on the specified seat. Returns two arrays,
|
||||||
seat. Returns two arrays, one (<constant>NULL</constant> terminated) with
|
one (<constant>NULL</constant> terminated) with the session
|
||||||
the session identifiers of the sessions and one with
|
identifiers of the sessions and one with the user identifiers of
|
||||||
the user identifiers of the Unix users the sessions
|
the Unix users the sessions belong to. An additional parameter may
|
||||||
belong to. An additional parameter may be used to
|
be used to return the number of entries in the latter array. The
|
||||||
return the number of entries in the latter array. The
|
two arrays and the latter parameter may be passed as
|
||||||
two arrays and the latter parameter may be passed as
|
<constant>NULL</constant> in case these values need not to be
|
||||||
<constant>NULL</constant> in case these values need not to be
|
determined. The arrays and the strings referenced by them need to
|
||||||
determined. The arrays and the strings referenced by
|
be freed with the libc
|
||||||
them need to be freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use. Note that instead of an empty array
|
||||||
call after use. Note that instead of an empty array
|
<constant>NULL</constant> may be returned and should be considered
|
||||||
<constant>NULL</constant> may be returned and should be considered
|
equivalent to an empty array.</para>
|
||||||
equivalent to an empty array.</para>
|
|
||||||
|
|
||||||
<para><function>sd_seat_can_multi_session()</function>
|
<para><function>sd_seat_can_multi_session()</function> may be used
|
||||||
may be used to determine whether a specific seat is
|
to determine whether a specific seat is capable of multi-session,
|
||||||
capable of multi-session, i.e. allows multiple login
|
i.e. allows multiple login sessions in parallel (with only one
|
||||||
sessions in parallel (with only one being active at a
|
being active at a time).</para>
|
||||||
time).</para>
|
|
||||||
|
|
||||||
<para><function>sd_seat_can_tty()</function> may be
|
<para><function>sd_seat_can_tty()</function> may be used to
|
||||||
used to determine whether a specific seat provides TTY
|
determine whether a specific seat provides TTY functionality, i.e.
|
||||||
functionality, i.e. is useful as a text console.</para>
|
is useful as a text console.</para>
|
||||||
|
|
||||||
<para><function>sd_seat_can_graphical()</function> may
|
<para><function>sd_seat_can_graphical()</function> may be used to
|
||||||
be used to determine whether a specific seat provides
|
determine whether a specific seat provides graphics functionality,
|
||||||
graphics functionality, i.e. is useful as a graphics
|
i.e. is useful as a graphics display.</para>
|
||||||
display.</para>
|
|
||||||
|
|
||||||
<para>If the <varname>seat</varname> parameter of any
|
<para>If the <varname>seat</varname> parameter of any of these
|
||||||
of these functions is passed as
|
functions is passed as <constant>NULL</constant>, the operation is
|
||||||
<constant>NULL</constant>, the operation is executed
|
executed for the seat of the session of the calling process, if
|
||||||
for the seat of the session of the calling process, if
|
there is any.</para>
|
||||||
there is any.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para> On success,
|
<para> On success, <function>sd_seat_get_active()</function>
|
||||||
<function>sd_seat_get_active()</function>
|
returns 0 or a positive integer. On success,
|
||||||
returns 0 or a positive integer. On success,
|
<function>sd_seat_get_sessions()</function> returns the number of
|
||||||
<function>sd_seat_get_sessions()</function> returns
|
entries in the session identifier array. If the test succeeds,
|
||||||
the number of entries in the session identifier
|
<function>sd_seat_can_multi_session</function>,
|
||||||
array. If the test succeeds,
|
<function>sd_seat_can_tty</function> and
|
||||||
<function>sd_seat_can_multi_session</function>,
|
<function>sd_seat_can_graphical</function> return a positive
|
||||||
<function>sd_seat_can_tty</function> and
|
integer, if it fails 0. On failure, these calls return a negative
|
||||||
<function>sd_seat_can_graphical</function> return a
|
errno-style error code.</para>
|
||||||
positive integer, if it fails 0. On failure, these
|
</refsect1>
|
||||||
calls return a negative errno-style error code.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_seat_get_active()</function>,
|
<para>The <function>sd_seat_get_active()</function>,
|
||||||
<function>sd_seat_get_sessions()</function>,
|
<function>sd_seat_get_sessions()</function>,
|
||||||
<function>sd_seat_can_multi_session()</function>,
|
<function>sd_seat_can_multi_session()</function>,
|
||||||
<function>sd_seat_can_tty()</function> and
|
<function>sd_seat_can_tty()</function> and
|
||||||
<function>sd_seat_can_grapical()</function> interfaces
|
<function>sd_seat_can_grapical()</function> interfaces are
|
||||||
are available as a shared library, which can be compiled
|
available as a shared library, which can be compiled and linked to
|
||||||
and linked to with the
|
with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_session_get_seat</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+256
-275
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,319 +23,300 @@
|
|||||||
|
|
||||||
<refentry id="sd_session_is_active" conditional='HAVE_PAM'>
|
<refentry id="sd_session_is_active" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_session_is_active</title>
|
<title>sd_session_is_active</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_session_is_active</refentrytitle>
|
<refentrytitle>sd_session_is_active</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_session_is_active</refname>
|
<refname>sd_session_is_active</refname>
|
||||||
<refname>sd_session_is_remote</refname>
|
<refname>sd_session_is_remote</refname>
|
||||||
<refname>sd_session_get_state</refname>
|
<refname>sd_session_get_state</refname>
|
||||||
<refname>sd_session_get_uid</refname>
|
<refname>sd_session_get_uid</refname>
|
||||||
<refname>sd_session_get_seat</refname>
|
<refname>sd_session_get_seat</refname>
|
||||||
<refname>sd_session_get_service</refname>
|
<refname>sd_session_get_service</refname>
|
||||||
<refname>sd_session_get_type</refname>
|
<refname>sd_session_get_type</refname>
|
||||||
<refname>sd_session_get_class</refname>
|
<refname>sd_session_get_class</refname>
|
||||||
<refname>sd_session_get_desktop</refname>
|
<refname>sd_session_get_desktop</refname>
|
||||||
<refname>sd_session_get_display</refname>
|
<refname>sd_session_get_display</refname>
|
||||||
<refname>sd_session_get_tty</refname>
|
<refname>sd_session_get_tty</refname>
|
||||||
<refname>sd_session_get_vt</refname>
|
<refname>sd_session_get_vt</refname>
|
||||||
<refname>sd_session_get_remote_host</refname>
|
<refname>sd_session_get_remote_host</refname>
|
||||||
<refname>sd_session_get_remote_user</refname>
|
<refname>sd_session_get_remote_user</refname>
|
||||||
<refpurpose>Determine state of a specific session</refpurpose>
|
<refpurpose>Determine state of a specific session</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_is_active</function></funcdef>
|
<funcdef>int <function>sd_session_is_active</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_is_remote</function></funcdef>
|
<funcdef>int <function>sd_session_is_remote</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_state</function></funcdef>
|
<funcdef>int <function>sd_session_get_state</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>state</parameter></paramdef>
|
<paramdef>char **<parameter>state</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_uid</function></funcdef>
|
<funcdef>int <function>sd_session_get_uid</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
<paramdef>uid_t *<parameter>uid</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_seat</function></funcdef>
|
<funcdef>int <function>sd_session_get_seat</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>seat</parameter></paramdef>
|
<paramdef>char **<parameter>seat</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_service</function></funcdef>
|
<funcdef>int <function>sd_session_get_service</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>service</parameter></paramdef>
|
<paramdef>char **<parameter>service</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_type</function></funcdef>
|
<funcdef>int <function>sd_session_get_type</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>type</parameter></paramdef>
|
<paramdef>char **<parameter>type</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_class</function></funcdef>
|
<funcdef>int <function>sd_session_get_class</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>class</parameter></paramdef>
|
<paramdef>char **<parameter>class</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_desktop</function></funcdef>
|
<funcdef>int <function>sd_session_get_desktop</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>desktop</parameter></paramdef>
|
<paramdef>char **<parameter>desktop</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_display</function></funcdef>
|
<funcdef>int <function>sd_session_get_display</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>display</parameter></paramdef>
|
<paramdef>char **<parameter>display</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_remote_host</function></funcdef>
|
<funcdef>int <function>sd_session_get_remote_host</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>remote_host</parameter></paramdef>
|
<paramdef>char **<parameter>remote_host</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_remote_user</function></funcdef>
|
<funcdef>int <function>sd_session_get_remote_user</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>remote_user</parameter></paramdef>
|
<paramdef>char **<parameter>remote_user</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_tty</function></funcdef>
|
<funcdef>int <function>sd_session_get_tty</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>tty</parameter></paramdef>
|
<paramdef>char **<parameter>tty</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_session_get_vt</function></funcdef>
|
<funcdef>int <function>sd_session_get_vt</function></funcdef>
|
||||||
<paramdef>const char *<parameter>session</parameter></paramdef>
|
<paramdef>const char *<parameter>session</parameter></paramdef>
|
||||||
<paramdef>unsigned int *<parameter>vt</parameter></paramdef>
|
<paramdef>unsigned int *<parameter>vt</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_session_is_active()</function> may
|
<para><function>sd_session_is_active()</function> may be used to
|
||||||
be used to determine whether the session identified by
|
determine whether the session identified by the specified session
|
||||||
the specified session identifier is currently active
|
identifier is currently active (i.e. currently in the foreground
|
||||||
(i.e. currently in the foreground and available for
|
and available for user input) or not.</para>
|
||||||
user input) or not.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_is_remote()</function> may
|
<para><function>sd_session_is_remote()</function> may be used to
|
||||||
be used to determine whether the session identified by
|
determine whether the session identified by the specified session
|
||||||
the specified session identifier is a remote session
|
identifier is a remote session (i.e. its remote host is known) or
|
||||||
(i.e. its remote host is known) or not.</para>
|
not.</para>
|
||||||
|
|
||||||
<para><function>sd_session_get_state()</function> may
|
<para><function>sd_session_get_state()</function> may be used to
|
||||||
be used to determine the state of the session
|
determine the state of the session identified by the specified
|
||||||
identified by the specified session identifier. The
|
session identifier. The following states are currently known:
|
||||||
following states are currently known:
|
<literal>online</literal> (session logged in, but session not
|
||||||
<literal>online</literal> (session logged in, but
|
active, i.e. not in the foreground), <literal>active</literal>
|
||||||
session not active, i.e. not in the foreground),
|
(session logged in and active, i.e. in the foreground),
|
||||||
<literal>active</literal> (session logged in and
|
<literal>closing</literal> (session nominally logged out, but some
|
||||||
active, i.e. in the foreground),
|
processes belonging to it are still around). In the future
|
||||||
<literal>closing</literal> (session nominally logged
|
additional states might be defined, client code should be written
|
||||||
out, but some processes belonging to it are still
|
to be robust in regards to additional state strings being
|
||||||
around). In the future additional states might be
|
returned. This function is a more generic version of
|
||||||
defined, client code should be written to be robust in
|
<function>sd_session_is_active()</function>. The returned string
|
||||||
regards to additional state strings being
|
needs to be freed with the libc
|
||||||
returned. This function is a more generic version of
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<function>sd_session_is_active()</function>. The returned
|
call after use.</para>
|
||||||
string needs to be freed with the libc
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_uid()</function> may be
|
<para><function>sd_session_get_uid()</function> may be used to
|
||||||
used to determine the user identifier of the Unix user the session
|
determine the user identifier of the Unix user the session
|
||||||
identified by the specified session identifier belongs
|
identified by the specified session identifier belongs to.</para>
|
||||||
to.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_seat()</function> may
|
<para><function>sd_session_get_seat()</function> may be used to
|
||||||
be used to determine the seat identifier of the seat
|
determine the seat identifier of the seat the session identified
|
||||||
the session identified by the specified session
|
by the specified session identifier belongs to. Note that not all
|
||||||
identifier belongs to. Note that not all sessions are
|
sessions are attached to a seat, this call will fail for them. The
|
||||||
attached to a seat, this call will fail for them. The
|
returned string needs to be freed with the libc
|
||||||
returned string needs to be freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_service()</function>
|
<para><function>sd_session_get_service()</function> may be used to
|
||||||
may be used to determine the name of the service (as
|
determine the name of the service (as passed during PAM session
|
||||||
passed during PAM session setup) that registered the
|
setup) that registered the session identified by the specified
|
||||||
session identified by the specified session
|
session identifier. The returned string needs to be freed with the
|
||||||
identifier. The returned string needs to be freed with
|
libc
|
||||||
the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_type()</function> may
|
<para><function>sd_session_get_type()</function> may be used to
|
||||||
be used to determine the type of the session
|
determine the type of the session identified by the specified
|
||||||
identified by the specified session identifier. The
|
session identifier. The returned string is one of
|
||||||
returned string is one of <literal>x11</literal>,
|
<literal>x11</literal>, <literal>wayland</literal>,
|
||||||
<literal>wayland</literal>, <literal>tty</literal>,
|
<literal>tty</literal>, <literal>mir</literal> or
|
||||||
<literal>mir</literal> or <literal>unspecified</literal> and
|
<literal>unspecified</literal> and needs to be freed with the libc
|
||||||
needs to be freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_class()</function> may
|
<para><function>sd_session_get_class()</function> may be used to
|
||||||
be used to determine the class of the session
|
determine the class of the session identified by the specified
|
||||||
identified by the specified session identifier. The
|
session identifier. The returned string is one of
|
||||||
returned string is one of <literal>user</literal>,
|
<literal>user</literal>, <literal>greeter</literal>,
|
||||||
<literal>greeter</literal>,
|
<literal>lock-screen</literal>, or <literal>background</literal>
|
||||||
<literal>lock-screen</literal>, or
|
and needs to be freed with the libc
|
||||||
<literal>background</literal> and needs to be freed
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
with the libc
|
call after use.</para>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_desktop()</function> may
|
<para><function>sd_session_get_desktop()</function> may be used to
|
||||||
be used to determine the brand of the desktop running on
|
determine the brand of the desktop running on the session
|
||||||
the session identified by the specified session identifier.
|
identified by the specified session identifier. This field can be
|
||||||
This field can be set freely by desktop environments and
|
set freely by desktop environments and does not follow any special
|
||||||
does not follow any special formatting. However, desktops
|
formatting. However, desktops are strongly recommended to use the
|
||||||
are strongly recommended to use the same identifiers and
|
same identifiers and capitalization as for
|
||||||
capitalization as for
|
<varname>$XDG_CURRENT_DESKTOP</varname>, as defined by the <ulink
|
||||||
<varname>$XDG_CURRENT_DESKTOP</varname>, as defined by
|
url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
|
||||||
the <ulink
|
Entry Specification</ulink>. The returned string needs to be freed
|
||||||
url="http://standards.freedesktop.org/desktop-entry-spec/latest/">Desktop
|
with the libc
|
||||||
Entry
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
Specification</ulink>. The returned string needs to be
|
call after use.</para>
|
||||||
freed with the libc
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_display()</function>
|
<para><function>sd_session_get_display()</function> may be used to
|
||||||
may be used to determine the X11 display of the
|
determine the X11 display of the session identified by the
|
||||||
session identified by the specified session
|
specified session identifier. The returned string needs to be
|
||||||
identifier. The returned string needs to be
|
freed with the libc
|
||||||
freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_remote_host()</function>
|
<para><function>sd_session_get_remote_host()</function> may be
|
||||||
may be used to determine the remote hostname of the
|
used to determine the remote hostname of the session identified by
|
||||||
session identified by the specified session
|
the specified session identifier. The returned string needs to be
|
||||||
identifier. The returned string needs to be
|
freed with the libc
|
||||||
freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_remote_user()</function>
|
<para><function>sd_session_get_remote_user()</function> may be
|
||||||
may be used to determine the remote username of the
|
used to determine the remote username of the session identified by
|
||||||
session identified by the specified session
|
the specified session identifier. The returned string needs to be
|
||||||
identifier. The returned string needs to be
|
freed with the libc
|
||||||
freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use. Note that this value is rarely known to the
|
||||||
call after use. Note that this value is rarely known
|
system, and even then should not be relied on.</para>
|
||||||
to the system, and even then should not be relied on.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_tty()</function>
|
<para><function>sd_session_get_tty()</function> may be used to
|
||||||
may be used to determine the TTY device of the
|
determine the TTY device of the session identified by the
|
||||||
session identified by the specified session
|
specified session identifier. The returned string needs to be
|
||||||
identifier. The returned string needs to be
|
freed with the libc
|
||||||
freed with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use.</para>
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_session_get_vt()</function>
|
<para><function>sd_session_get_vt()</function> may be used to
|
||||||
may be used to determine the VT number of the
|
determine the VT number of the session identified by the specified
|
||||||
session identified by the specified session
|
session identifier. This function will return an error if the seat
|
||||||
identifier. This function will return an error if
|
does not support VTs.</para>
|
||||||
the seat does not support VTs.</para>
|
|
||||||
|
|
||||||
<para>If the <varname>session</varname> parameter of
|
<para>If the <varname>session</varname> parameter of any of these
|
||||||
any of these functions is passed as
|
functions is passed as <constant>NULL</constant>, the operation is
|
||||||
<constant>NULL</constant>, the operation is executed
|
executed for the session the calling process is a member of, if
|
||||||
for the session the calling process is a member of, if
|
there is any.</para>
|
||||||
there is any.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>If the test succeeds,
|
<para>If the test succeeds,
|
||||||
<function>sd_session_is_active()</function> and
|
<function>sd_session_is_active()</function> and
|
||||||
<function>sd_session_is_remote()</function> return a
|
<function>sd_session_is_remote()</function> return a
|
||||||
positive integer; if it fails, 0. On success,
|
positive integer; if it fails, 0. On success,
|
||||||
<function>sd_session_get_state()</function>,
|
<function>sd_session_get_state()</function>,
|
||||||
<function>sd_session_get_uid()</function>,
|
<function>sd_session_get_uid()</function>,
|
||||||
<function>sd_session_get_seat()</function>,
|
<function>sd_session_get_seat()</function>,
|
||||||
<function>sd_session_get_service()</function>,
|
<function>sd_session_get_service()</function>,
|
||||||
<function>sd_session_get_type()</function>,
|
<function>sd_session_get_type()</function>,
|
||||||
<function>sd_session_get_class()</function>,
|
<function>sd_session_get_class()</function>,
|
||||||
<function>sd_session_get_display()</function>,
|
<function>sd_session_get_display()</function>,
|
||||||
<function>sd_session_get_remote_user()</function>,
|
<function>sd_session_get_remote_user()</function>,
|
||||||
<function>sd_session_get_remote_host()</function> and
|
<function>sd_session_get_remote_host()</function> and
|
||||||
<function>sd_session_get_tty()</function> return 0 or
|
<function>sd_session_get_tty()</function> return 0 or
|
||||||
a positive integer. On failure, these calls return a
|
a positive integer. On failure, these calls return a
|
||||||
negative errno-style error code.</para>
|
negative errno-style error code.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>The <function>sd_session_is_active()</function>,
|
<para>The <function>sd_session_is_active()</function>,
|
||||||
<function>sd_session_get_state()</function>,
|
<function>sd_session_get_state()</function>,
|
||||||
<function>sd_session_get_uid()</function>,
|
<function>sd_session_get_uid()</function>,
|
||||||
<function>sd_session_get_seat()</function>,
|
<function>sd_session_get_seat()</function>,
|
||||||
<function>sd_session_get_service()</function>,
|
<function>sd_session_get_service()</function>,
|
||||||
<function>sd_session_get_type()</function>,
|
<function>sd_session_get_type()</function>,
|
||||||
<function>sd_session_get_class()</function>,
|
<function>sd_session_get_class()</function>,
|
||||||
<function>sd_session_get_display()</function>,
|
<function>sd_session_get_display()</function>,
|
||||||
<function>sd_session_get_remote_host()</function>,
|
<function>sd_session_get_remote_host()</function>,
|
||||||
<function>sd_session_get_remote_user()</function> and
|
<function>sd_session_get_remote_user()</function> and
|
||||||
<function>sd_session_get_tty()</function>
|
<function>sd_session_get_tty()</function>
|
||||||
interfaces are available as a shared library, which can
|
interfaces are available as a shared library, which can
|
||||||
be compiled and linked to with the
|
be compiled and linked to with the
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
file.</para>
|
file.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_pid_get_session</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+154
-165
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,193 +23,182 @@
|
|||||||
|
|
||||||
<refentry id="sd_uid_get_state" conditional='HAVE_PAM'>
|
<refentry id="sd_uid_get_state" conditional='HAVE_PAM'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_uid_get_state</title>
|
<title>sd_uid_get_state</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_uid_get_state</refentrytitle>
|
<refentrytitle>sd_uid_get_state</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_uid_get_state</refname>
|
<refname>sd_uid_get_state</refname>
|
||||||
<refname>sd_uid_is_on_seat</refname>
|
<refname>sd_uid_is_on_seat</refname>
|
||||||
<refname>sd_uid_get_sessions</refname>
|
<refname>sd_uid_get_sessions</refname>
|
||||||
<refname>sd_uid_get_seats</refname>
|
<refname>sd_uid_get_seats</refname>
|
||||||
<refname>sd_uid_get_display</refname>
|
<refname>sd_uid_get_display</refname>
|
||||||
<refpurpose>Determine login state of a specific Unix user ID</refpurpose>
|
<refpurpose>Determine login state of a specific Unix user ID</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-login.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_uid_get_state</function></funcdef>
|
<funcdef>int <function>sd_uid_get_state</function></funcdef>
|
||||||
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>state</parameter></paramdef>
|
<paramdef>char **<parameter>state</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_uid_is_on_seat</function></funcdef>
|
<funcdef>int <function>sd_uid_is_on_seat</function></funcdef>
|
||||||
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>require_active</parameter></paramdef>
|
<paramdef>int <parameter>require_active</parameter></paramdef>
|
||||||
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
<paramdef>const char *<parameter>seat</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_uid_get_sessions</function></funcdef>
|
<funcdef>int <function>sd_uid_get_sessions</function></funcdef>
|
||||||
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>require_active</parameter></paramdef>
|
<paramdef>int <parameter>require_active</parameter></paramdef>
|
||||||
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
<paramdef>char ***<parameter>sessions</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_uid_get_seats</function></funcdef>
|
<funcdef>int <function>sd_uid_get_seats</function></funcdef>
|
||||||
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
||||||
<paramdef>int <parameter>require_active</parameter></paramdef>
|
<paramdef>int <parameter>require_active</parameter></paramdef>
|
||||||
<paramdef>char ***<parameter>seats</parameter></paramdef>
|
<paramdef>char ***<parameter>seats</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_uid_get_display</function></funcdef>
|
<funcdef>int <function>sd_uid_get_display</function></funcdef>
|
||||||
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
<paramdef>uid_t <parameter>uid</parameter></paramdef>
|
||||||
<paramdef>char **<parameter>session</parameter></paramdef>
|
<paramdef>char **<parameter>session</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_uid_get_state()</function> may be
|
<para><function>sd_uid_get_state()</function> may be used to
|
||||||
used to determine the login state of a specific Unix
|
determine the login state of a specific Unix user identifier. The
|
||||||
user identifier. The following states are currently
|
following states are currently known: <literal>offline</literal>
|
||||||
known: <literal>offline</literal> (user not logged in
|
(user not logged in at all), <literal>lingering</literal> (user
|
||||||
at all), <literal>lingering</literal> (user not logged
|
not logged in, but some user services running),
|
||||||
in, but some user services running),
|
<literal>online</literal> (user logged in, but not active, i.e.
|
||||||
<literal>online</literal> (user logged in, but not
|
has no session in the foreground), <literal>active</literal> (user
|
||||||
active, i.e. has no session in the foreground),
|
logged in, and has at least one active session, i.e. one session
|
||||||
<literal>active</literal> (user logged in, and has at
|
in the foreground), <literal>closing</literal> (user not logged
|
||||||
least one active session, i.e. one session in the
|
in, and not lingering, but some processes are still around). In
|
||||||
foreground), <literal>closing</literal> (user not
|
the future additional states might be defined, client code should
|
||||||
logged in, and not lingering, but some processes are
|
be written to be robust in regards to additional state strings
|
||||||
still around). In the future additional states might
|
being returned. The returned string needs to be freed with the
|
||||||
be defined, client code should be written to be robust
|
libc
|
||||||
in regards to additional state strings being
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
returned. The returned string needs to be freed with
|
call after use.</para>
|
||||||
the libc
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
call after use.</para>
|
|
||||||
|
|
||||||
<para><function>sd_uid_is_on_seat()</function> may be
|
<para><function>sd_uid_is_on_seat()</function> may be used to
|
||||||
used to determine whether a specific user is logged in
|
determine whether a specific user is logged in or active on a
|
||||||
or active on a specific seat. Accepts a Unix user
|
specific seat. Accepts a Unix user identifier and a seat
|
||||||
identifier and a seat identifier string as
|
identifier string as parameters. The
|
||||||
parameters. The <parameter>require_active</parameter>
|
<parameter>require_active</parameter> parameter is a boolean
|
||||||
parameter is a boolean value. If non-zero (true), this
|
value. If non-zero (true), this function will test if the user is
|
||||||
function will test if the user is active (i.e. has a
|
active (i.e. has a session that is in the foreground and accepting
|
||||||
session that is in the foreground and accepting user
|
user input) on the specified seat, otherwise (false) only if the
|
||||||
input) on the specified seat, otherwise (false) only
|
user is logged in (and possibly inactive) on the specified
|
||||||
if the user is logged in (and possibly inactive) on
|
seat.</para>
|
||||||
the specified seat.</para>
|
|
||||||
|
|
||||||
<para><function>sd_uid_get_sessions()</function> may
|
<para><function>sd_uid_get_sessions()</function> may be used to
|
||||||
be used to determine the current sessions of the
|
determine the current sessions of the specified user. Accepts a
|
||||||
specified user. Accepts a Unix user identifier as
|
Unix user identifier as parameter. The
|
||||||
parameter. The <parameter>require_active</parameter>
|
<parameter>require_active</parameter> parameter controls whether
|
||||||
parameter controls whether the returned list shall
|
the returned list shall consist of only those sessions where the
|
||||||
consist of only those sessions where the user is
|
user is currently active (> 0), where the user is currently
|
||||||
currently active (> 0), where the user is currently
|
online but possibly inactive (= 0), or logged in at all but
|
||||||
online but possibly inactive (= 0), or
|
possibly closing the session (< 0). The call returns a
|
||||||
logged in at all but possibly closing the session (< 0). The call returns a
|
<constant>NULL</constant> terminated string array of session
|
||||||
<constant>NULL</constant> terminated string array of session identifiers in
|
identifiers in <parameter>sessions</parameter> which needs to be
|
||||||
<parameter>sessions</parameter> which needs to be
|
freed by the caller with the libc
|
||||||
freed by the caller with the libc
|
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
<citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call after use, including all the strings referenced. If the
|
||||||
call after use, including all the strings
|
string array parameter is passed as <constant>NULL</constant>, the
|
||||||
referenced. If the string array parameter is passed as
|
array will not be filled in, but the return code still indicates
|
||||||
<constant>NULL</constant>, the array will not be filled in, but the return
|
the number of current sessions. Note that instead of an empty
|
||||||
code still indicates the number of current
|
array <constant>NULL</constant> may be returned and should be
|
||||||
sessions. Note that instead of an empty array <constant>NULL</constant> may
|
considered equivalent to an empty array.</para>
|
||||||
be returned and should be considered equivalent to an
|
|
||||||
empty array.</para>
|
|
||||||
|
|
||||||
<para>Similarly, <function>sd_uid_get_seats()</function>
|
<para>Similarly, <function>sd_uid_get_seats()</function> may be
|
||||||
may be used to determine the list of seats on which
|
used to determine the list of seats on which the user currently
|
||||||
the user currently has sessions. Similar semantics
|
has sessions. Similar semantics apply, however note that the user
|
||||||
apply, however note that the user may have
|
may have multiple sessions on the same seat as well as sessions
|
||||||
multiple sessions on the same seat as well as sessions
|
with no attached seat and hence the number of entries in the
|
||||||
with no attached seat and hence the number of entries
|
returned array may differ from the one returned by
|
||||||
in the returned array may differ from the one returned
|
<function>sd_uid_get_sessions()</function>.</para>
|
||||||
by <function>sd_uid_get_sessions()</function>.</para>
|
|
||||||
|
|
||||||
<para><function>sd_uid_get_display()</function>
|
<para><function>sd_uid_get_display()</function> returns the name
|
||||||
returns the name of the "primary" session of a user.
|
of the "primary" session of a user. If the user has graphical
|
||||||
If the user has graphical sessions, it will be the
|
sessions, it will be the oldest graphical session. Otherwise, it
|
||||||
oldest graphical session. Otherwise, it will be the
|
will be the oldest open session.</para>
|
||||||
oldest open session.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On success,
|
<para>On success, <function>sd_uid_get_state()</function> returns
|
||||||
<function>sd_uid_get_state()</function> returns 0 or a
|
0 or a positive integer. If the test succeeds,
|
||||||
positive integer. If the test succeeds,
|
<function>sd_uid_is_on_seat()</function> returns a positive
|
||||||
<function>sd_uid_is_on_seat()</function> returns a
|
integer; if it fails, 0.
|
||||||
positive integer; if it fails,
|
<function>sd_uid_get_sessions()</function> and
|
||||||
0. <function>sd_uid_get_sessions()</function> and
|
<function>sd_uid_get_seats()</function> return the number of
|
||||||
<function>sd_uid_get_seats()</function> return the
|
entries in the returned arrays.
|
||||||
number of entries in the returned arrays.
|
<function>sd_uid_get_display()</function> returns a non-negative
|
||||||
<function>sd_uid_get_display()</function> returns
|
code on success. On failure, these calls return a negative
|
||||||
a non-negative code on success. On failure,
|
errno-style error code.</para>
|
||||||
these calls return a negative errno-style error
|
</refsect1>
|
||||||
code.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>Functions described here are available as a
|
<para>Functions described here are available as a shared library,
|
||||||
shared library, and can be compiled and linked to
|
and can be compiled and linked to using the
|
||||||
using the
|
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
entry.</para>
|
||||||
entry.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<function>sd_uid_get_state()</function>,
|
<para><function>sd_uid_get_state()</function>,
|
||||||
<function>sd_uid_is_on_seat()</function>,
|
<function>sd_uid_is_on_seat()</function>,
|
||||||
<function>sd_uid_get_sessions()</function>,
|
<function>sd_uid_get_sessions()</function>, and
|
||||||
and <function>sd_uid_get_seats()</function> functions
|
<function>sd_uid_get_seats()</function> functions were added in
|
||||||
were added in systemd-31.
|
systemd-31.</para>
|
||||||
|
|
||||||
<para><function>sd_uid_get_display()</function> was
|
<para><function>sd_uid_get_display()</function> was added in
|
||||||
added in systemd-213.</para>
|
systemd-213.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+125
-139
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,168 +22,154 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="sd_watchdog_enabled"
|
<refentry id="sd_watchdog_enabled"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sd_watchdog_enabled</title>
|
<title>sd_watchdog_enabled</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sd_watchdog_enabled</refentrytitle>
|
<refentrytitle>sd_watchdog_enabled</refentrytitle>
|
||||||
<manvolnum>3</manvolnum>
|
<manvolnum>3</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sd_watchdog_enabled</refname>
|
<refname>sd_watchdog_enabled</refname>
|
||||||
<refpurpose>Check whether the service manager expects watchdog keep-alive notifications from a service</refpurpose>
|
<refpurpose>Check whether the service manager expects watchdog keep-alive notifications from a service</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<funcsynopsis>
|
<funcsynopsis>
|
||||||
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
<funcsynopsisinfo>#include <systemd/sd-daemon.h></funcsynopsisinfo>
|
||||||
|
|
||||||
<funcprototype>
|
<funcprototype>
|
||||||
<funcdef>int <function>sd_watchdog_enabled</function></funcdef>
|
<funcdef>int <function>sd_watchdog_enabled</function></funcdef>
|
||||||
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
<paramdef>int <parameter>unset_environment</parameter></paramdef>
|
||||||
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
<paramdef>uint64_t *<parameter>usec</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
<para><function>sd_watchdog_enabled()</function> may
|
<para><function>sd_watchdog_enabled()</function> may be called by
|
||||||
be called by a service to detect whether the service
|
a service to detect whether the service manager expects regular
|
||||||
manager expects regular keep-alive watchdog
|
keep-alive watchdog notification events from it, and the timeout
|
||||||
notification events from it, and the timeout after
|
after which the manager will act on the service if it did not get
|
||||||
which the manager will act on the service if it did
|
such a notification.</para>
|
||||||
not get such a notification.</para>
|
|
||||||
|
|
||||||
<para>If the <varname>$WATCHDOG_USEC</varname>
|
<para>If the <varname>$WATCHDOG_USEC</varname> environment
|
||||||
environment variable is set, and the
|
variable is set, and the <varname>$WATCHDOG_PID</varname> variable
|
||||||
<varname>$WATCHDOG_PID</varname> variable is unset or
|
is unset or set to the PID of the current process, the service
|
||||||
set to the PID of the current process, the service
|
manager expects notifications from this process. The manager will
|
||||||
manager expects notifications from this process. The
|
usually terminate a service when it does not get a notification
|
||||||
manager will usually terminate a service when it does
|
message within the specified time after startup and after each
|
||||||
not get a notification message within the specified
|
previous message. It is recommended that a daemon sends a
|
||||||
time after startup and after each previous message. It
|
keep-alive notification message to the service manager every half
|
||||||
is recommended that a daemon sends a keep-alive
|
of the time returned here. Notification messages may be sent with
|
||||||
notification message to the service manager every half
|
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
of the time returned here. Notification messages may
|
with a message string of <literal>WATCHDOG=1</literal>.</para>
|
||||||
be sent with
|
|
||||||
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
|
||||||
with a message string of
|
|
||||||
<literal>WATCHDOG=1</literal>.</para>
|
|
||||||
|
|
||||||
<para>If the <parameter>unset_environment</parameter>
|
<para>If the <parameter>unset_environment</parameter> parameter is
|
||||||
parameter is non-zero,
|
non-zero, <function>sd_watchdog_enabled()</function> will unset
|
||||||
<function>sd_watchdog_enabled()</function> will unset
|
the <varname>$WATCHDOG_USEC</varname> and
|
||||||
the <varname>$WATCHDOG_USEC</varname> and
|
<varname>$WATCHDOG_PID</varname> environment variables before
|
||||||
<varname>$WATCHDOG_PID</varname> environment variables
|
returning (regardless of whether the function call itself
|
||||||
before returning (regardless of whether the function
|
succeeded or not). Those variables are no longer inherited by
|
||||||
call itself succeeded or not). Those variables are no
|
child processes. Further calls to
|
||||||
longer inherited by child processes. Further calls to
|
<function>sd_watchdog_enabled()</function> will also return with
|
||||||
<function>sd_watchdog_enabled()</function> will also
|
zero.</para>
|
||||||
return with zero.</para>
|
|
||||||
|
|
||||||
<para>If the <parameter>usec</parameter> parameter is
|
<para>If the <parameter>usec</parameter> parameter is non-NULL,
|
||||||
non-NULL, <function>sd_watchdog_enabled()</function>
|
<function>sd_watchdog_enabled()</function> will write the timeout
|
||||||
will write the timeout in µs for the watchdog
|
in µs for the watchdog logic to it.</para>
|
||||||
logic to it.</para>
|
|
||||||
|
|
||||||
<para>To enable service supervision with the watchdog
|
<para>To enable service supervision with the watchdog logic, use
|
||||||
logic, use <varname>WatchdogSec=</varname> in service
|
<varname>WatchdogSec=</varname> in service files. See
|
||||||
files. See
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for details.</para>
|
||||||
for details.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Return Value</title>
|
<title>Return Value</title>
|
||||||
|
|
||||||
<para>On failure, this call returns a negative
|
<para>On failure, this call returns a negative errno-style error
|
||||||
errno-style error code. If the service manager expects
|
code. If the service manager expects watchdog keep-alive
|
||||||
watchdog keep-alive notification messages to be sent,
|
notification messages to be sent, > 0 is returned, otherwise 0
|
||||||
> 0 is returned, otherwise 0 is returned. Only if
|
is returned. Only if the return value is > 0, the
|
||||||
the return value is > 0, the
|
<parameter>usec</parameter> parameter is valid after the
|
||||||
<parameter>usec</parameter> parameter is valid after
|
call.</para>
|
||||||
the call.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
|
||||||
|
|
||||||
<para>Internally, this functions parses the
|
<para>Internally, this functions parses the
|
||||||
<varname>$WATCHDOG_PID</varname> and
|
<varname>$WATCHDOG_PID</varname> and
|
||||||
<varname>$WATCHDOG_USEC</varname> environment
|
<varname>$WATCHDOG_USEC</varname> environment variable. The call
|
||||||
variable. The call will ignore these variables if
|
will ignore these variables if <varname>$WATCHDOG_PID</varname>
|
||||||
<varname>$WATCHDOG_PID</varname> does not contain the PID
|
does not contain the PID of the current process, under the
|
||||||
of the current process, under the assumption that in
|
assumption that in that case, the variables were set for a
|
||||||
that case, the variables were set for a different
|
different process further up the process tree.</para>
|
||||||
process further up the process tree.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Environment</title>
|
<title>Environment</title>
|
||||||
|
|
||||||
<variablelist class='environment-variables'>
|
<variablelist class='environment-variables'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$WATCHDOG_PID</varname></term>
|
<term><varname>$WATCHDOG_PID</varname></term>
|
||||||
|
|
||||||
<listitem><para>Set by the system
|
<listitem><para>Set by the system manager for supervised
|
||||||
manager for supervised process for
|
process for which watchdog support is enabled, and contains
|
||||||
which watchdog support is enabled, and
|
the PID of that process. See above for
|
||||||
contains the PID of that process. See
|
details.</para></listitem>
|
||||||
above for details.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>$WATCHDOG_USEC</varname></term>
|
<term><varname>$WATCHDOG_USEC</varname></term>
|
||||||
|
|
||||||
<listitem><para>Set by the system
|
<listitem><para>Set by the system manager for supervised
|
||||||
manager for supervised process for
|
process for which watchdog support is enabled, and contains
|
||||||
which watchdog support is enabled, and
|
the watchdog timeout in µs See above for
|
||||||
contains the watchdog timeout in µs
|
details.</para></listitem>
|
||||||
See above for
|
</varlistentry>
|
||||||
details.</para></listitem>
|
</variablelist>
|
||||||
</varlistentry>
|
</refsect1>
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para>The watchdog functionality and the
|
<para>The watchdog functionality and the
|
||||||
<varname>$WATCHDOG_USEC</varname> variable were
|
<varname>$WATCHDOG_USEC</varname> variable were added in
|
||||||
added in systemd-41.</para>
|
systemd-41.</para>
|
||||||
|
|
||||||
<para><function>sd_watchdog_enabled()</function>
|
<para><function>sd_watchdog_enabled()</function> function was
|
||||||
function was added in systemd-209. Since that version
|
added in systemd-209. Since that version the
|
||||||
the <varname>$WATCHDOG_PID</varname> variable is also
|
<varname>$WATCHDOG_PID</varname> variable is also set.</para>
|
||||||
set.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+117
-123
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,160 +22,154 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="shutdown"
|
<refentry id="shutdown"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>shutdown</title>
|
<title>shutdown</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>shutdown</refentrytitle>
|
<refentrytitle>shutdown</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>shutdown</refname>
|
<refname>shutdown</refname>
|
||||||
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
|
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>shutdown <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">TIME</arg> <arg choice="opt" rep="repeat">WALL</arg></command>
|
<command>shutdown</command>
|
||||||
</cmdsynopsis>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
</refsynopsisdiv>
|
<arg choice="opt">TIME</arg>
|
||||||
|
<arg choice="opt" rep="repeat">WALL</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>shutdown</command> may be used to halt,
|
<para><command>shutdown</command> may be used to halt, power-off
|
||||||
power-off or reboot the machine.</para>
|
or reboot the machine.</para>
|
||||||
|
|
||||||
<para>The first argument may be a time string (which
|
<para>The first argument may be a time string (which is usually
|
||||||
is usually <literal>now</literal>). Optionally, this
|
<literal>now</literal>). Optionally, this may be followed by a
|
||||||
may be followed by a wall message to be sent to all
|
wall message to be sent to all logged-in users before going
|
||||||
logged-in users before going down.</para>
|
down.</para>
|
||||||
|
|
||||||
<para>The time string may either be in the format
|
<para>The time string may either be in the format
|
||||||
<literal>hh:mm</literal> for hour/minutes specifying
|
<literal>hh:mm</literal> for hour/minutes specifying the time to
|
||||||
the time to execute the shutdown at, specified in 24h
|
execute the shutdown at, specified in 24h clock format.
|
||||||
clock format. Alternatively it may be in the syntax
|
Alternatively it may be in the syntax <literal>+m</literal>
|
||||||
<literal>+m</literal> referring to the specified
|
referring to the specified number of minutes m from now.
|
||||||
number of minutes m from now. <literal>now</literal>
|
<literal>now</literal> is an alias for <literal>+0</literal>, i.e.
|
||||||
is an alias for <literal>+0</literal>, i.e. for
|
for triggering an immediate shutdown. If no time argument is
|
||||||
triggering an immediate shutdown. If no time argument
|
specified, <literal>+1</literal> is implied.</para>
|
||||||
is specified, <literal>+1</literal> is
|
|
||||||
implied.</para>
|
|
||||||
|
|
||||||
<para>Note that to specify a wall message you must
|
<para>Note that to specify a wall message you must specify a time
|
||||||
specify a time argument, too.</para>
|
argument, too.</para>
|
||||||
|
|
||||||
<para>If the time argument is used, 5 minutes
|
<para>If the time argument is used, 5 minutes before the system
|
||||||
before the system goes down the
|
goes down the <filename>/run/nologin</filename> file is created to
|
||||||
<filename>/run/nologin</filename> file is created to
|
ensure that further logins shall not be allowed.</para>
|
||||||
ensure that further logins shall not be
|
</refsect1>
|
||||||
allowed.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--help</option></term>
|
<term><option>--help</option></term>
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help-text" />
|
<xi:include href="standard-options.xml" xpointer="help-text" />
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-H</option></term>
|
<term><option>-H</option></term>
|
||||||
<term><option>--halt</option></term>
|
<term><option>--halt</option></term>
|
||||||
|
|
||||||
<listitem><para>Halt the machine.</para></listitem>
|
<listitem><para>Halt the machine.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-P</option></term>
|
<term><option>-P</option></term>
|
||||||
<term><option>--poweroff</option></term>
|
<term><option>--poweroff</option></term>
|
||||||
|
|
||||||
<listitem><para>Power-off the
|
<listitem><para>Power-off the machine (the
|
||||||
machine (the default).</para></listitem>
|
default).</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-r</option></term>
|
<term><option>-r</option></term>
|
||||||
<term><option>--reboot</option></term>
|
<term><option>--reboot</option></term>
|
||||||
|
|
||||||
<listitem><para>Reboot the
|
<listitem><para>Reboot the
|
||||||
machine.</para></listitem>
|
machine.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-h</option></term>
|
<term><option>-h</option></term>
|
||||||
|
|
||||||
<listitem><para>Equivalent to
|
<listitem><para>Equivalent to <option>--poweroff</option>,
|
||||||
<option>--poweroff</option>, unless
|
unless <option>--halt</option> is specified.</para></listitem>
|
||||||
<option>--halt</option> is
|
</varlistentry>
|
||||||
specified.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-k</option></term>
|
<term><option>-k</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not halt, power-off,
|
<listitem><para>Do not halt, power-off, reboot, just write
|
||||||
reboot, just write wall
|
wall message.</para></listitem>
|
||||||
message.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-wall</option></term>
|
<term><option>--no-wall</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not send wall
|
<listitem><para>Do not send wall
|
||||||
message before
|
message before
|
||||||
halt, power-off, reboot.</para></listitem>
|
halt, power-off, reboot.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-c</option></term>
|
<term><option>-c</option></term>
|
||||||
|
|
||||||
<listitem><para>Cancel a pending
|
<listitem><para>Cancel a pending shutdown. This may be used
|
||||||
shutdown. This may be used cancel the
|
cancel the effect of an invocation of
|
||||||
effect of an invocation of
|
<command>shutdown</command> with a time argument that is not
|
||||||
<command>shutdown</command> with a
|
<literal>+0</literal> or
|
||||||
time argument that is not
|
<literal>now</literal>.</para></listitem>
|
||||||
<literal>+0</literal> or
|
</varlistentry>
|
||||||
<literal>now</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+117
-122
@@ -19,158 +19,153 @@
|
|||||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<refentry id="sysctl.d"
|
<refentry id="sysctl.d"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>sysctl.d</title>
|
<title>sysctl.d</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>sysctl.d</refentrytitle>
|
<refentrytitle>sysctl.d</refentrytitle>
|
||||||
<manvolnum>5</manvolnum>
|
<manvolnum>5</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>sysctl.d</refname>
|
<refname>sysctl.d</refname>
|
||||||
<refpurpose>Configure kernel parameters at boot</refpurpose>
|
<refpurpose>Configure kernel parameters at boot</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/etc/sysctl.d/*.conf</filename></para>
|
<para><filename>/etc/sysctl.d/*.conf</filename></para>
|
||||||
<para><filename>/run/sysctl.d/*.conf</filename></para>
|
<para><filename>/run/sysctl.d/*.conf</filename></para>
|
||||||
<para><filename>/usr/lib/sysctl.d/*.conf</filename></para>
|
<para><filename>/usr/lib/sysctl.d/*.conf</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>At boot,
|
<para>At boot,
|
||||||
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
reads configuration files from the above directories
|
reads configuration files from the above directories to configure
|
||||||
to configure
|
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
kernel parameters.</para>
|
||||||
kernel parameters.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Configuration Format</title>
|
<title>Configuration Format</title>
|
||||||
|
|
||||||
<para>The configuration files contain a list of
|
<para>The configuration files contain a list of variable
|
||||||
variable assignments, separated by newlines. Empty
|
assignments, separated by newlines. Empty lines and lines whose
|
||||||
lines and lines whose first non-whitespace character
|
first non-whitespace character is <literal>#</literal> or
|
||||||
is <literal>#</literal> or <literal>;</literal> are
|
<literal>;</literal> are ignored.</para>
|
||||||
ignored.</para>
|
|
||||||
|
|
||||||
<para>Note that either <literal>/</literal> or
|
<para>Note that either <literal>/</literal> or
|
||||||
<literal>.</literal> may be used as separators within
|
<literal>.</literal> may be used as separators within sysctl
|
||||||
sysctl variable names. If the first separator is a
|
variable names. If the first separator is a slash, remaining
|
||||||
slash, remaining slashes and dots are left intact. If
|
slashes and dots are left intact. If the first separator is a dot,
|
||||||
the first separator is a dot, dots and slashes are
|
dots and slashes are interchanged.
|
||||||
interchanged. <literal>kernel.domainname=foo</literal>
|
<literal>kernel.domainname=foo</literal> and
|
||||||
and <literal>kernel/domainname=foo</literal> are
|
<literal>kernel/domainname=foo</literal> are equivalent and will
|
||||||
equivalent and will cause <literal>foo</literal> to
|
cause <literal>foo</literal> to be written to
|
||||||
be written to
|
<filename>/proc/sys/kernel/domainname</filename>. Either
|
||||||
<filename>/proc/sys/kernel/domainname</filename>.
|
<literal>net.ipv4.conf.enp3s0/200.forwarding</literal> or
|
||||||
Either
|
<literal>net/ipv4/conf/enp3s0.200/forwarding</literal> may be used
|
||||||
<literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
|
to refer to
|
||||||
or
|
<filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
||||||
<literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
|
</para>
|
||||||
may be used to refer to
|
|
||||||
<filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>The settings configured with
|
<para>The settings configured with <filename>sysctl.d</filename>
|
||||||
<filename>sysctl.d</filename> files will be applied
|
files will be applied early on boot. The network
|
||||||
early on boot. The network interface-specific options
|
interface-specific options will also be applied individually for
|
||||||
will also be applied individually for each network
|
each network interface as it shows up in the system. (More
|
||||||
interface as it shows up in the system. (More
|
specifically, <filename>net.ipv4.conf.*</filename>,
|
||||||
specifically,
|
<filename>net.ipv6.conf.*</filename>,
|
||||||
<filename>net.ipv4.conf.*</filename>,
|
<filename>net.ipv4.neigh.*</filename> and
|
||||||
<filename>net.ipv6.conf.*</filename>,
|
<filename>net.ipv6.neigh.*</filename>).</para>
|
||||||
<filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>).</para>
|
|
||||||
|
|
||||||
<para>Many sysctl parameters only become available
|
<para>Many sysctl parameters only become available when certain
|
||||||
when certain kernel modules are loaded. Modules are
|
kernel modules are loaded. Modules are usually loaded on demand,
|
||||||
usually loaded on demand, e.g. when certain hardware
|
e.g. when certain hardware is plugged in or network brought up.
|
||||||
is plugged in or network brought up. This means that
|
This means that
|
||||||
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> which runs
|
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
during early boot will not configure such parameters
|
which runs during early boot will not configure such parameters if
|
||||||
if they become available after it has run. To
|
they become available after it has run. To set such parameters, it
|
||||||
set such parameters, it is recommended to add
|
is recommended to add an
|
||||||
an <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> rule to set those parameters when they become
|
<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
available. Alternatively, a slightly simpler and
|
rule to set those parameters when they become available.
|
||||||
less efficient option is to add the module to
|
Alternatively, a slightly simpler and less efficient option is to
|
||||||
<citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, causing it to be loaded statically
|
add the module to
|
||||||
before sysctl settings are applied (see
|
<citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
example below).</para>
|
causing it to be loaded statically before sysctl settings are
|
||||||
</refsect1>
|
applied (see example below).</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="standard-conf.xml" xpointer="confd" />
|
<xi:include href="standard-conf.xml" xpointer="confd" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
<example>
|
<example>
|
||||||
<title>Set kernel YP domain name</title>
|
<title>Set kernel YP domain name</title>
|
||||||
<para><filename>/etc/sysctl.d/domain-name.conf</filename>:
|
<para><filename>/etc/sysctl.d/domain-name.conf</filename>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>kernel.domainname=example.com</programlisting>
|
<programlisting>kernel.domainname=example.com</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Disable packet filter on bridged packets (method one)</title>
|
<title>Disable packet filter on bridged packets (method one)</title>
|
||||||
<para><filename>/etc/udev/rules.d/99-bridge.rules</filename>:
|
<para><filename>/etc/udev/rules.d/99-bridge.rules</filename>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/bridge"
|
<programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/bridge"
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
<programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
||||||
net.bridge.bridge-nf-call-iptables = 0
|
net.bridge.bridge-nf-call-iptables = 0
|
||||||
net.bridge.bridge-nf-call-arptables = 0
|
net.bridge.bridge-nf-call-arptables = 0
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Disable packet filter on bridged packets (method two)</title>
|
<title>Disable packet filter on bridged packets (method two)</title>
|
||||||
<para><filename>/etc/modules-load.d/bridge.conf</filename>:
|
<para><filename>/etc/modules-load.d/bridge.conf</filename>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>bridge</programlisting>
|
<programlisting>bridge</programlisting>
|
||||||
|
|
||||||
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
<para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
<programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
||||||
net.bridge.bridge-nf-call-iptables = 0
|
net.bridge.bridge-nf-call-iptables = 0
|
||||||
net.bridge.bridge-nf-call-arptables = 0
|
net.bridge.bridge-nf-call-arptables = 0
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+264
-292
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,328 +22,300 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-analyze"
|
<refentry id="systemd-analyze"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-analyze</title>
|
<title>systemd-analyze</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Harald</firstname>
|
<firstname>Harald</firstname>
|
||||||
<surname>Hoyer</surname>
|
<surname>Hoyer</surname>
|
||||||
<email>harald@redhat.com</email>
|
<email>harald@redhat.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-analyze</refentrytitle>
|
<refentrytitle>systemd-analyze</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-analyze</refname>
|
<refname>systemd-analyze</refname>
|
||||||
<refpurpose>Analyze system boot-up performance</refpurpose>
|
<refpurpose>Analyze system boot-up performance</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg>time</arg>
|
<arg>time</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">blame</arg>
|
<arg choice="plain">blame</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">critical-chain</arg>
|
<arg choice="plain">critical-chain</arg>
|
||||||
<arg choice="opt" rep="repeat"><replaceable>UNIT</replaceable></arg>
|
<arg choice="opt" rep="repeat"><replaceable>UNIT</replaceable></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">plot</arg>
|
<arg choice="plain">plot</arg>
|
||||||
<arg choice="opt">> file.svg</arg>
|
<arg choice="opt">> file.svg</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">dot</arg>
|
<arg choice="plain">dot</arg>
|
||||||
<arg choice="opt" rep="repeat"><replaceable>PATTERN</replaceable></arg>
|
<arg choice="opt" rep="repeat"><replaceable>PATTERN</replaceable></arg>
|
||||||
<arg choice="opt">> file.dot</arg>
|
<arg choice="opt">> file.dot</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">dump</arg>
|
<arg choice="plain">dump</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">set-log-level</arg>
|
<arg choice="plain">set-log-level</arg>
|
||||||
<arg choice="opt"><replaceable>LEVEL</replaceable></arg>
|
<arg choice="opt"><replaceable>LEVEL</replaceable></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-analyze</command>
|
<command>systemd-analyze</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="plain">verify</arg>
|
<arg choice="plain">verify</arg>
|
||||||
<arg choice="opt" rep="repeat"><replaceable>FILES</replaceable></arg>
|
<arg choice="opt" rep="repeat"><replaceable>FILES</replaceable></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-analyze</command> may be used
|
<para><command>systemd-analyze</command> may be used to determine
|
||||||
to determine system boot-up performance statistics and
|
system boot-up performance statistics and retrieve other state and
|
||||||
retrieve other state and tracing information from the
|
tracing information from the system and service manager, and to
|
||||||
system and service manager, and to verify the
|
verify the correctness of unit files.</para>
|
||||||
correctness of unit files.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze time</command>
|
<para><command>systemd-analyze time</command> prints the time
|
||||||
prints the time spent in the kernel before
|
spent in the kernel before userspace has been reached, the time
|
||||||
userspace has been reached, the time spent in the
|
spent in the initial RAM disk (initrd) before normal system
|
||||||
initial RAM disk (initrd) before normal system
|
userspace has been reached, and the time normal system userspace
|
||||||
userspace has been reached, and the time normal system
|
took to initialize. Note that these measurements simply measure
|
||||||
userspace took to initialize. Note that these
|
the time passed up to the point where all system services have
|
||||||
measurements simply measure the time passed up to the
|
been spawned, but not necessarily until they fully finished
|
||||||
point where all system services have been spawned, but
|
initialization or the disk is idle.</para>
|
||||||
not necessarily until they fully finished
|
|
||||||
initialization or the disk is idle.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze blame</command> prints
|
<para><command>systemd-analyze blame</command> prints a list of
|
||||||
a list of all running units, ordered by the time they
|
all running units, ordered by the time they took to initialize.
|
||||||
took to initialize. This information may be used to
|
This information may be used to optimize boot-up times. Note that
|
||||||
optimize boot-up times. Note that the output might be
|
the output might be misleading as the initialization of one
|
||||||
misleading as the initialization of one service might
|
service might be slow simply because it waits for the
|
||||||
be slow simply because it waits for the initialization
|
initialization of another service to complete.</para>
|
||||||
of another service to complete.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze critical-chain [<replaceable>UNIT...</replaceable>]</command>
|
<para><command>systemd-analyze critical-chain
|
||||||
prints a tree of the time-critical chain of units
|
[<replaceable>UNIT...</replaceable>]</command> prints a tree of
|
||||||
(for each of the specified <replaceable>UNIT</replaceable>s
|
the time-critical chain of units (for each of the specified
|
||||||
or for the default target otherwise).
|
<replaceable>UNIT</replaceable>s or for the default target
|
||||||
The time after the unit is active or started is printed
|
otherwise). The time after the unit is active or started is
|
||||||
after the "@" character. The time the unit takes to
|
printed after the "@" character. The time the unit takes to start
|
||||||
start is printed after the "+" character.
|
is printed after the "+" character. Note that the output might be
|
||||||
Note that the output might be misleading as the
|
misleading as the initialization of one service might depend on
|
||||||
initialization of one service might depend on socket
|
socket activation and because of the parallel execution of
|
||||||
activation and because of the parallel execution
|
units.</para>
|
||||||
of units.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze plot</command> prints
|
<para><command>systemd-analyze plot</command> prints an SVG
|
||||||
an SVG graphic detailing which system services have
|
graphic detailing which system services have been started at what
|
||||||
been started at what time, highlighting the time they
|
time, highlighting the time they spent on initialization.</para>
|
||||||
spent on initialization.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze dot</command> generates
|
<para><command>systemd-analyze dot</command> generates textual
|
||||||
textual dependency graph description in dot format for
|
dependency graph description in dot format for further processing
|
||||||
further processing with the GraphViz
|
with the GraphViz
|
||||||
<citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
tool. Use a command line like <command>systemd-analyze
|
tool. Use a command line like <command>systemd-analyze dot | dot
|
||||||
dot | dot -Tsvg > systemd.svg</command> to generate a
|
-Tsvg > systemd.svg</command> to generate a graphical dependency
|
||||||
graphical dependency tree. Unless
|
tree. Unless <option>--order</option> or
|
||||||
<option>--order</option> or <option>--require</option>
|
<option>--require</option> is passed, the generated graph will
|
||||||
is passed, the generated graph will show both ordering
|
show both ordering and requirement dependencies. Optional pattern
|
||||||
and requirement dependencies. Optional pattern
|
globbing style specifications (e.g. <filename>*.target</filename>)
|
||||||
globbing style specifications
|
may be given at the end. A unit dependency is included in the
|
||||||
(e.g. <filename>*.target</filename>) may be given at
|
graph if any of these patterns match either the origin or
|
||||||
the end. A unit dependency is included in the graph if
|
destination node.</para>
|
||||||
any of these patterns match either the origin or
|
|
||||||
destination node.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze dump</command> outputs
|
<para><command>systemd-analyze dump</command> outputs a (usually
|
||||||
a (usually very long) human-readable serialization of
|
very long) human-readable serialization of the complete server
|
||||||
the complete server state. Its format is subject to
|
state. Its format is subject to change without notice and should
|
||||||
change without notice and should not be parsed by
|
not be parsed by applications.</para>
|
||||||
applications.</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze set-log-level
|
<para><command>systemd-analyze set-log-level
|
||||||
<replaceable>LEVEL</replaceable></command> changes the
|
<replaceable>LEVEL</replaceable></command> changes the current log
|
||||||
current log level of the <command>systemd</command>
|
level of the <command>systemd</command> daemon to
|
||||||
daemon to <replaceable>LEVEL</replaceable> (accepts
|
<replaceable>LEVEL</replaceable> (accepts the same values as
|
||||||
the same values as <option>--log-level=</option>
|
<option>--log-level=</option> described in
|
||||||
described in
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).</para>
|
|
||||||
|
|
||||||
<para><command>systemd-analyze verify</command> will
|
<para><command>systemd-analyze verify</command> will load unit
|
||||||
load unit files and print warnings if any errors are
|
files and print warnings if any errors are detected. Files
|
||||||
detected. Files specified on the command line will be
|
specified on the command line will be loaded, but also any other
|
||||||
loaded, but also any other units referenced by
|
units referenced by them. This command works by prepending the
|
||||||
them. This command works by prepending the directories
|
directories for all command line arguments at the beginning of the
|
||||||
for all command line arguments at the beginning of the
|
unit load path, which means that all units files found in those
|
||||||
unit load path, which means that all units files found
|
directories will be used in preference to the unit files found in
|
||||||
in those directories will be used in preference to the
|
the standard locations, even if not listed explicitly.</para>
|
||||||
unit files found in the standard locations, even if
|
|
||||||
not listed explicitly.</para>
|
|
||||||
|
|
||||||
<para>If no command is passed, <command>systemd-analyze
|
<para>If no command is passed, <command>systemd-analyze
|
||||||
time</command> is implied.</para>
|
time</command> is implied.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--user</option></term>
|
<term><option>--user</option></term>
|
||||||
|
|
||||||
<listitem><para>Operates on the user
|
<listitem><para>Operates on the user systemd
|
||||||
systemd instance.</para></listitem>
|
instance.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--system</option></term>
|
<term><option>--system</option></term>
|
||||||
|
|
||||||
<listitem><para>Operates on the system
|
<listitem><para>Operates on the system systemd instance. This
|
||||||
systemd instance. This is the implied
|
is the implied default.</para></listitem>
|
||||||
default.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--order</option></term>
|
<term><option>--order</option></term>
|
||||||
<term><option>--require</option></term>
|
<term><option>--require</option></term>
|
||||||
|
|
||||||
<listitem><para>When used in
|
<listitem><para>When used in conjunction with the
|
||||||
conjunction with the
|
<command>dot</command> command (see above), selects which
|
||||||
<command>dot</command> command (see
|
dependencies are shown in the dependency graph. If
|
||||||
above), selects which dependencies are
|
<option>--order</option> is passed, only dependencies of type
|
||||||
shown in the dependency graph. If
|
<varname>After=</varname> or <varname>Before=</varname> are
|
||||||
<option>--order</option> is passed,
|
shown. If <option>--require</option> is passed, only
|
||||||
only dependencies of type
|
dependencies of type <varname>Requires=</varname>,
|
||||||
<varname>After=</varname> or
|
<varname>RequiresOverridable=</varname>,
|
||||||
<varname>Before=</varname> are
|
<varname>Requisite=</varname>,
|
||||||
shown. If <option>--require</option>
|
<varname>RequisiteOverridable=</varname>,
|
||||||
is passed, only dependencies of type
|
<varname>Wants=</varname> and <varname>Conflicts=</varname>
|
||||||
<varname>Requires=</varname>,
|
are shown. If neither is passed, this shows dependencies of
|
||||||
<varname>RequiresOverridable=</varname>,
|
all these types.</para></listitem>
|
||||||
<varname>Requisite=</varname>,
|
</varlistentry>
|
||||||
<varname>RequisiteOverridable=</varname>,
|
|
||||||
<varname>Wants=</varname> and
|
|
||||||
<varname>Conflicts=</varname> are
|
|
||||||
shown. If neither is passed, this shows
|
|
||||||
dependencies of all these
|
|
||||||
types.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--from-pattern=</option></term>
|
<term><option>--from-pattern=</option></term>
|
||||||
<term><option>--to-pattern=</option></term>
|
<term><option>--to-pattern=</option></term>
|
||||||
|
|
||||||
<listitem><para>When used in
|
<listitem><para>When used in conjunction with the
|
||||||
conjunction with the
|
<command>dot</command> command (see above), this selects which
|
||||||
<command>dot</command> command (see
|
relationships are shown in the dependency graph. They both
|
||||||
above), this selects which relationships
|
require
|
||||||
are shown in the dependency graph.
|
<citerefentry><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
They both require
|
patterns as arguments, which are matched against left-hand and
|
||||||
<citerefentry><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
right-hand, respectively, nodes of a relationship. Each of
|
||||||
patterns as arguments, which are
|
these can be used more than once, which means a unit name must
|
||||||
matched against left-hand and
|
match one of the given values.</para></listitem>
|
||||||
right-hand, respectively, nodes of a
|
</varlistentry>
|
||||||
relationship. Each of these can be
|
|
||||||
used more than once, which means a
|
|
||||||
unit name must match one of the given
|
|
||||||
values.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--fuzz=</option><replaceable>timespan</replaceable></term>
|
<term><option>--fuzz=</option><replaceable>timespan</replaceable></term>
|
||||||
|
|
||||||
<listitem><para>When used in conjunction
|
<listitem><para>When used in conjunction with the
|
||||||
with the <command>critical-chain</command>
|
<command>critical-chain</command> command (see above), also
|
||||||
command (see above), also show units, which
|
show units, which finished <replaceable>timespan</replaceable>
|
||||||
finished <replaceable>timespan</replaceable> earlier, than the
|
earlier, than the latest unit in the same level. The unit of
|
||||||
latest unit in the same level. The unit of
|
<replaceable>timespan</replaceable> is seconds unless
|
||||||
<replaceable>timespan</replaceable> is seconds
|
specified with a different unit, e.g.
|
||||||
unless specified with a different unit,
|
"50ms".</para></listitem>
|
||||||
e.g. "50ms".</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-man</option></term>
|
<term><option>--no-man</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not invoke man to verify the existence
|
<listitem><para>Do not invoke man to verify the existence of
|
||||||
of man pages listen in <varname>Documentation=</varname>.
|
man pages listen in <varname>Documentation=</varname>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<xi:include href="user-system-options.xml" xpointer="host" />
|
<xi:include href="user-system-options.xml" xpointer="host" />
|
||||||
<xi:include href="user-system-options.xml" xpointer="machine" />
|
<xi:include href="user-system-options.xml" xpointer="machine" />
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples for <command>dot</command></title>
|
<title>Examples for <command>dot</command></title>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Plots all dependencies of any unit whose
|
<title>Plots all dependencies of any unit whose name starts with
|
||||||
name starts with <literal>avahi-daemon</literal></title>
|
<literal>avahi-daemon</literal></title>
|
||||||
|
|
||||||
<programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg > avahi.svg
|
<programlisting>$ systemd-analyze dot 'avahi-daemon.*' | dot -Tsvg > avahi.svg
|
||||||
$ eog avahi.svg</programlisting>
|
$ eog avahi.svg</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Plots the dependencies between all known target units</title>
|
<title>Plots the dependencies between all known target units</title>
|
||||||
|
|
||||||
<programlisting>systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg > targets.svg
|
<programlisting>systemd-analyze dot --to-pattern='*.target' --from-pattern='*.target' | dot -Tsvg > targets.svg
|
||||||
$ eog targets.svg</programlisting>
|
$ eog targets.svg</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples for <command>verify</command></title>
|
<title>Examples for <command>verify</command></title>
|
||||||
|
|
||||||
<para>The following errors are currently detected:</para>
|
<para>The following errors are currently detected:</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>unknown sections and
|
<listitem><para>unknown sections and directives,
|
||||||
directives, </para></listitem>
|
</para></listitem>
|
||||||
|
|
||||||
<listitem><para>missing dependencies which are
|
<listitem><para>missing dependencies which are required to start
|
||||||
required to start the given unit,
|
the given unit, </para></listitem>
|
||||||
</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>man pages listed in
|
<listitem><para>man pages listed in
|
||||||
<varname>Documentation=</varname> which are
|
<varname>Documentation=</varname> which are not found in the
|
||||||
not found in the system,</para></listitem>
|
system,</para></listitem>
|
||||||
|
|
||||||
<listitem><para>commands listed in
|
<listitem><para>commands listed in <varname>ExecStart=</varname>
|
||||||
<varname>ExecStart=</varname> and similar
|
and similar which are not found in the system or not
|
||||||
which are not found in the system or not
|
executable.</para></listitem>
|
||||||
executable.</para></listitem>
|
</itemizedlist>
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Misspelt directives</title>
|
<title>Misspelt directives</title>
|
||||||
|
|
||||||
<programlisting>$ cat ./user.slice
|
<programlisting>$ cat ./user.slice
|
||||||
[Unit]
|
[Unit]
|
||||||
WhatIsThis=11
|
WhatIsThis=11
|
||||||
Documentation=man:nosuchfile(1)
|
Documentation=man:nosuchfile(1)
|
||||||
@@ -356,17 +328,17 @@ $ systemd-analyze verify ./user.slice
|
|||||||
[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
|
[./user.slice:9] Unknown lvalue 'WhatIsThis' in section 'Unit'
|
||||||
[./user.slice:13] Unknown section 'Service'. Ignoring.
|
[./user.slice:13] Unknown section 'Service'. Ignoring.
|
||||||
Error: org.freedesktop.systemd1.LoadFailed:
|
Error: org.freedesktop.systemd1.LoadFailed:
|
||||||
Unit different.service failed to load:
|
Unit different.service failed to load:
|
||||||
No such file or directory.
|
No such file or directory.
|
||||||
Failed to create user.slice/start: Invalid argument
|
Failed to create user.slice/start: Invalid argument
|
||||||
user.slice: man nosuchfile(1) command failed with code 16
|
user.slice: man nosuchfile(1) command failed with code 16
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Missing service units</title>
|
<title>Missing service units</title>
|
||||||
|
|
||||||
<programlisting>$ tail ./a.socket ./b.socket
|
<programlisting>$ tail ./a.socket ./b.socket
|
||||||
==> ./a.socket <==
|
==> ./a.socket <==
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=100
|
ListenStream=100
|
||||||
@@ -379,18 +351,18 @@ Accept=yes
|
|||||||
$ systemd-analyze verify ./a.socket ./b.socket
|
$ systemd-analyze verify ./a.socket ./b.socket
|
||||||
Service a.service not loaded, a.socket cannot be started.
|
Service a.service not loaded, a.socket cannot be started.
|
||||||
Service b@0.service not loaded, b.socket cannot be started.
|
Service b@0.service not loaded, b.socket cannot be started.
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<xi:include href="less-variables.xml" />
|
<xi:include href="less-variables.xml" />
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,76 +21,73 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-ask-password-console.service">
|
<refentry id="systemd-ask-password-console.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-ask-password-console.service</title>
|
<title>systemd-ask-password-console.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-ask-password-console.service</refentrytitle>
|
<refentrytitle>systemd-ask-password-console.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-ask-password-console.service</refname>
|
<refname>systemd-ask-password-console.service</refname>
|
||||||
<refname>systemd-ask-password-console.path</refname>
|
<refname>systemd-ask-password-console.path</refname>
|
||||||
<refname>systemd-ask-password-wall.service</refname>
|
<refname>systemd-ask-password-wall.service</refname>
|
||||||
<refname>systemd-ask-password-wall.path</refname>
|
<refname>systemd-ask-password-wall.path</refname>
|
||||||
<refpurpose>Query the user for system passwords on the
|
<refpurpose>Query the user for system passwords on the
|
||||||
console and via wall</refpurpose>
|
console and via wall</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-ask-password-console.service</filename></para>
|
<para><filename>systemd-ask-password-console.service</filename></para>
|
||||||
<para><filename>systemd-ask-password-console.path</filename></para>
|
<para><filename>systemd-ask-password-console.path</filename></para>
|
||||||
<para><filename>systemd-ask-password-wall.service</filename></para>
|
<para><filename>systemd-ask-password-wall.service</filename></para>
|
||||||
<para><filename>systemd-ask-password-wall.path</filename></para>
|
<para><filename>systemd-ask-password-wall.path</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-ask-password-console.service</filename>
|
<para><filename>systemd-ask-password-console.service</filename> is
|
||||||
is a system service that queries the user for system
|
a system service that queries the user for system passwords (such
|
||||||
passwords (such as hard disk encryption keys and SSL
|
as hard disk encryption keys and SSL certificate passphrases) on
|
||||||
certificate passphrases) on the console. It is
|
the console. It is intended to be used during boot to ensure
|
||||||
intended to be used during boot to ensure proper
|
proper handling of passwords necessary for boot.
|
||||||
handling of passwords necessary for
|
<filename>systemd-ask-password-wall.service</filename> is a system
|
||||||
boot. <filename>systemd-ask-password-wall.service</filename>
|
service that informs all logged in users for system passwords via
|
||||||
is a system service that informs all logged in users
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
||||||
for system passwords via
|
It is intended to be used after boot to ensure that users are
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>. It
|
properly notified.</para>
|
||||||
is intended to be used after boot to ensure that users
|
|
||||||
are properly notified.</para>
|
|
||||||
|
|
||||||
<para>See the <ulink
|
<para>See the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">
|
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">
|
||||||
developer documentation</ulink> for more information
|
developer documentation</ulink> for more information about the
|
||||||
about the system password logic.</para>
|
system password logic.</para>
|
||||||
|
|
||||||
<para>Note that these services invoke
|
<para>Note that these services invoke
|
||||||
<citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
with either the <command>--watch --console</command>
|
with either the <command>--watch --console</command> or
|
||||||
or <command>--watch --wall</command> command line
|
<command>--watch --wall</command> command line parameters.</para>
|
||||||
parameters.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+118
-134
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,169 +22,153 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-ask-password"
|
<refentry id="systemd-ask-password"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-ask-password</title>
|
<title>systemd-ask-password</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-ask-password</refentrytitle>
|
<refentrytitle>systemd-ask-password</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-ask-password</refname>
|
<refname>systemd-ask-password</refname>
|
||||||
<refpurpose>Query the user for a system password</refpurpose>
|
<refpurpose>Query the user for a system password</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-ask-password <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">MESSAGE</arg></command>
|
<command>systemd-ask-password <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">MESSAGE</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-ask-password</command> may be
|
<para><command>systemd-ask-password</command> may be used to query
|
||||||
used to query a system password or passphrase from the
|
a system password or passphrase from the user, using a question
|
||||||
user, using a question message specified on the
|
message specified on the command line. When run from a TTY it will
|
||||||
command line. When run from a TTY it will query a
|
query a password on the TTY and print it to standard output. When
|
||||||
password on the TTY and print it to standard output. When run
|
run with no TTY or with <option>--no-tty</option> it will query
|
||||||
with no TTY or with <option>--no-tty</option> it will
|
the password system-wide and allow active users to respond via
|
||||||
query the password system-wide and allow active users
|
several agents. The latter is only available to privileged
|
||||||
to respond via several agents. The latter is
|
processes.</para>
|
||||||
only available to privileged processes.</para>
|
|
||||||
|
|
||||||
<para>The purpose of this tool is to query system-wide
|
<para>The purpose of this tool is to query system-wide passwords
|
||||||
passwords -- that is passwords not attached to a
|
-- that is passwords not attached to a specific user account.
|
||||||
specific user account. Examples include: unlocking
|
Examples include: unlocking encrypted hard disks when they are
|
||||||
encrypted hard disks when they are plugged in or at
|
plugged in or at boot, entering an SSL certificate passphrase for
|
||||||
boot, entering an SSL certificate passphrase for web
|
web and VPN servers.</para>
|
||||||
and VPN servers.</para>
|
|
||||||
|
|
||||||
<para>Existing agents are: a boot-time password agent
|
<para>Existing agents are: a boot-time password agent asking the
|
||||||
asking the user for passwords using Plymouth; a
|
user for passwords using Plymouth; a boot-time password agent
|
||||||
boot-time password agent querying the user directly on
|
querying the user directly on the console; an agent requesting
|
||||||
the console; an agent requesting password input via a
|
password input via a
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
message; an agent suitable for running in a GNOME
|
message; an agent suitable for running in a GNOME session; a
|
||||||
session; a command line agent which can be started
|
command line agent which can be started temporarily to process
|
||||||
temporarily to process queued password requests; a TTY
|
queued password requests; a TTY agent that is temporarily spawned
|
||||||
agent that is temporarily spawned during
|
during
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
invocations.</para>
|
invocations.</para>
|
||||||
|
|
||||||
<para>Additional password agents may be implemented
|
<para>Additional password agents may be implemented according to
|
||||||
according to the <ulink
|
the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">systemd
|
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">systemd
|
||||||
Password Agent Specification</ulink>.</para>
|
Password Agent Specification</ulink>.</para>
|
||||||
|
|
||||||
<para>If a password is queried on a TTY, the user may
|
<para>If a password is queried on a TTY, the user may press TAB to
|
||||||
press TAB to hide the asterisks normally shown for
|
hide the asterisks normally shown for each character typed.
|
||||||
each character typed. Pressing Backspace as first key
|
Pressing Backspace as first key achieves the same effect.</para>
|
||||||
achieves the same effect.</para>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--icon=</option></term>
|
<term><option>--icon=</option></term>
|
||||||
|
|
||||||
<listitem><para>Specify an icon name
|
<listitem><para>Specify an icon name alongside the password
|
||||||
alongside the password query, which may
|
query, which may be used in all agents supporting graphical
|
||||||
be used in all agents supporting
|
display. The icon name should follow the <ulink
|
||||||
graphical display. The icon name
|
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
|
||||||
should follow the <ulink
|
Icon Naming Specification</ulink>.</para></listitem>
|
||||||
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">XDG
|
</varlistentry>
|
||||||
Icon Naming
|
|
||||||
Specification</ulink>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--timeout=</option></term>
|
<term><option>--timeout=</option></term>
|
||||||
|
|
||||||
<listitem><para>Specify the query
|
<listitem><para>Specify the query timeout in seconds. Defaults
|
||||||
timeout in seconds. Defaults to
|
to 90s. A timeout of 0 waits indefinitely. </para></listitem>
|
||||||
90s. A timeout of 0 waits indefinitely.
|
</varlistentry>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--echo</option></term>
|
<term><option>--echo</option></term>
|
||||||
|
|
||||||
<listitem><para>Echo the user input
|
<listitem><para>Echo the user input instead of masking it.
|
||||||
instead of masking it. This is useful
|
This is useful when using
|
||||||
when using
|
<filename>systemd-ask-password</filename> to query for
|
||||||
<filename>systemd-ask-password</filename>
|
usernames. </para></listitem>
|
||||||
to query for usernames.
|
</varlistentry>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--no-tty</option></term>
|
<term><option>--no-tty</option></term>
|
||||||
|
|
||||||
<listitem><para>Never ask for password
|
<listitem><para>Never ask for password on current TTY even if
|
||||||
on current TTY even if one is
|
one is available. Always use agent system.</para></listitem>
|
||||||
available. Always use agent
|
</varlistentry>
|
||||||
system.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--accept-cached</option></term>
|
<term><option>--accept-cached</option></term>
|
||||||
|
|
||||||
<listitem><para>If passed, accept
|
<listitem><para>If passed, accept cached passwords, i.e.
|
||||||
cached passwords, i.e. passwords
|
passwords previously typed in.</para></listitem>
|
||||||
previously typed in.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--multiple</option></term>
|
<term><option>--multiple</option></term>
|
||||||
|
|
||||||
<listitem><para>When used in
|
<listitem><para>When used in conjunction with
|
||||||
conjunction with
|
<option>--accept-cached</option> accept multiple passwords.
|
||||||
<option>--accept-cached</option>
|
This will output one password per line.</para></listitem>
|
||||||
accept multiple passwords. This will
|
</varlistentry>
|
||||||
output one password per
|
|
||||||
line.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,79 +21,74 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-backlight@.service" conditional='ENABLE_BACKLIGHT'>
|
<refentry id="systemd-backlight@.service" conditional='ENABLE_BACKLIGHT'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-backlight@.service</title>
|
<title>systemd-backlight@.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-backlight@.service</refentrytitle>
|
<refentrytitle>systemd-backlight@.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-backlight@.service</refname>
|
<refname>systemd-backlight@.service</refname>
|
||||||
<refname>systemd-backlight</refname>
|
<refname>systemd-backlight</refname>
|
||||||
<refpurpose>Load and save the display backlight brightness at boot and shutdown</refpurpose>
|
<refpurpose>Load and save the display backlight brightness at boot and shutdown</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-backlight@.service</filename></para>
|
<para><filename>systemd-backlight@.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-backlight</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-backlight</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-backlight@.service</filename>
|
<para><filename>systemd-backlight@.service</filename> is a service
|
||||||
is a service that restores the display backlight
|
that restores the display backlight brightness at early boot and
|
||||||
brightness at early boot and saves it at shutdown. On
|
saves it at shutdown. On disk, the backlight brightness is stored
|
||||||
disk, the backlight brightness is stored in
|
in <filename>/var/lib/systemd/backlight/</filename>. During
|
||||||
<filename>/var/lib/systemd/backlight/</filename>. During
|
loading, if udev property <option>ID_BACKLIGHT_CLAMP</option> is
|
||||||
loading, if udev property
|
not set to false value, the brightness is clamped to a value of at
|
||||||
<option>ID_BACKLIGHT_CLAMP</option> is not set to
|
least 1 or 5% of maximum brightness, whichever is greater. This
|
||||||
false value, the brightness is clamped to a value of
|
restriction will be removed when the kernel allows user space to
|
||||||
at least 1 or 5% of maximum brightness, whichever is
|
reliably set a brightness value which does not turn off the
|
||||||
greater. This restriction will be removed when the
|
display.</para>
|
||||||
kernel allows user space to reliably set a brightness
|
</refsect1>
|
||||||
value which does not turn off the display.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para><filename>systemd-backlight</filename> understands
|
<para><filename>systemd-backlight</filename> understands the
|
||||||
the following kernel command line parameter:</para>
|
following kernel command line parameter:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.restore_state=</varname></term>
|
<term><varname>systemd.restore_state=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument. Defaults to
|
||||||
argument. Defaults to
|
<literal>1</literal>. If <literal>0</literal>, does not
|
||||||
<literal>1</literal>. If
|
restore the backlight settings on boot. However, settings will
|
||||||
<literal>0</literal>, does not restore
|
still be stored on shutdown. </para></listitem>
|
||||||
the backlight settings on boot. However,
|
</varlistentry>
|
||||||
settings will still be stored on shutdown.
|
</variablelist>
|
||||||
</para></listitem>
|
</refsect1>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,56 +21,55 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-binfmt.service" conditional='ENABLE_BINFMT'>
|
<refentry id="systemd-binfmt.service" conditional='ENABLE_BINFMT'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-binfmt.service</title>
|
<title>systemd-binfmt.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-binfmt.service</refentrytitle>
|
<refentrytitle>systemd-binfmt.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-binfmt.service</refname>
|
<refname>systemd-binfmt.service</refname>
|
||||||
<refname>systemd-binfmt</refname>
|
<refname>systemd-binfmt</refname>
|
||||||
<refpurpose>Configure additional binary formats for executables at boot</refpurpose>
|
<refpurpose>Configure additional binary formats for executables at boot</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-binfmt.service</filename></para>
|
<para><filename>systemd-binfmt.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-binfmt</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-binfmt</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-binfmt.service</filename> is
|
<para><filename>systemd-binfmt.service</filename> is an early-boot
|
||||||
an early-boot service that registers additional binary
|
service that registers additional binary formats for executables
|
||||||
formats for executables in the kernel.</para>
|
in the kernel.</para>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for information about the configuration of this
|
for information about the configuration of this service.</para>
|
||||||
service.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>binfmt.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+253
-266
@@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -27,311 +27,298 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'
|
<refentry id="systemd-bootchart" conditional='ENABLE_BOOTCHART'
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-bootchart</title>
|
<title>systemd-bootchart</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Auke</firstname>
|
<firstname>Auke</firstname>
|
||||||
<surname>Kok</surname>
|
<surname>Kok</surname>
|
||||||
<email>auke-jan.h.kok@intel.com</email>
|
<email>auke-jan.h.kok@intel.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-bootchart</refentrytitle>
|
<refentrytitle>systemd-bootchart</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-bootchart</refname>
|
<refname>systemd-bootchart</refname>
|
||||||
<refpurpose>Boot performance graphing tool</refpurpose>
|
<refpurpose>Boot performance graphing tool</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
<para>
|
<para>
|
||||||
<command>systemd-bootchart</command> is a
|
<command>systemd-bootchart</command> is a tool, usually run at
|
||||||
tool, usually run at system startup, that
|
system startup, that collects the CPU load, disk load, memory
|
||||||
collects the CPU load, disk load, memory
|
usage, as well as per-process information from a running system.
|
||||||
usage, as well as per-process information from
|
Collected results are output as an SVG graph. Normally,
|
||||||
a running system. Collected results are output
|
systemd-bootchart is invoked by the kernel by passing
|
||||||
as an SVG graph. Normally, systemd-bootchart
|
<option>init=<filename>/usr/lib/systemd/systemd-bootchart</filename></option>
|
||||||
is invoked by the kernel by passing
|
on the kernel command line. systemd-bootchart will then fork the
|
||||||
<option>init=<filename>/usr/lib/systemd/systemd-bootchart</filename></option>
|
real init off to resume normal system startup, while monitoring
|
||||||
on the kernel command line. systemd-bootchart will then
|
and logging startup information in the background.
|
||||||
fork the real init off to resume normal system
|
</para>
|
||||||
startup, while monitoring and logging startup
|
<para>
|
||||||
information in the background.
|
After collecting a certain amount of data (usually 15-30
|
||||||
</para>
|
seconds, default 20 s) the logging stops and a graph is
|
||||||
<para>
|
generated from the logged information. This graph contains vital
|
||||||
After collecting a certain amount of data
|
clues as to which resources are being used, in which order, and
|
||||||
(usually 15-30 seconds, default 20 s) the
|
where possible problems exist in the startup sequence of the
|
||||||
logging stops and a graph is generated from
|
system. It is essentially a more detailed version of the
|
||||||
the logged information. This graph contains
|
<command>systemd-analyze plot</command> function.
|
||||||
vital clues as to which resources are being used,
|
</para>
|
||||||
in which order, and where possible problems
|
<para>
|
||||||
exist in the startup sequence of the system.
|
Of course, bootchart can also be used at any moment in time to
|
||||||
It is essentially a more detailed version of
|
collect and graph some data for an amount of time. It is
|
||||||
the <command>systemd-analyze plot</command>
|
recommended to use the <option>--rel</option> switch in this
|
||||||
function.
|
case.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Of course, bootchart can also be used at any
|
Bootchart does not require root privileges, and will happily run
|
||||||
moment in time to collect and graph some data
|
as a normal user.
|
||||||
for an amount of time. It is
|
</para>
|
||||||
recommended to use the <option>--rel</option>
|
<para>
|
||||||
switch in this case.
|
Bootchart graphs are by default written time-stamped in
|
||||||
</para>
|
<filename>/run/log</filename> and saved to the journal with
|
||||||
<para>
|
<varname>MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518</varname>.
|
||||||
Bootchart does not require root privileges,
|
Journal field <varname>BOOTCHART=</varname> contains the
|
||||||
and will happily run as a normal user.
|
bootchart in SVG format.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
Bootchart graphs are by default written
|
|
||||||
time-stamped in <filename>/run/log</filename>
|
|
||||||
and saved to the journal with
|
|
||||||
<varname>MESSAGE_ID=9f26aa562cf440c2b16c773d0479b518</varname>.
|
|
||||||
Journal field <varname>BOOTCHART=</varname> contains
|
|
||||||
the bootchart in SVG format.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Invocation</title>
|
<title>Invocation</title>
|
||||||
|
|
||||||
<para><command>systemd-bootchart</command> can be invoked in several different ways:</para>
|
<para><command>systemd-bootchart</command> can be invoked in several different ways:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>Kernel invocation</emphasis></term>
|
<term><emphasis>Kernel invocation</emphasis></term>
|
||||||
<listitem><para>The kernel can invoke
|
<listitem><para>The kernel can invoke
|
||||||
<command>systemd-bootchart</command>
|
<command>systemd-bootchart</command> instead of the init
|
||||||
instead of the init process. In turn,
|
process. In turn, <command>systemd-bootchart</command> will
|
||||||
<command>systemd-bootchart</command>
|
invoke <command>/usr/lib/systemd/systemd</command>.
|
||||||
will invoke <command>/usr/lib/systemd/systemd</command>.
|
</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>Started as a standalone program</emphasis></term>
|
<term><emphasis>Started as a standalone program</emphasis></term>
|
||||||
<listitem><para>One can execute
|
<listitem><para>One can execute
|
||||||
<command>systemd-bootchart</command>
|
<command>systemd-bootchart</command> as normal application
|
||||||
as normal application from the
|
from the command line. In this mode it is highly recommended
|
||||||
command line. In this mode it is highly
|
to pass the <option>-r</option> flag in order to not graph the
|
||||||
recommended to pass the
|
time elapsed since boot and before systemd-bootchart was
|
||||||
<option>-r</option> flag in order to
|
started, as it may result in extremely large graphs. The time
|
||||||
not graph the time elapsed since boot
|
elapsed since boot might also include any time that the system
|
||||||
and before systemd-bootchart was
|
was suspended.</para></listitem>
|
||||||
started, as it may result in extremely
|
</varlistentry>
|
||||||
large graphs. The time elapsed since boot
|
</variablelist>
|
||||||
might also include any time that the system
|
</refsect1>
|
||||||
was suspended.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>These options can also be set in the
|
<para>These options can also be set in the
|
||||||
<filename>/etc/systemd/bootchart.conf</filename>
|
<filename>/etc/systemd/bootchart.conf</filename> file. See
|
||||||
file. See
|
<citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||||
<citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-n</option></term>
|
<term><option>-n</option></term>
|
||||||
<term><option>--sample <replaceable>N</replaceable></option></term>
|
<term><option>--sample <replaceable>N</replaceable></option></term>
|
||||||
<listitem><para>Specify the number of
|
<listitem><para>Specify the number of samples,
|
||||||
samples, <replaceable>N</replaceable>,
|
<replaceable>N</replaceable>, to record. Samples will be
|
||||||
to record. Samples will be recorded at
|
recorded at intervals defined with <option>--freq</option>.
|
||||||
intervals defined with <option>--freq</option>.
|
</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-f</option></term>
|
<term><option>-f</option></term>
|
||||||
<term><option>--freq <replaceable>f</replaceable></option></term>
|
<term><option>--freq <replaceable>f</replaceable></option></term>
|
||||||
<listitem><para>Specify the sample log
|
<listitem><para>Specify the sample log frequency, a positive
|
||||||
frequency, a positive real <replaceable>f</replaceable>, in Hz.
|
real <replaceable>f</replaceable>, in Hz. Most systems can
|
||||||
Most systems can cope with values up to 25-50 without
|
cope with values up to 25-50 without creating too much
|
||||||
creating too much overhead.</para></listitem>
|
overhead.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-r</option></term>
|
<term><option>-r</option></term>
|
||||||
<term><option>--rel</option></term>
|
<term><option>--rel</option></term>
|
||||||
<listitem><para>Use relative times instead of absolute
|
<listitem><para>Use relative times instead of absolute times.
|
||||||
times. This is useful for using bootchart at post-boot
|
This is useful for using bootchart at post-boot time to
|
||||||
time to profile an already booted system. Without this
|
profile an already booted system. Without this option the
|
||||||
option the graph would become extremely large. If set, the
|
graph would become extremely large. If set, the horizontal
|
||||||
horizontal axis starts at the first recorded sample
|
axis starts at the first recorded sample instead of time
|
||||||
instead of time 0.0.</para></listitem>
|
0.0.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-F</option></term>
|
<term><option>-F</option></term>
|
||||||
<term><option>--no-filter</option></term>
|
<term><option>--no-filter</option></term>
|
||||||
<listitem><para>Disable filtering of tasks that
|
<listitem><para>Disable filtering of tasks that did not
|
||||||
did not contribute significantly to the boot. Processes
|
contribute significantly to the boot. Processes that are too
|
||||||
that are too short-lived (only seen in one sample) or
|
short-lived (only seen in one sample) or that do not consume
|
||||||
that do not consume any significant CPU time (less than
|
any significant CPU time (less than 0.001 s) will not be
|
||||||
0.001 s) will not be displayed in the output graph.
|
displayed in the output graph. </para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-C</option></term>
|
<term><option>-C</option></term>
|
||||||
<term><option>--cmdline</option></term>
|
<term><option>--cmdline</option></term>
|
||||||
<listitem><para>Display the full command line with arguments of processes,
|
<listitem><para>Display the full command line with arguments
|
||||||
instead of only the process name.
|
of processes, instead of only the process name.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-g</option></term>
|
<term><option>-g</option></term>
|
||||||
<term><option>--control-group</option></term>
|
<term><option>--control-group</option></term>
|
||||||
<listitem><para>Display process control group
|
<listitem><para>Display process control group
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-o</option></term>
|
<term><option>-o</option></term>
|
||||||
<term><option>--output <replaceable>path</replaceable></option></term>
|
<term><option>--output <replaceable>path</replaceable></option></term>
|
||||||
<listitem><para>Specify the output directory for the
|
<listitem><para>Specify the output directory for the graphs.
|
||||||
graphs. By default, bootchart writes the graphs to
|
By default, bootchart writes the graphs to
|
||||||
<filename>/run/log</filename>.</para></listitem>
|
<filename>/run/log</filename>.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-i</option></term>
|
<term><option>-i</option></term>
|
||||||
<term><option>--init <replaceable>path</replaceable></option></term>
|
<term><option>--init <replaceable>path</replaceable></option></term>
|
||||||
<listitem><para>Use this init binary. Defaults to
|
<listitem><para>Use this init binary. Defaults to
|
||||||
<command>/usr/lib/systemd/systemd</command>.
|
<command>/usr/lib/systemd/systemd</command>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
<term><option>--pss</option></term>
|
<term><option>--pss</option></term>
|
||||||
<listitem><para>Enable logging and graphing
|
<listitem><para>Enable logging and graphing of processes' PSS
|
||||||
of processes' PSS (Proportional Set Size)
|
(Proportional Set Size) memory consumption. See
|
||||||
memory consumption. See <filename>filesystems/proc.txt</filename>
|
<filename>filesystems/proc.txt</filename> in the kernel
|
||||||
in the kernel documentation for an
|
documentation for an explanation of this field.
|
||||||
explanation of this field.
|
</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-e</option></term>
|
<term><option>-e</option></term>
|
||||||
<term><option>--entropy</option></term>
|
<term><option>--entropy</option></term>
|
||||||
<listitem><para>Enable logging and graphing
|
<listitem><para>Enable logging and graphing of the kernel
|
||||||
of the kernel random entropy pool size.</para></listitem>
|
random entropy pool size.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-x</option></term>
|
<term><option>-x</option></term>
|
||||||
<term><option>--scale-x <replaceable>N</replaceable></option></term>
|
<term><option>--scale-x <replaceable>N</replaceable></option></term>
|
||||||
<listitem><para>Horizontal scaling factor for all variable
|
<listitem><para>Horizontal scaling factor for all variable
|
||||||
graph components.</para></listitem>
|
graph components.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-y</option></term>
|
<term><option>-y</option></term>
|
||||||
<term><option>--scale-y <replaceable>N</replaceable></option></term>
|
<term><option>--scale-y <replaceable>N</replaceable></option></term>
|
||||||
<listitem><para>Vertical scaling factor for all variable
|
<listitem><para>Vertical scaling factor for all variable graph
|
||||||
graph components.</para></listitem>
|
components.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Output</title>
|
<title>Output</title>
|
||||||
|
|
||||||
<para><command>systemd-bootchart</command> generates SVG graphs. In order to render those
|
<para><command>systemd-bootchart</command> generates SVG graphs.
|
||||||
on a graphical display any SVG capable viewer can be used. It should be
|
In order to render those on a graphical display any SVG capable
|
||||||
noted that the SVG render engines in most browsers (including Chrome
|
viewer can be used. It should be noted that the SVG render engines
|
||||||
and Firefox) are many times faster than dedicated graphical applications
|
in most browsers (including Chrome and Firefox) are many times
|
||||||
like Gimp and Inkscape. Just point your browser at <ulink url="file:///run/log/" />!
|
faster than dedicated graphical applications like Gimp and
|
||||||
</para>
|
Inkscape. Just point your browser at
|
||||||
</refsect1>
|
<ulink url="file:///run/log/" />!
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>History</title>
|
<title>History</title>
|
||||||
|
|
||||||
<para>This version of bootchart was implemented from
|
<para>This version of bootchart was implemented from scratch, but
|
||||||
scratch, but is inspired by former bootchart
|
is inspired by former bootchart incantations:</para>
|
||||||
incantations:</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>Original bash</emphasis></term>
|
<term><emphasis>Original bash</emphasis></term>
|
||||||
<listitem><para>The original bash/shell code implemented
|
<listitem><para>The original bash/shell code implemented
|
||||||
bootchart. This version created a compressed tarball for
|
bootchart. This version created a compressed tarball for
|
||||||
processing with external applications. This version did
|
processing with external applications. This version did not
|
||||||
not graph anything, only generated data.</para></listitem>
|
graph anything, only generated data.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>Ubuntu C Implementation</emphasis></term>
|
<term><emphasis>Ubuntu C Implementation</emphasis></term>
|
||||||
<listitem><para>This version replaced the shell version with
|
<listitem><para>This version replaced the shell version with a
|
||||||
a fast and efficient data logger, but also did not graph
|
fast and efficient data logger, but also did not graph the
|
||||||
the data.</para></listitem>
|
data.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>Java bootchart</emphasis></term>
|
<term><emphasis>Java bootchart</emphasis></term>
|
||||||
<listitem><para>This was the original graphing application
|
<listitem><para>This was the original graphing application for
|
||||||
for charting the data, written in java.</para></listitem>
|
charting the data, written in java.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis>pybootchartgui.py</emphasis></term>
|
<term><emphasis>pybootchartgui.py</emphasis></term>
|
||||||
<listitem><para>pybootchart created a graph from the data
|
<listitem><para>pybootchart created a graph from the data
|
||||||
collected by either the bash or C version.</para></listitem>
|
collected by either the bash or C version.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The version of bootchart you are using now combines both the data
|
<para>The version of bootchart you are using now combines both the
|
||||||
collection and the charting into a single application, making it more
|
data collection and the charting into a single application, making
|
||||||
efficient and simpler. There are no longer any timing issues with the data
|
it more efficient and simpler. There are no longer any timing
|
||||||
collector and the grapher, as the graphing cannot be run until the data
|
issues with the data collector and the grapher, as the graphing
|
||||||
has been collected. Also, the data kept in memory is reduced to the absolute
|
cannot be run until the data has been collected. Also, the data
|
||||||
minimum needed.</para>
|
kept in memory is reduced to the absolute minimum needed.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
|
||||||
<citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<para>
|
||||||
<title>Bugs</title>
|
<citerefentry project='man-pages'><refentrytitle>bootchart.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<para>systemd-bootchart does not get the model information for the hard drive
|
</para>
|
||||||
unless the root device is specified with <code>root=/dev/sdxY</code>. Using
|
</refsect1>
|
||||||
UUIDs or PARTUUIDs will boot fine, but the hard drive model will not be
|
|
||||||
added to the chart.</para>
|
<refsect1>
|
||||||
<para>For bugs, please contact the author and current maintainer:</para>
|
<title>Bugs</title>
|
||||||
<simplelist>
|
|
||||||
<member>Auke Kok <email>auke-jan.h.kok@intel.com</email></member>
|
<para>systemd-bootchart does not get the model information for the
|
||||||
</simplelist>
|
hard drive unless the root device is specified with
|
||||||
</refsect1>
|
<code>root=/dev/sdxY</code>. Using UUIDs or PARTUUIDs will boot
|
||||||
|
fine, but the hard drive model will not be added to the
|
||||||
|
chart.</para>
|
||||||
|
<para>For bugs, please contact the author and current maintainer:</para>
|
||||||
|
<simplelist>
|
||||||
|
<member>Auke Kok <email>auke-jan.h.kok@intel.com</email></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+122
-138
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,173 +22,157 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-cat"
|
<refentry id="systemd-cat"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-cat</title>
|
<title>systemd-cat</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-cat</refentrytitle>
|
<refentrytitle>systemd-cat</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-cat</refname>
|
<refname>systemd-cat</refname>
|
||||||
<refpurpose>Connect a pipeline or program's output with the journal</refpurpose>
|
<refpurpose>Connect a pipeline or program's output with the journal</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-cat <arg choice="opt" rep="repeat">OPTIONS</arg> <arg>COMMAND</arg> <arg choice="opt" rep="repeat">ARGUMENTS</arg></command>
|
<command>systemd-cat <arg choice="opt" rep="repeat">OPTIONS</arg> <arg>COMMAND</arg> <arg choice="opt" rep="repeat">ARGUMENTS</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-cat <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
<command>systemd-cat <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-cat</command> may be used to
|
<para><command>systemd-cat</command> may be used to connect the
|
||||||
connect the standard input and output of a process to the
|
standard input and output of a process to the journal, or as a
|
||||||
journal, or as a filter tool in a shell pipeline to
|
filter tool in a shell pipeline to pass the output the previous
|
||||||
pass the output the previous pipeline element
|
pipeline element generates to the journal.</para>
|
||||||
generates to the journal.</para>
|
|
||||||
|
|
||||||
<para>If no parameter is passed,
|
<para>If no parameter is passed, <command>systemd-cat</command>
|
||||||
<command>systemd-cat</command> will write
|
will write everything it reads from standard input (stdin) to the
|
||||||
everything it reads from standard input (stdin) to the journal.</para>
|
journal.</para>
|
||||||
|
|
||||||
<para>If parameters are passed, they are executed as
|
<para>If parameters are passed, they are executed as command line
|
||||||
command line with standard output (stdout) and standard
|
with standard output (stdout) and standard error output (stderr)
|
||||||
error output (stderr) connected to the journal, so
|
connected to the journal, so that all it writes is stored in the
|
||||||
that all it writes is stored in the journal.</para>
|
journal.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-t</option></term>
|
<term><option>-t</option></term>
|
||||||
<term><option>--identifier=</option></term>
|
<term><option>--identifier=</option></term>
|
||||||
|
|
||||||
<listitem><para>Specify a short string
|
<listitem><para>Specify a short string that is used to
|
||||||
that is used to identify the logging
|
identify the logging tool. If not specified, no identification
|
||||||
tool. If not specified, no identification
|
string is written to the journal.</para></listitem>
|
||||||
string is written to the journal.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
<term><option>--priority=</option></term>
|
<term><option>--priority=</option></term>
|
||||||
|
|
||||||
<listitem><para>Specify the default
|
<listitem><para>Specify the default priority level for the
|
||||||
priority level for the logged
|
logged messages. Pass one of
|
||||||
messages. Pass one of
|
<literal>emerg</literal>,
|
||||||
<literal>emerg</literal>,
|
<literal>alert</literal>,
|
||||||
<literal>alert</literal>,
|
<literal>crit</literal>,
|
||||||
<literal>crit</literal>,
|
<literal>err</literal>,
|
||||||
<literal>err</literal>,
|
<literal>warning</literal>,
|
||||||
<literal>warning</literal>,
|
<literal>notice</literal>,
|
||||||
<literal>notice</literal>,
|
<literal>info</literal>,
|
||||||
<literal>info</literal>,
|
<literal>debug</literal>, or a
|
||||||
<literal>debug</literal>, or a
|
value between 0 and 7 (corresponding to the same named
|
||||||
value between 0 and 7 (corresponding
|
levels). These priority values are the same as defined by
|
||||||
to the same named levels). These
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
|
||||||
priority values are the same as
|
Defaults to <literal>info</literal>. Note that this simply
|
||||||
defined by
|
controls the default, individual lines may be logged with
|
||||||
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Defaults
|
different levels if they are prefixed accordingly. For details
|
||||||
to <literal>info</literal>. Note that
|
see <option>--level-prefix=</option> below.</para></listitem>
|
||||||
this simply controls the default,
|
</varlistentry>
|
||||||
individual lines may be logged with
|
|
||||||
different levels if they are prefixed
|
|
||||||
accordingly. For details see
|
|
||||||
<option>--level-prefix=</option>
|
|
||||||
below.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--level-prefix=</option></term>
|
<term><option>--level-prefix=</option></term>
|
||||||
|
|
||||||
<listitem><para>Controls whether lines
|
<listitem><para>Controls whether lines read are parsed for
|
||||||
read are parsed for syslog priority
|
syslog priority level prefixes. If enabled (the default), a
|
||||||
level prefixes. If enabled (the
|
line prefixed with a priority prefix such as
|
||||||
default), a line prefixed with a
|
<literal><5></literal> is logged at priority 5
|
||||||
priority prefix such as
|
(<literal>notice</literal>), and similar for the other
|
||||||
<literal><5></literal> is logged
|
priority levels. Takes a boolean argument.</para></listitem>
|
||||||
at priority 5
|
</varlistentry>
|
||||||
(<literal>notice</literal>), and
|
|
||||||
similar for the other priority
|
|
||||||
levels. Takes a boolean
|
|
||||||
argument.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Invoke a program</title>
|
<title>Invoke a program</title>
|
||||||
|
|
||||||
<para>This calls <filename noindex='true'>/bin/ls</filename>
|
<para>This calls <filename noindex='true'>/bin/ls</filename>
|
||||||
with standard output and error connected to the
|
with standard output and error connected to the journal:</para>
|
||||||
journal:</para>
|
|
||||||
|
|
||||||
<programlisting># systemd-cat ls</programlisting>
|
<programlisting># systemd-cat ls</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<example>
|
<example>
|
||||||
<title>Usage in a shell pipeline</title>
|
<title>Usage in a shell pipeline</title>
|
||||||
|
|
||||||
<para>This builds a shell pipeline also
|
<para>This builds a shell pipeline also invoking
|
||||||
invoking <filename>/bin/ls</filename> and
|
<filename>/bin/ls</filename> and writes the output it generates
|
||||||
writes the output it generates to the
|
to the journal:</para>
|
||||||
journal:</para>
|
|
||||||
|
|
||||||
<programlisting># ls | systemd-cat</programlisting>
|
<programlisting># ls | systemd-cat</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<para>Even though the two examples have very similar
|
<para>Even though the two examples have very similar effects the
|
||||||
effects the first is preferable since only one process
|
first is preferable since only one process is running at a time,
|
||||||
is running at a time, and both stdout and stderr are
|
and both stdout and stderr are captured while in the second
|
||||||
captured while in the second example, only stdout is
|
example, only stdout is captured.</para>
|
||||||
captured.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>logger</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>logger</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+91
-97
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,124 +22,118 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-cgls"
|
<refentry id="systemd-cgls"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-cgls</title>
|
<title>systemd-cgls</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-cgls</refentrytitle>
|
<refentrytitle>systemd-cgls</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-cgls</refname>
|
<refname>systemd-cgls</refname>
|
||||||
<refpurpose>Recursively show control group contents</refpurpose>
|
<refpurpose>Recursively show control group contents</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-cgls</command>
|
<command>systemd-cgls</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="opt" rep="repeat">CGROUP</arg>
|
<arg choice="opt" rep="repeat">CGROUP</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-cgls</command> recursively
|
<para><command>systemd-cgls</command> recursively shows the
|
||||||
shows the contents of the selected Linux control group
|
contents of the selected Linux control group hierarchy in a tree.
|
||||||
hierarchy in a tree. If arguments are specified, shows
|
If arguments are specified, shows all member processes of the
|
||||||
all member processes of the specified control groups
|
specified control groups plus all their subgroups and their
|
||||||
plus all their subgroups and their members. The
|
members. The control groups may either be specified by their full
|
||||||
control groups may either be specified by their full
|
file paths or are assumed in the systemd control group hierarchy.
|
||||||
file paths or are assumed in the systemd control group
|
If no argument is specified and the current working directory is
|
||||||
hierarchy. If no argument is specified and the current
|
beneath the control group mount point
|
||||||
working directory is beneath the control group mount
|
<filename>/sys/fs/cgroup</filename>, shows the contents of the
|
||||||
point <filename>/sys/fs/cgroup</filename>, shows the contents
|
control group the working directory refers to. Otherwise, the full
|
||||||
of the control group the working directory refers
|
systemd control group hierarchy is shown.</para>
|
||||||
to. Otherwise, the full systemd control group hierarchy
|
|
||||||
is shown.</para>
|
|
||||||
|
|
||||||
<para>By default, empty control groups are not
|
<para>By default, empty control groups are not shown.</para>
|
||||||
shown.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--all</option></term>
|
<term><option>--all</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not hide empty
|
<listitem><para>Do not hide empty control groups in the
|
||||||
control groups in the
|
output.</para></listitem>
|
||||||
output.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-l</option></term>
|
<term><option>-l</option></term>
|
||||||
<term><option>--full</option></term>
|
<term><option>--full</option></term>
|
||||||
|
|
||||||
<listitem><para>Do not ellipsize
|
<listitem><para>Do not ellipsize process tree members.</para>
|
||||||
process tree members.</para>
|
</listitem>
|
||||||
</listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-k</option></term>
|
<term><option>-k</option></term>
|
||||||
|
|
||||||
<listitem><para>Include kernel
|
<listitem><para>Include kernel threads in output.
|
||||||
threads in output.</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-M <replaceable>MACHINE</replaceable></option></term>
|
<term><option>-M <replaceable>MACHINE</replaceable></option></term>
|
||||||
<term><option>--machine=<replaceable>MACHINE</replaceable></option></term>
|
<term><option>--machine=<replaceable>MACHINE</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Limit control groups shown to
|
<listitem><para>Limit control groups shown to the part
|
||||||
the part corresponding to the
|
corresponding to the container
|
||||||
container <replaceable>MACHINE</replaceable>.
|
<replaceable>MACHINE</replaceable>.</para></listitem>
|
||||||
</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cgtop</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+177
-194
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,249 +22,232 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-cgtop"
|
<refentry id="systemd-cgtop"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-cgtop</title>
|
<title>systemd-cgtop</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-cgtop</refentrytitle>
|
<refentrytitle>systemd-cgtop</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-cgtop</refname>
|
<refname>systemd-cgtop</refname>
|
||||||
<refpurpose>Show top control groups by their resource usage</refpurpose>
|
<refpurpose>Show top control groups by their resource usage</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-cgtop</command>
|
<command>systemd-cgtop</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-cgtop</command> shows the top
|
<para><command>systemd-cgtop</command> shows the top control
|
||||||
control groups of the local Linux control group
|
groups of the local Linux control group hierarchy, ordered by
|
||||||
hierarchy, ordered by their CPU, memory, or disk I/O load. The
|
their CPU, memory, or disk I/O load. The display is refreshed in
|
||||||
display is refreshed in regular intervals (by default
|
regular intervals (by default every 1s), similar in style to
|
||||||
every 1s), similar in style to
|
<citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
||||||
<citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
If <command>systemd-cgtop</command> is not connected to a tty,
|
||||||
If <command>systemd-cgtop</command> is not connected
|
only one iteration is performed and no columns headers are
|
||||||
to a tty, only one iteration is performed and no
|
printed. This mode is suitable for scripting.</para>
|
||||||
columns headers are printed. This mode is suitable for
|
|
||||||
scripting.</para>
|
|
||||||
|
|
||||||
<para>Resource usage is only accounted for control
|
<para>Resource usage is only accounted for control groups in the
|
||||||
groups in the relevant hierarchy, i.e. CPU usage is
|
relevant hierarchy, i.e. CPU usage is only accounted for control
|
||||||
only accounted for control groups in the
|
groups in the <literal>cpuacct</literal> hierarchy, memory usage
|
||||||
<literal>cpuacct</literal> hierarchy, memory usage
|
only for those in <literal>memory</literal> and disk I/O usage for
|
||||||
only for those in <literal>memory</literal> and disk
|
those in <literal>blkio</literal>. If resource monitoring for
|
||||||
I/O usage for those in <literal>blkio</literal>. If
|
these resources is required, it is recommended to add the
|
||||||
resource monitoring for these resources is required,
|
<varname>CPUAccounting=1</varname>,
|
||||||
it is recommended to add the
|
<varname>MemoryAccounting=1</varname> and
|
||||||
<varname>CPUAccounting=1</varname>,
|
<varname>BlockIOAccounting=1</varname> settings in the unit files
|
||||||
<varname>MemoryAccounting=1</varname> and
|
in question. See
|
||||||
<varname>BlockIOAccounting=1</varname> settings in the
|
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
unit files in question. See
|
for details.</para>
|
||||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
for details.</para>
|
|
||||||
|
|
||||||
<para>To emphasize this: unless
|
<para>To emphasize this: unless
|
||||||
<literal>CPUAccounting=1</literal>,
|
<literal>CPUAccounting=1</literal>,
|
||||||
<literal>MemoryAccounting=1</literal> and
|
<literal>MemoryAccounting=1</literal> and
|
||||||
<literal>BlockIOAccounting=1</literal> are enabled for
|
<literal>BlockIOAccounting=1</literal> are enabled for the
|
||||||
the services in question, no resource accounting will
|
services in question, no resource accounting will be available for
|
||||||
be available for system services and the data shown by
|
system services and the data shown by
|
||||||
<command>systemd-cgtop</command> will be
|
<command>systemd-cgtop</command> will be incomplete.</para>
|
||||||
incomplete.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
|
|
||||||
<listitem><para>Order by control group
|
<listitem><para>Order by control group
|
||||||
path name.</para></listitem>
|
path name.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-t</option></term>
|
<term><option>-t</option></term>
|
||||||
|
|
||||||
<listitem><para>Order by number of
|
<listitem><para>Order by number of tasks in control group
|
||||||
tasks in control
|
(i.e. threads and processes).</para></listitem>
|
||||||
group (i.e. threads and processes).</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-c</option></term>
|
<term><option>-c</option></term>
|
||||||
|
|
||||||
<listitem><para>Order by CPU load.</para></listitem>
|
<listitem><para>Order by CPU load.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-m</option></term>
|
<term><option>-m</option></term>
|
||||||
|
|
||||||
<listitem><para>Order by memory usage.</para></listitem>
|
<listitem><para>Order by memory usage.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-i</option></term>
|
<term><option>-i</option></term>
|
||||||
|
|
||||||
<listitem><para>Order by disk I/O load.</para></listitem>
|
<listitem><para>Order by disk I/O load.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-b</option></term>
|
<term><option>-b</option></term>
|
||||||
<term><option>--batch</option></term>
|
<term><option>--batch</option></term>
|
||||||
|
|
||||||
<listitem><para>Run in "batch" mode:
|
<listitem><para>Run in "batch" mode: do not accept input and
|
||||||
do not accept input and run until the
|
run until the iteration limit set with
|
||||||
iteration limit set with
|
<option>--iterations</option> is exhausted or until killed.
|
||||||
<option>--iterations</option> is
|
This mode could be useful for sending output from
|
||||||
exhausted or until killed. This mode
|
<command>systemd-cgtop</command> to other programs or to a
|
||||||
could be useful for sending output
|
file.</para></listitem>
|
||||||
from <command>systemd-cgtop</command>
|
</varlistentry>
|
||||||
to other programs or to a
|
|
||||||
file.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-n</option></term>
|
<term><option>-n</option></term>
|
||||||
<term><option>--iterations=</option></term>
|
<term><option>--iterations=</option></term>
|
||||||
|
|
||||||
<listitem><para>Perform only this many
|
<listitem><para>Perform only this many iterations.
|
||||||
iterations.</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-d</option></term>
|
<term><option>-d</option></term>
|
||||||
<term><option>--delay=</option></term>
|
<term><option>--delay=</option></term>
|
||||||
|
|
||||||
<listitem><para>Specify refresh delay
|
<listitem><para>Specify refresh delay in seconds (or if one of
|
||||||
in seconds (or if one of
|
<literal>ms</literal>,
|
||||||
<literal>ms</literal>,
|
<literal>us</literal>,
|
||||||
<literal>us</literal>,
|
<literal>min</literal> is specified as unit in this time
|
||||||
<literal>min</literal> is specified as
|
unit).</para></listitem>
|
||||||
unit in this time
|
</varlistentry>
|
||||||
unit).</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--depth=</option></term>
|
<term><option>--depth=</option></term>
|
||||||
|
|
||||||
<listitem><para>Maximum control group
|
<listitem><para>Maximum control group tree traversal depth.
|
||||||
tree traversal depth. Specifies how
|
Specifies how deep <command>systemd-cgtop</command> shall
|
||||||
deep <command>systemd-cgtop</command>
|
traverse the control group hierarchies. If 0 is specified,
|
||||||
shall traverse the control group
|
only the root group is monitored. For 1, only the first level
|
||||||
hierarchies. If 0 is specified, only
|
of control groups is monitored, and so on. Defaults to
|
||||||
the root group is monitored. For 1,
|
3.</para></listitem>
|
||||||
only the first level of control groups
|
</varlistentry>
|
||||||
is monitored, and so on. Defaults to
|
|
||||||
3.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Keys</title>
|
<title>Keys</title>
|
||||||
|
|
||||||
<para><command>systemd-cgtop</command> is an
|
<para><command>systemd-cgtop</command> is an interactive tool and
|
||||||
interactive tool and may be controlled via user input
|
may be controlled via user input using the following keys:</para>
|
||||||
using the following keys:</para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>h</term>
|
<term>h</term>
|
||||||
|
|
||||||
<listitem><para>Shows a short help text.</para></listitem>
|
<listitem><para>Shows a short help text.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>SPACE</term>
|
<term>SPACE</term>
|
||||||
|
|
||||||
<listitem><para>Immediately refresh output.</para></listitem>
|
<listitem><para>Immediately refresh output.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>q</term>
|
<term>q</term>
|
||||||
|
|
||||||
<listitem><para>Terminate the program.</para></listitem>
|
<listitem><para>Terminate the program.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>p</term>
|
<term>p</term>
|
||||||
<term>t</term>
|
<term>t</term>
|
||||||
<term>c</term>
|
<term>c</term>
|
||||||
<term>m</term>
|
<term>m</term>
|
||||||
<term>i</term>
|
<term>i</term>
|
||||||
|
|
||||||
<listitem><para>Sort the control groups
|
<listitem><para>Sort the control groups by path, number of
|
||||||
by path, number of tasks, CPU load,
|
tasks, CPU load, memory usage, or IO load, respectively.
|
||||||
memory usage, or IO
|
</para></listitem>
|
||||||
load, respectively.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>%</term>
|
<term>%</term>
|
||||||
|
|
||||||
<listitem><para>Toggle between showing CPU time as
|
<listitem><para>Toggle between showing CPU time as time or
|
||||||
time or percentage.</para></listitem>
|
percentage.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>+</term>
|
<term>+</term>
|
||||||
<term>-</term>
|
<term>-</term>
|
||||||
|
|
||||||
<listitem><para>Increase
|
<listitem><para>Increase or decrease refresh delay,
|
||||||
or decrease refresh
|
respectively.</para></listitem>
|
||||||
delay, respectively.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cgls</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,199 +21,175 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-cryptsetup-generator" conditional='HAVE_LIBCRYPTSETUP'>
|
<refentry id="systemd-cryptsetup-generator" conditional='HAVE_LIBCRYPTSETUP'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-cryptsetup-generator</title>
|
<title>systemd-cryptsetup-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-cryptsetup-generator</refentrytitle>
|
<refentrytitle>systemd-cryptsetup-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-cryptsetup-generator</refname>
|
<refname>systemd-cryptsetup-generator</refname>
|
||||||
<refpurpose>Unit generator for <filename>/etc/crypttab</filename></refpurpose>
|
<refpurpose>Unit generator for <filename>/etc/crypttab</filename></refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-cryptsetup-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-cryptsetup-generator</filename>
|
<para><filename>systemd-cryptsetup-generator</filename> is a
|
||||||
is a generator that translates
|
generator that translates <filename>/etc/crypttab</filename> into
|
||||||
<filename>/etc/crypttab</filename> into native systemd
|
native systemd units early at boot and when configuration of the
|
||||||
units early at boot and when configuration of the
|
system manager is reloaded. This will create
|
||||||
system manager is reloaded. This will create
|
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
units as necessary.</para>
|
||||||
units as necessary.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-cryptsetup-generator</filename>
|
<para><filename>systemd-cryptsetup-generator</filename>
|
||||||
implements the <ulink
|
implements the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
||||||
specification</ulink>.</para>
|
specification</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para><filename>systemd-cryptsetup-generator</filename> understands
|
<para><filename>systemd-cryptsetup-generator</filename>
|
||||||
the following kernel command line parameters:</para>
|
understands the following kernel command line parameters:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks=</varname></term>
|
<term><varname>luks=</varname></term>
|
||||||
<term><varname>rd.luks=</varname></term>
|
<term><varname>rd.luks=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument. Defaults to
|
||||||
argument. Defaults to
|
<literal>yes</literal>. If <literal>no</literal>, disables the
|
||||||
<literal>yes</literal>. If
|
generator entirely. <varname>rd.luks=</varname> is honored
|
||||||
<literal>no</literal>, disables the
|
only by initial RAM disk (initrd) while
|
||||||
generator
|
<varname>luks=</varname> is honored by both the main system
|
||||||
entirely. <varname>rd.luks=</varname>
|
and the initrd. </para></listitem>
|
||||||
is honored only by initial RAM disk
|
</varlistentry>
|
||||||
(initrd) while
|
|
||||||
<varname>luks=</varname> is honored
|
|
||||||
by both the main system and the
|
|
||||||
initrd. </para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks.crypttab=</varname></term>
|
<term><varname>luks.crypttab=</varname></term>
|
||||||
<term><varname>rd.luks.crypttab=</varname></term>
|
<term><varname>rd.luks.crypttab=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument. Defaults to
|
||||||
argument. Defaults to
|
<literal>yes</literal>. If <literal>no</literal>, causes the
|
||||||
<literal>yes</literal>. If
|
generator to ignore any devices configured in
|
||||||
<literal>no</literal>, causes the
|
<filename>/etc/crypttab</filename>
|
||||||
generator to ignore any devices
|
(<varname>luks.uuid=</varname> will still work however).
|
||||||
configured in
|
<varname>rd.luks.crypttab=</varname> is honored only by
|
||||||
<filename>/etc/crypttab</filename>
|
initial RAM disk (initrd) while
|
||||||
(<varname>luks.uuid=</varname> will
|
<varname>luks.crypttab=</varname> is honored by both the main
|
||||||
still work
|
system and the initrd. </para></listitem>
|
||||||
however). <varname>rd.luks.crypttab=</varname>
|
</varlistentry>
|
||||||
is honored only by initial RAM disk
|
|
||||||
(initrd) while
|
|
||||||
<varname>luks.crypttab=</varname> is
|
|
||||||
honored by both the main system and
|
|
||||||
the initrd. </para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks.uuid=</varname></term>
|
<term><varname>luks.uuid=</varname></term>
|
||||||
<term><varname>rd.luks.uuid=</varname></term>
|
<term><varname>rd.luks.uuid=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a LUKS superblock
|
<listitem><para>Takes a LUKS superblock UUID as argument. This
|
||||||
UUID as argument. This will
|
will activate the specified device as part of the boot process
|
||||||
activate the specified device as part
|
as if it was listed in <filename>/etc/crypttab</filename>.
|
||||||
of the boot process as if it was
|
This option may be specified more than once in order to set up
|
||||||
listed in
|
multiple devices. <varname>rd.luks.uuid=</varname> is honored
|
||||||
<filename>/etc/crypttab</filename>. This
|
only by initial RAM disk (initrd) while
|
||||||
option may be specified more than once
|
<varname>luks.uuid=</varname> is honored by both the main
|
||||||
in order to set up multiple
|
system and the initrd.</para>
|
||||||
devices. <varname>rd.luks.uuid=</varname>
|
<para>If /etc/crypttab contains entries with the same UUID,
|
||||||
is honored only by initial RAM disk
|
then the name, keyfile and options specified there will be
|
||||||
(initrd) while
|
used. Otherwise the device will have the name
|
||||||
<varname>luks.uuid=</varname> is
|
<literal>luks-UUID</literal>.</para>
|
||||||
honored by both the main system and
|
<para>If /etc/crypttab exists, only those UUIDs
|
||||||
the initrd.</para>
|
specified on the kernel command line
|
||||||
<para>If /etc/crypttab contains entries with
|
will be activated in the initrd or the real root.</para>
|
||||||
the same UUID, then the name, keyfile and options
|
</listitem>
|
||||||
specified there will be used. Otherwise the device
|
</varlistentry>
|
||||||
will have the name <literal>luks-UUID</literal>.</para>
|
|
||||||
<para>If /etc/crypttab exists, only those UUIDs
|
|
||||||
specified on the kernel command line
|
|
||||||
will be activated in the initrd or the real root.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks.name=</varname></term>
|
<term><varname>luks.name=</varname></term>
|
||||||
<term><varname>rd.luks.name=</varname></term>
|
<term><varname>rd.luks.name=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a LUKS super
|
<listitem><para>Takes a LUKS super block UUID followed by an
|
||||||
block UUID followed by an '=' and a name. This implies
|
<literal>=</literal> and a name. This implies
|
||||||
<varname>rd.luks.uuid=</varname> or <varname>luks.uuid=</varname>
|
<varname>rd.luks.uuid=</varname> or
|
||||||
and will additionally make the LUKS device given by
|
<varname>luks.uuid=</varname> and will additionally make the
|
||||||
the UUID appear under the provided name.</para>
|
LUKS device given by the UUID appear under the provided
|
||||||
|
name.</para>
|
||||||
|
|
||||||
<para><varname>rd.luks.name=</varname>
|
<para><varname>rd.luks.name=</varname> is honored only by
|
||||||
is honored only by initial RAM disk
|
initial RAM disk (initrd) while <varname>luks.name=</varname>
|
||||||
(initrd) while
|
is honored by both the main system and the initrd.</para>
|
||||||
<varname>luks.name=</varname> is
|
</listitem>
|
||||||
honored by both the main system and
|
</varlistentry>
|
||||||
the initrd.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks.options=</varname></term>
|
<term><varname>luks.options=</varname></term>
|
||||||
<term><varname>rd.luks.options=</varname></term>
|
<term><varname>rd.luks.options=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a LUKS super
|
<listitem><para>Takes a LUKS super block UUID followed by an
|
||||||
block UUID followed by an '=' and a string
|
<literal>=</literal> and a string of options separated by
|
||||||
of options separated by commas as argument.
|
commas as argument. This will override the options for the
|
||||||
This will override the options for the given
|
given UUID.</para>
|
||||||
UUID.</para>
|
<para>If only a list of options, without an UUID, is
|
||||||
<para>If only a list of options, without an
|
specified, they apply to any UUIDs not specified elsewhere,
|
||||||
UUID, is specified, they apply to any UUIDs not
|
and without an entry in
|
||||||
specified elsewhere, and without an entry in
|
<filename>/etc/crypttab</filename>.</para><para>
|
||||||
/etc/crypttab.</para><para>
|
<varname>rd.luks.options=</varname> is honored only by initial
|
||||||
<varname>rd.luks.options=</varname>
|
RAM disk (initrd) while <varname>luks.options=</varname> is
|
||||||
is honored only by initial RAM disk
|
honored by both the main system and the initrd.</para>
|
||||||
(initrd) while
|
</listitem>
|
||||||
<varname>luks.options=</varname> is
|
</varlistentry>
|
||||||
honored by both the main system and
|
|
||||||
the initrd.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>luks.key=</varname></term>
|
<term><varname>luks.key=</varname></term>
|
||||||
<term><varname>rd.luks.key=</varname></term>
|
<term><varname>rd.luks.key=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a password file name as argument or
|
<listitem><para>Takes a password file name as argument or a
|
||||||
a LUKS super block UUID followed by a '=' and a password
|
LUKS super block UUID followed by a <literal>=</literal> and a
|
||||||
file name.</para>
|
password file name.</para>
|
||||||
|
|
||||||
<para>For those entries specified with
|
<para>For those entries specified with
|
||||||
<varname>rd.luks.uuid=</varname> or <varname>luks.uuid=</varname>,
|
<varname>rd.luks.uuid=</varname> or
|
||||||
the password file will be set to the one specified by
|
<varname>luks.uuid=</varname>, the password file will be set
|
||||||
<varname>rd.luks.key=</varname> or <varname>luks.key=</varname>
|
to the one specified by <varname>rd.luks.key=</varname> or
|
||||||
of the corresponding UUID, or the password file that was specified
|
<varname>luks.key=</varname> of the corresponding UUID, or the
|
||||||
without a UUID.</para>
|
password file that was specified without a UUID.</para>
|
||||||
<para><varname>rd.luks.key=</varname>
|
<para><varname>rd.luks.key=</varname>
|
||||||
is honored only by initial RAM disk
|
is honored only by initial RAM disk
|
||||||
(initrd) while
|
(initrd) while
|
||||||
<varname>luks.key=</varname> is
|
<varname>luks.key=</varname> is
|
||||||
honored by both the main system and
|
honored by both the main system and
|
||||||
the initrd.</para>
|
the initrd.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,67 +21,65 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-cryptsetup@.service" conditional='HAVE_LIBCRYPTSETUP'>
|
<refentry id="systemd-cryptsetup@.service" conditional='HAVE_LIBCRYPTSETUP'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-cryptsetup@.service</title>
|
<title>systemd-cryptsetup@.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-cryptsetup@.service</refentrytitle>
|
<refentrytitle>systemd-cryptsetup@.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-cryptsetup@.service</refname>
|
<refname>systemd-cryptsetup@.service</refname>
|
||||||
<refname>systemd-cryptsetup</refname>
|
<refname>systemd-cryptsetup</refname>
|
||||||
<refpurpose>Full disk decryption logic</refpurpose>
|
<refpurpose>Full disk decryption logic</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-cryptsetup@.service</filename></para>
|
<para><filename>systemd-cryptsetup@.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-cryptsetup</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-cryptsetup</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-cryptsetup@.service</filename>
|
<para><filename>systemd-cryptsetup@.service</filename> is a
|
||||||
is a service responsible for setting up encrypted
|
service responsible for setting up encrypted block devices. It is
|
||||||
block devices. It is instantiated for each device that
|
instantiated for each device that requires decryption for
|
||||||
requires decryption for access.</para>
|
access.</para>
|
||||||
|
|
||||||
<para><filename>systemd-cryptsetup@.service</filename>
|
<para><filename>systemd-cryptsetup@.service</filename> will ask
|
||||||
will ask for hard disk passwords via the <ulink
|
for hard disk passwords via the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">
|
url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">
|
||||||
password agent logic</ulink>, in order to query the
|
password agent logic</ulink>, in order to query the user for the
|
||||||
user for the password using the right mechanism at
|
password using the right mechanism at boot and during
|
||||||
boot and during runtime.</para>
|
runtime.</para>
|
||||||
|
|
||||||
<para>At early boot and when the system manager
|
<para>At early boot and when the system manager configuration is
|
||||||
configuration is reloaded this
|
reloaded this <filename>/etc/crypttab</filename> is translated
|
||||||
<filename>/etc/crypttab</filename> is translated into
|
into <filename>systemd-cryptsetup@.service</filename> units by
|
||||||
<filename>systemd-cryptsetup@.service</filename> units
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
||||||
by
|
</refsect1>
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,78 +21,77 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-debug-generator">
|
<refentry id="systemd-debug-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-debug-generator</title>
|
<title>systemd-debug-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-debug-generator</refentrytitle>
|
<refentrytitle>systemd-debug-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-debug-generator</refname>
|
<refname>systemd-debug-generator</refname>
|
||||||
<refpurpose>Generator for enabling a runtime debug shell and masking specific units at boot</refpurpose>
|
<refpurpose>Generator for enabling a runtime debug shell and
|
||||||
</refnamediv>
|
masking specific units at boot</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-debug-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-debug-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-debug-generator</filename> is
|
<para><filename>systemd-debug-generator</filename> is a generator
|
||||||
a generator that reads the kernel command line and
|
that reads the kernel command line and understands three
|
||||||
understands three options:</para>
|
options:</para>
|
||||||
|
|
||||||
<para>If the <option>systemd.mask=</option> option is
|
<para>If the <option>systemd.mask=</option> option is specified
|
||||||
specified and followed by a unit name, this unit is
|
and followed by a unit name, this unit is masked for the runtime,
|
||||||
masked for the runtime, similar to the effect of
|
similar to the effect of
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
||||||
<command>mask</command> command. This is useful to
|
<command>mask</command> command. This is useful to boot with
|
||||||
boot with certain units removed from the initial boot
|
certain units removed from the initial boot transaction for
|
||||||
transaction for debugging system startup. May be
|
debugging system startup. May be specified more than once.</para>
|
||||||
specified more than once.</para>
|
|
||||||
|
|
||||||
<para>If the <option>systemd.wants=</option> option is
|
<para>If the <option>systemd.wants=</option> option is specified
|
||||||
specified and followed by a unit name, a start job for
|
and followed by a unit name, a start job for this unit is added to
|
||||||
this unit is added to the initial transaction. This is
|
the initial transaction. This is useful to start one or more
|
||||||
useful to start one or more additional units at
|
additional units at boot. May be specified more than once.</para>
|
||||||
boot. May be specified more than once.</para>
|
|
||||||
|
|
||||||
<para>If the <option>systemd.debug-shell</option>
|
<para>If the <option>systemd.debug-shell</option> option is
|
||||||
option is specified, the debug shell service
|
specified, the debug shell service
|
||||||
<literal>debug-shell.service</literal> is pulled into
|
<literal>debug-shell.service</literal> is pulled into the boot
|
||||||
the boot transaction. It will spawn a debug shell on
|
transaction. It will spawn a debug shell on tty9 during early
|
||||||
tty9 during early system startup. Note that the shell
|
system startup. Note that the shell may also be turned on
|
||||||
may also be turned on persistently by enabling it with
|
persistently by enabling it with
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
|
||||||
<command>enable</command> command.</para>
|
<command>enable</command> command.</para>
|
||||||
|
|
||||||
<para><filename>systemd-debug-generator</filename>
|
<para><filename>systemd-debug-generator</filename> implements the
|
||||||
implements the <ulink
|
<ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
||||||
specification</ulink>.</para>
|
specification</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+144
-155
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,195 +22,184 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-delta"
|
<refentry id="systemd-delta"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-delta</title>
|
<title>systemd-delta</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-delta</refentrytitle>
|
<refentrytitle>systemd-delta</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-delta</refname>
|
<refname>systemd-delta</refname>
|
||||||
<refpurpose>Find overridden configuration files</refpurpose>
|
<refpurpose>Find overridden configuration files</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-delta</command>
|
<command>systemd-delta</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
<arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
|
<arg choice="opt" rep="repeat"><replaceable>PREFIX</replaceable><optional>/<replaceable>SUFFIX</replaceable></optional>|<replaceable>SUFFIX</replaceable></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-delta</command> may be used to
|
<para><command>systemd-delta</command> may be used to identify and
|
||||||
identify and compare configuration files that override
|
compare configuration files that override other configuration
|
||||||
other configuration files. Files in
|
files. Files in <filename>/etc</filename> have highest priority,
|
||||||
<filename>/etc</filename> have highest priority, files
|
files in <filename>/run</filename> have the second highest
|
||||||
in <filename>/run</filename> have the second highest
|
priority, ..., files in <filename>/lib</filename> have lowest
|
||||||
priority, ..., files in <filename>/lib</filename> have
|
priority. Files in a directory with higher priority override files
|
||||||
lowest priority. Files in a directory with higher
|
with the same name in directories of lower priority. In addition,
|
||||||
priority override files with the same name in
|
certain configuration files can have <literal>.d</literal>
|
||||||
directories of lower priority. In addition, certain
|
directories which contain "drop-in" files with configuration
|
||||||
configuration files can have <literal>.d</literal>
|
snippets which augment the main configuration file. "Drop-in"
|
||||||
directories which contain "drop-in" files with
|
files can be overriden in the same way by placing files with the
|
||||||
configuration snippets which augment the main
|
same name in a directory of higher priority (except that in case
|
||||||
configuration file. "Drop-in" files can be overriden
|
of "drop-in" files, both the "drop-in" file name and the name of
|
||||||
in the same way by placing files with the same name in
|
the containing directory, which corresponds to the name of the
|
||||||
a directory of higher priority (except that in case of
|
main configuration file, must match). For a fuller explanation,
|
||||||
"drop-in" files, both the "drop-in" file name and the
|
see
|
||||||
name of the containing directory, which corresponds to
|
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||||
the name of the main configuration file, must match).
|
</para>
|
||||||
For a fuller explanation, see
|
|
||||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>The command line argument will be split into a
|
<para>The command line argument will be split into a prefix and a
|
||||||
prefix and a suffix. Either is optional. The prefix
|
suffix. Either is optional. The prefix must be one of the
|
||||||
must be one of the directories containing
|
directories containing configuration files
|
||||||
configuration files (<filename>/etc</filename>,
|
(<filename>/etc</filename>, <filename>/run</filename>,
|
||||||
<filename>/run</filename>,
|
<filename>/usr/lib</filename>, ...). If it is given, only
|
||||||
<filename>/usr/lib</filename>, ...). If it is given,
|
overriding files contained in this directory will be shown.
|
||||||
only overriding files contained in this directory will
|
Otherwise, all overriding files will be shown. The suffix must be
|
||||||
be shown. Otherwise, all overriding files will be
|
a name of a subdirectory containing configuration files like
|
||||||
shown. The suffix must be a name of a subdirectory
|
<filename>tmpfiles.d</filename>, <filename>sysctl.d</filename> or
|
||||||
containing configuration files like
|
<filename>systemd/system</filename>. If it is given, only
|
||||||
<filename>tmpfiles.d</filename>,
|
configuration files in this subdirectory (across all configuration
|
||||||
<filename>sysctl.d</filename> or
|
paths) will be analyzed. Otherwise, all configuration files will
|
||||||
<filename>systemd/system</filename>. If it is given,
|
be analyzed. If the command line argument is not given at all, all
|
||||||
only configuration files in this subdirectory (across
|
configuration files will be analyzed. See below for some
|
||||||
all configuration paths) will be analyzed. Otherwise,
|
examples.</para>
|
||||||
all configuration files will be analyzed. If the
|
</refsect1>
|
||||||
command line argument is not given at all, all
|
|
||||||
configuration files will be analyzed. See below for
|
|
||||||
some examples.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-t</option></term>
|
<term><option>-t</option></term>
|
||||||
<term><option>--type=</option></term>
|
<term><option>--type=</option></term>
|
||||||
|
|
||||||
<listitem><para>When listing the
|
<listitem><para>When listing the differences, only list those
|
||||||
differences, only list those that are
|
that are asked for. The list itself is a comma-separated list
|
||||||
asked for. The list itself is a
|
of desired difference types.</para>
|
||||||
comma-separated list of desired
|
|
||||||
difference types.</para>
|
|
||||||
|
|
||||||
<para>Recognized types are:
|
<para>Recognized types are:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>masked</varname></term>
|
<term><varname>masked</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show masked files</para></listitem>
|
<listitem><para>Show masked files</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>equivalent</varname></term>
|
<term><varname>equivalent</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show overridden
|
<listitem><para>Show overridden files that while
|
||||||
files that while overridden, do
|
overridden, do not differ in content.</para></listitem>
|
||||||
not differ in content.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>redirected</varname></term>
|
<term><varname>redirected</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show files that
|
<listitem><para>Show files that are redirected to
|
||||||
are redirected to another.</para></listitem>
|
another.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>overridden</varname></term>
|
<term><varname>overridden</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show overridden,
|
<listitem><para>Show overridden, and changed
|
||||||
and changed files.</para></listitem>
|
files.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>extended</varname></term>
|
<term><varname>extended</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show *.conf files in drop-in
|
<listitem><para>Show <filename>*.conf</filename> files
|
||||||
directories for units.</para></listitem>
|
in drop-in directories for units.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>unchanged</varname></term>
|
<term><varname>unchanged</varname></term>
|
||||||
|
|
||||||
<listitem><para>Show unmodified
|
<listitem><para>Show unmodified files
|
||||||
files too.</para></listitem>
|
too.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--diff=</option></term>
|
<term><option>--diff=</option></term>
|
||||||
|
|
||||||
<listitem><para>When showing modified
|
<listitem><para>When showing modified files, when a file is
|
||||||
files, when a file is overridden show a
|
overridden show a diff as well. This option takes a boolean
|
||||||
diff as well. This option takes a
|
argument. If omitted, it defaults to
|
||||||
boolean argument. If omitted, it defaults
|
<option>true</option>.</para></listitem>
|
||||||
to <option>true</option>.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
<xi:include href="standard-options.xml" xpointer="no-pager" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>To see all local configuration:</para>
|
<para>To see all local configuration:</para>
|
||||||
<programlisting>systemd-delta</programlisting>
|
<programlisting>systemd-delta</programlisting>
|
||||||
|
|
||||||
<para>To see all runtime configuration:</para>
|
<para>To see all runtime configuration:</para>
|
||||||
<programlisting>systemd-delta /run</programlisting>
|
<programlisting>systemd-delta /run</programlisting>
|
||||||
|
|
||||||
<para>To see all system unit configuration changes:</para>
|
<para>To see all system unit configuration changes:</para>
|
||||||
<programlisting>systemd-delta systemd/system</programlisting>
|
<programlisting>systemd-delta systemd/system</programlisting>
|
||||||
|
|
||||||
<para>To see all runtime "drop-in" changes for system units:</para>
|
<para>To see all runtime "drop-in" changes for system units:</para>
|
||||||
<programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
|
<programlisting>systemd-delta --type=extended /run/systemd/system</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+162
-170
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,210 +22,202 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-detect-virt"
|
<refentry id="systemd-detect-virt"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-detect-virt</title>
|
<title>systemd-detect-virt</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-detect-virt</refentrytitle>
|
<refentrytitle>systemd-detect-virt</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-detect-virt</refname>
|
<refname>systemd-detect-virt</refname>
|
||||||
<refpurpose>Detect execution in a virtualized environment</refpurpose>
|
<refpurpose>Detect execution in a virtualized environment</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-detect-virt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
<command>systemd-detect-virt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-detect-virt</command> detects
|
<para><command>systemd-detect-virt</command> detects execution in
|
||||||
execution in a virtualized environment. It identifies
|
a virtualized environment. It identifies the virtualization
|
||||||
the virtualization technology and can distinguish full
|
technology and can distinguish full VM virtualization from
|
||||||
VM virtualization from container
|
container virtualization. <filename>systemd-detect-virt</filename>
|
||||||
virtualization. <filename>systemd-detect-virt</filename>
|
exits with a return value of 0 (success) if a virtualization
|
||||||
exits with a return value of 0 (success) if a
|
technology is detected, and non-zero (error) otherwise. By default
|
||||||
virtualization technology is detected, and non-zero
|
any type of virtualization is detected, and the options
|
||||||
(error) otherwise. By default any type of
|
<option>--container</option> and <option>--vm</option> can be used
|
||||||
virtualization is detected, and the options
|
to limit what types of virtualization are detected.</para>
|
||||||
<option>--container</option> and <option>--vm</option>
|
|
||||||
can be used to limit what types of virtualization are
|
|
||||||
detected.</para>
|
|
||||||
|
|
||||||
<para>When executed without <option>--quiet</option>
|
<para>When executed without <option>--quiet</option> will print a
|
||||||
will print a short identifier for the detected
|
short identifier for the detected virtualization technology. The
|
||||||
virtualization technology. The following technologies
|
following technologies are currently identified:</para>
|
||||||
are currently identified:</para>
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<title>Known virtualization technologies (both
|
<title>Known virtualization technologies (both
|
||||||
VM, i.e. full hardware virtualization,
|
VM, i.e. full hardware virtualization,
|
||||||
and container, i.e. shared kernel virtualization)</title>
|
and container, i.e. shared kernel virtualization)</title>
|
||||||
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
|
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
|
||||||
<colspec colname="type" />
|
<colspec colname="type" />
|
||||||
<colspec colname="id" />
|
<colspec colname="id" />
|
||||||
<colspec colname="product" />
|
<colspec colname="product" />
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Type</entry>
|
<entry>Type</entry>
|
||||||
<entry>ID</entry>
|
<entry>ID</entry>
|
||||||
<entry>Product</entry>
|
<entry>Product</entry>
|
||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry morerows="8">VM</entry>
|
<entry morerows="8">VM</entry>
|
||||||
<entry><varname>qemu</varname></entry>
|
<entry><varname>qemu</varname></entry>
|
||||||
<entry>QEMU software virtualization</entry>
|
<entry>QEMU software virtualization</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>kvm</varname></entry>
|
<entry><varname>kvm</varname></entry>
|
||||||
<entry>Linux KVM kernel virtual machine</entry>
|
<entry>Linux KVM kernel virtual machine</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>zvm</varname></entry>
|
<entry><varname>zvm</varname></entry>
|
||||||
<entry>s390 z/VM</entry>
|
<entry>s390 z/VM</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>vmware</varname></entry>
|
<entry><varname>vmware</varname></entry>
|
||||||
<entry>VMware Workstation or Server, and related products</entry>
|
<entry>VMware Workstation or Server, and related products</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>microsoft</varname></entry>
|
<entry><varname>microsoft</varname></entry>
|
||||||
<entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
|
<entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>oracle</varname></entry>
|
<entry><varname>oracle</varname></entry>
|
||||||
<entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
|
<entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>xen</varname></entry>
|
<entry><varname>xen</varname></entry>
|
||||||
<entry>Xen hypervisor (only domU, not dom0)</entry>
|
<entry>Xen hypervisor (only domU, not dom0)</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>bochs</varname></entry>
|
<entry><varname>bochs</varname></entry>
|
||||||
<entry>Bochs Emulator</entry>
|
<entry>Bochs Emulator</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>uml</varname></entry>
|
<entry><varname>uml</varname></entry>
|
||||||
<entry>User-mode Linux</entry>
|
<entry>User-mode Linux</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry morerows="5">container</entry>
|
<entry morerows="5">container</entry>
|
||||||
<entry><varname>openvz</varname></entry>
|
<entry><varname>openvz</varname></entry>
|
||||||
<entry>OpenVZ/Virtuozzo</entry>
|
<entry>OpenVZ/Virtuozzo</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>lxc</varname></entry>
|
<entry><varname>lxc</varname></entry>
|
||||||
<entry>Linux container implementation by LXC</entry>
|
<entry>Linux container implementation by LXC</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>lxc-libvirt</varname></entry>
|
<entry><varname>lxc-libvirt</varname></entry>
|
||||||
<entry>Linux container implementation by libvirt</entry>
|
<entry>Linux container implementation by libvirt</entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>systemd-nspawn</varname></entry>
|
<entry><varname>systemd-nspawn</varname></entry>
|
||||||
<entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
|
<entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
<entry><varname>docker</varname></entry>
|
<entry><varname>docker</varname></entry>
|
||||||
<entry>Docker container manager</entry>
|
<entry>Docker container manager</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>If multiple virtualization solutions are used,
|
<para>If multiple virtualization solutions are used, only the
|
||||||
only the "innermost" is detected and identified. That
|
"innermost" is detected and identified. That means if both VM
|
||||||
means if both VM virtualization and container
|
virtualization and container virtualization are used in
|
||||||
virtualization are used in conjunction, only the latter
|
conjunction, only the latter will be identified (unless
|
||||||
will be identified (unless <option>--vm</option> is
|
<option>--vm</option> is passed).</para>
|
||||||
passed).</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-c</option></term>
|
<term><option>-c</option></term>
|
||||||
<term><option>--container</option></term>
|
<term><option>--container</option></term>
|
||||||
|
|
||||||
<listitem><para>Only detects container
|
<listitem><para>Only detects container virtualization (i.e.
|
||||||
virtualization (i.e. shared kernel
|
shared kernel virtualization).</para></listitem>
|
||||||
virtualization).</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-v</option></term>
|
<term><option>-v</option></term>
|
||||||
<term><option>--vm</option></term>
|
<term><option>--vm</option></term>
|
||||||
|
|
||||||
<listitem><para>Only detects VM
|
<listitem><para>Only detects VM virtualization (i.e. full
|
||||||
virtualization (i.e. full hardware
|
hardware virtualization).</para></listitem>
|
||||||
virtualization).</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>-q</option></term>
|
<term><option>-q</option></term>
|
||||||
<term><option>--quiet</option></term>
|
<term><option>--quiet</option></term>
|
||||||
|
|
||||||
<listitem><para>Suppress output of the
|
<listitem><para>Suppress output of the virtualization
|
||||||
virtualization technology
|
technology identifier.</para></listitem>
|
||||||
identifier.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>If a virtualization technology is detected, 0 is
|
<para>If a virtualization technology is detected, 0 is returned, a
|
||||||
returned, a non-zero code otherwise.</para>
|
non-zero code otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,68 +21,68 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-efi-boot-generator">
|
<refentry id="systemd-efi-boot-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-efi-boot-generator</title>
|
<title>systemd-efi-boot-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-efi-boot-generator</refentrytitle>
|
<refentrytitle>systemd-efi-boot-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-efi-boot-generator</refname>
|
<refname>systemd-efi-boot-generator</refname>
|
||||||
<refpurpose>Generator for automatically mounting the
|
<refpurpose>Generator for automatically mounting the
|
||||||
EFI System Partition used by the current boot to
|
EFI System Partition used by the current boot to
|
||||||
<filename>/boot</filename></refpurpose>
|
<filename>/boot</filename></refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-efi-boot-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-efi-boot-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-efi-boot-generator</filename>
|
<para><filename>systemd-efi-boot-generator</filename> is a
|
||||||
is a generator that automatically creates mount and
|
generator that automatically creates mount and automount units for
|
||||||
automount units for the EFI System Partition (ESP),
|
the EFI System Partition (ESP), mounting it to
|
||||||
mounting it to <filename>/boot</filename>. Note that
|
<filename>/boot</filename>. Note that this generator will execute
|
||||||
this generator will execute no operation on non-EFI
|
no operation on non-EFI systems, on systems where the boot loader
|
||||||
systems, on systems where the boot loader does not
|
does not communicate the used ESP to the OS, on systems where
|
||||||
communicate the used ESP to the OS, on systems where
|
<filename>/boot</filename> is an explicitly configured mount (for
|
||||||
<filename>/boot</filename> is an explicitly configured
|
example, listed in
|
||||||
mount (for example, listed in <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>) or where the <filename>/boot</filename> mount
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
|
||||||
point is non-empty. Since this generator creates an
|
or where the <filename>/boot</filename> mount point is non-empty.
|
||||||
automount unit, the mount will only be activated
|
Since this generator creates an automount unit, the mount will
|
||||||
on-demand, when accessed.</para>
|
only be activated on-demand, when accessed.</para>
|
||||||
|
|
||||||
<para><filename>systemd-efi-boot-generator</filename>
|
<para><filename>systemd-efi-boot-generator</filename> implements
|
||||||
implements the <ulink
|
the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
||||||
specification</ulink>.</para>
|
specification</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.automount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+118
-133
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,172 +22,157 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-escape"
|
<refentry id="systemd-escape"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-escape</title>
|
<title>systemd-escape</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-escape</refentrytitle>
|
<refentrytitle>systemd-escape</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-escape</refname>
|
<refname>systemd-escape</refname>
|
||||||
<refpurpose>Escape strings for usage in system unit names</refpurpose>
|
<refpurpose>Escape strings for usage in system unit names</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-escape <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">STRING</arg></command>
|
<command>systemd-escape</command>
|
||||||
</cmdsynopsis>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
</refsynopsisdiv>
|
<arg choice="opt" rep="repeat">STRING</arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-escape</command> may be used to
|
<para><command>systemd-escape</command> may be used to escape
|
||||||
escape strings for inclusion in systemd unit
|
strings for inclusion in systemd unit names. The command may be
|
||||||
names. The command may be used to escape and to undo
|
used to escape and to undo escaping of strings.</para>
|
||||||
escaping of strings.</para>
|
|
||||||
|
|
||||||
<para>The command takes any number of strings on the
|
<para>The command takes any number of strings on the command line,
|
||||||
command line, and will process them individually, one
|
and will process them individually, one after the other. It will
|
||||||
after the other. It will output them separated by
|
output them separated by spaces to stdout.</para>
|
||||||
spaces to stdout.</para>
|
|
||||||
|
|
||||||
<para>By default this command will escape the strings
|
<para>By default this command will escape the strings passed,
|
||||||
passed, unless <option>--unescape</option> is passed
|
unless <option>--unescape</option> is passed which results in the
|
||||||
which results in the inverse operation being
|
inverse operation being applied. If <option>--mangle</option> a
|
||||||
applied. If <option>--mangle</option> a special mode
|
special mode of escaping is applied instead, which assumes a
|
||||||
of escaping is applied instead, which assumes a string
|
string to be already escaped but will escape everything that
|
||||||
to be already escaped but will escape everything that
|
appears obviously non-escaped.</para>
|
||||||
appears obviously non-escaped.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--suffix=</option></term>
|
<term><option>--suffix=</option></term>
|
||||||
|
|
||||||
<listitem><para>Appends the specified
|
<listitem><para>Appends the specified unit type suffix to the
|
||||||
unit type suffix to the escaped
|
escaped string. Takes one of the unit types supported by
|
||||||
string. Takes one of the unit types
|
systemd, such as <literal>.service</literal> or
|
||||||
supported by systemd, such as
|
<literal>.mount</literal>. May not be used in conjunction with
|
||||||
<literal>.service</literal> or
|
<option>--template=</option>, <option>--unescape</option> or
|
||||||
<literal>.mount</literal>. May not be
|
<option>--mangle</option>.</para></listitem>
|
||||||
used in conjunction with
|
</varlistentry>
|
||||||
<option>--template=</option>,
|
|
||||||
<option>--unescape</option> or
|
|
||||||
<option>--mangle</option>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--template=</option></term>
|
<term><option>--template=</option></term>
|
||||||
|
|
||||||
<listitem><para>Inserts the escaped
|
<listitem><para>Inserts the escaped strings in a unit name
|
||||||
strings in a unit name template. Takes
|
template. Takes a unit name template such as
|
||||||
a unit name template such as
|
<filename>foobar@.service</filename> May not be used in
|
||||||
<filename>foobar@.service</filename>
|
conjunction with <option>--suffix=</option>,
|
||||||
May not be used in conjunction with
|
<option>--unescape</option> or
|
||||||
<option>--suffix=</option>,
|
<option>--mangle</option>.</para></listitem>
|
||||||
<option>--unescape</option> or
|
</varlistentry>
|
||||||
<option>--mangle</option>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--path</option></term>
|
<term><option>--path</option></term>
|
||||||
<term><option>-p</option></term>
|
<term><option>-p</option></term>
|
||||||
|
|
||||||
<listitem><para>When escaping or
|
<listitem><para>When escaping or unescaping a string, assume
|
||||||
unescaping a string, assume it refers
|
it refers to a file system path. This enables special
|
||||||
to a file system path. This enables
|
processing of the initial <literal>/</literal> of the
|
||||||
special processing of the initial
|
path.</para></listitem>
|
||||||
<literal>/</literal> of the
|
</varlistentry>
|
||||||
path.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--unescape</option></term>
|
<term><option>--unescape</option></term>
|
||||||
|
|
||||||
<listitem><para>Instead of escaping
|
<listitem><para>Instead of escaping the specified strings,
|
||||||
the specified strings, undo the
|
undo the escaping, reversing the operation. May not be used in
|
||||||
escaping, reversing the operation. May
|
conjunction with <option>--suffix=</option>,
|
||||||
not be used in conjunction with
|
<option>--template=</option> or
|
||||||
<option>--suffix=</option>,
|
<option>--mangle</option>.</para></listitem>
|
||||||
<option>--template=</option> or
|
</varlistentry>
|
||||||
<option>--mangle</option>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--mangle</option></term>
|
<term><option>--mangle</option></term>
|
||||||
|
|
||||||
<listitem><para>Like
|
<listitem><para>Like <option>--escape</option>, but only
|
||||||
<option>--escape</option>, but only
|
escape characters that are obviously not escaped yet, and
|
||||||
escape characters that are obviously
|
possibly automatically append an appropriate unit type suffix
|
||||||
not escaped yet, and possibly
|
to the string. May not be used in conjunction with
|
||||||
automatically append an appropriate
|
<option>--suffix=</option>, <option>--template=</option> or
|
||||||
unit type suffix to the string. May
|
<option>--unescape</option>.</para></listitem>
|
||||||
not be used in conjunction with
|
</varlistentry>
|
||||||
<option>--suffix=</option>,
|
|
||||||
<option>--template=</option> or
|
|
||||||
<option>--unescape</option>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>Escape a single string:</para>
|
<para>Escape a single string:</para>
|
||||||
<programlisting>$ systemd-escape 'Hallöchen, Meister'
|
<programlisting>$ systemd-escape 'Hallöchen, Meister'
|
||||||
Hall\xc3\xb6chen\x2c\x20Meister</programlisting>
|
Hall\xc3\xb6chen\x2c\x20Meister</programlisting>
|
||||||
|
|
||||||
<para>To undo escaping on a single string:</para>
|
<para>To undo escaping on a single string:</para>
|
||||||
<programlisting>$ systemd-escape -u 'Hall\xc3\xb6chen\x2c\x20Meister'
|
<programlisting>$ systemd-escape -u 'Hall\xc3\xb6chen\x2c\x20Meister'
|
||||||
Hallöchen, Meister</programlisting>
|
Hallöchen, Meister</programlisting>
|
||||||
|
|
||||||
<para>To generate the mount unit for a path:</para>
|
<para>To generate the mount unit for a path:</para>
|
||||||
<programlisting>$ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/"
|
<programlisting>$ systemd-escape -p --suffix=mount "/tmp//waldi/foobar/"
|
||||||
tmp-waldi-foobar.mount</programlisting>
|
tmp-waldi-foobar.mount</programlisting>
|
||||||
|
|
||||||
<para>To generate instance names of three strings</para>
|
<para>To generate instance names of three strings</para>
|
||||||
<programlisting>$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
|
<programlisting>$ systemd-escape --template=systemd-nspawn@.service 'My Container 1' 'containerb' 'container/III'
|
||||||
systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service</programlisting>
|
systemd-nspawn@My\x20Container\x201.service systemd-nspawn@containerb.service systemd-nspawn@container-III.service</programlisting>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+190
-217
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,265 +22,238 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-firstboot"
|
<refentry id="systemd-firstboot"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-firstboot</title>
|
<title>systemd-firstboot</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-firstboot</refentrytitle>
|
<refentrytitle>systemd-firstboot</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-firstboot</refname>
|
<refname>systemd-firstboot</refname>
|
||||||
<refname>systemd-firstboot.service</refname>
|
<refname>systemd-firstboot.service</refname>
|
||||||
<refpurpose>Initialize basic system settings on or before the first boot-up of a system</refpurpose>
|
<refpurpose>Initialize basic system settings on or before the first boot-up of a system</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-firstboot</command>
|
<command>systemd-firstboot</command>
|
||||||
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
<arg choice="opt" rep="repeat">OPTIONS</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
<para><filename>systemd-firstboot.service</filename></para>
|
<para><filename>systemd-firstboot.service</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-firstboot</command> initializes
|
<para><command>systemd-firstboot</command> initializes the most
|
||||||
the most basic system settings interactively on the
|
basic system settings interactively on the first boot, or
|
||||||
first boot, or optionally non-interactively when a
|
optionally non-interactively when a system image is created. The
|
||||||
system image is created. The following settings may be
|
following settings may be set up:</para>
|
||||||
set up:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>The system locale, more
|
<listitem><para>The system locale, more specifically the two
|
||||||
specifically the two locale variables
|
locale variables <varname>LANG=</varname> and
|
||||||
<varname>LANG=</varname> and
|
<varname>LC_MESSAGES</varname></para></listitem>
|
||||||
<varname>LC_MESSAGES</varname></para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>The system time zone</para></listitem>
|
<listitem><para>The system time zone</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The system host name</para></listitem>
|
<listitem><para>The system host name</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The machine ID of the system</para></listitem>
|
<listitem><para>The machine ID of the system</para></listitem>
|
||||||
|
|
||||||
<listitem><para>The root user's password</para></listitem>
|
<listitem><para>The root user's password</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<para>Each of the fields may either be queried
|
<para>Each of the fields may either be queried interactively from
|
||||||
interactively from the users, set non-interactively on
|
the users, set non-interactively on the tool's command line, or be
|
||||||
the tool's command line, or be copied from a host
|
copied from a host system that is used to set up the system
|
||||||
system that is used to set up the system image.</para>
|
image.</para>
|
||||||
|
|
||||||
<para>If a setting is already initialized it will not
|
<para>If a setting is already initialized it will not be
|
||||||
be overwritten and the user will not be prompted for
|
overwritten and the user will not be prompted for the
|
||||||
the setting.</para>
|
setting.</para>
|
||||||
|
|
||||||
<para>Note that this tool operates directly on the
|
<para>Note that this tool operates directly on the file system and
|
||||||
file system and does not involve any running system
|
does not involve any running system services, unlike
|
||||||
services, unlike
|
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
or
|
||||||
or
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. This
|
This allows <command>systemd-firstboot</command> to operate on
|
||||||
allows <command>systemd-firstboot</command> to operate
|
mounted but not booted disk images and in early boot. It is not
|
||||||
on mounted but not booted disk images and in early
|
recommended to use <command>systemd-firstboot</command> on the
|
||||||
boot. It is not recommended to use
|
running system while it is up.</para>
|
||||||
<command>systemd-firstboot</command> on the running
|
</refsect1>
|
||||||
system while it is up.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--root=<replaceable>root</replaceable></option></term>
|
<term><option>--root=<replaceable>root</replaceable></option></term>
|
||||||
<listitem><para>Takes a directory path
|
<listitem><para>Takes a directory path as an argument. All
|
||||||
as an argument. All paths will be
|
paths will be prefixed with the given alternate
|
||||||
prefixed with the given alternate
|
<replaceable>root</replaceable> path, including config search
|
||||||
<replaceable>root</replaceable> path,
|
paths. This is useful to operate on a system image mounted to
|
||||||
including config search paths. This is
|
the specified directory instead of the host system itself.
|
||||||
useful to operate on a system image
|
</para></listitem>
|
||||||
mounted to the specified directory
|
</varlistentry>
|
||||||
instead of the host system itself.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--locale=<replaceable>LOCALE</replaceable></option></term>
|
<term><option>--locale=<replaceable>LOCALE</replaceable></option></term>
|
||||||
<term><option>--locale-messages=<replaceable>LOCALE</replaceable></option></term>
|
<term><option>--locale-messages=<replaceable>LOCALE</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Sets the system
|
<listitem><para>Sets the system locale, more specifically the
|
||||||
locale, more specifically the
|
<varname>LANG=</varname> and <varname>LC_MESSAGES</varname>
|
||||||
<varname>LANG=</varname> and
|
settings. The argument should be a valid locale identifier,
|
||||||
<varname>LC_MESSAGES</varname>
|
such as <literal>de_DE.UTF-8</literal>. This controls the
|
||||||
settings. The argument should be a
|
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
valid locale identifier, such as
|
configuration file.</para></listitem>
|
||||||
<literal>de_DE.UTF-8</literal>. This
|
</varlistentry>
|
||||||
controls the
|
|
||||||
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
configuration file.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--timezone=<replaceable>TIMEZONE</replaceable></option></term>
|
<term><option>--timezone=<replaceable>TIMEZONE</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Sets the system time
|
<listitem><para>Sets the system time zone. The argument should
|
||||||
zone. The argument should be a valid
|
be a valid time zone identifier, such as
|
||||||
time zone identifier, such as
|
<literal>Europe/Berlin</literal>. This controls the
|
||||||
<literal>Europe/Berlin</literal>. This
|
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
controls the
|
symlink.</para></listitem>
|
||||||
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
</varlistentry>
|
||||||
symlink.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--hostname=<replaceable>HOSTNAME</replaceable></option></term>
|
<term><option>--hostname=<replaceable>HOSTNAME</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Sets the system
|
<listitem><para>Sets the system hostname. The argument should
|
||||||
hostname. The argument should be a
|
be a host name, compatible with DNS. This controls the
|
||||||
host name, compatible with DNS. This
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
controls the
|
configuration file.</para></listitem>
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
</varlistentry>
|
||||||
configuration file.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--machine-id=<replaceable>ID</replaceable></option></term>
|
<term><option>--machine-id=<replaceable>ID</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Sets the system's machine ID. This
|
<listitem><para>Sets the system's machine ID. This controls
|
||||||
controls the
|
the
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
file.</para></listitem>
|
file.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--root-password=<replaceable>PASSWORD</replaceable></option></term>
|
<term><option>--root-password=<replaceable>PASSWORD</replaceable></option></term>
|
||||||
<term><option>--root-password-file=<replaceable>PATH</replaceable></option></term>
|
<term><option>--root-password-file=<replaceable>PATH</replaceable></option></term>
|
||||||
|
|
||||||
<listitem><para>Sets the password of
|
<listitem><para>Sets the password of the system's root user.
|
||||||
the system's root user. This creates a
|
This creates a
|
||||||
<citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
file. This setting exists in two
|
file. This setting exists in two forms:
|
||||||
forms:
|
<option>--root-password=</option> accepts the password to set
|
||||||
<option>--root-password=</option>
|
directly on the command line,
|
||||||
accepts the password to set directly
|
<option>--root-password-file=</option> reads it from a file.
|
||||||
on the command line,
|
Note that it is not recommended specifying passwords on the
|
||||||
<option>--root-password-file=</option>
|
command line as other users might be able to see them simply
|
||||||
reads it from a file. Note that
|
by invoking
|
||||||
it is not recommended specifying
|
<citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
|
||||||
passwords on the command line as other
|
</varlistentry>
|
||||||
users might be able to see them
|
|
||||||
simply by invoking
|
|
||||||
<citerefentry><refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--prompt-locale</option></term>
|
<term><option>--prompt-locale</option></term>
|
||||||
<term><option>--prompt-timezone</option></term>
|
<term><option>--prompt-timezone</option></term>
|
||||||
<term><option>--prompt-hostname</option></term>
|
<term><option>--prompt-hostname</option></term>
|
||||||
<term><option>--prompt-root-password</option></term>
|
<term><option>--prompt-root-password</option></term>
|
||||||
|
|
||||||
<para>Prompt the user interactively
|
<listitem><para>Prompt the user interactively for a specific
|
||||||
for a specific basic setting. Note
|
basic setting. Note that any explicit configuration settings
|
||||||
that any explicit configuration
|
specified on the command line take precedence, and the user is
|
||||||
settings specified on the command line
|
not prompted for it.</para></listitem>
|
||||||
take precedence, and the user is not
|
</varlistentry>
|
||||||
prompted for it.</para>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--prompt</option></term>
|
<term><option>--prompt</option></term>
|
||||||
|
|
||||||
<para>Query the user for locale,
|
<listitem><para>Query the user for locale, timezone, hostname
|
||||||
timezone, hostname and root
|
and root password. This is equivalent to specifying
|
||||||
password. This is equivalent to
|
<option>--prompt-locale</option>,
|
||||||
specifying
|
<option>--prompt-timezone</option>,
|
||||||
<option>--prompt-locale</option>,
|
<option>--prompt-hostname</option>,
|
||||||
<option>--prompt-timezone</option>,
|
<option>--prompt-root-password</option> in combination.</para>
|
||||||
<option>--prompt-hostname</option>,
|
</listitem>
|
||||||
<option>--prompt-root-password</option>
|
</varlistentry>
|
||||||
in combination.</para>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--copy-locale</option></term>
|
<term><option>--copy-locale</option></term>
|
||||||
<term><option>--copy-timezone</option></term>
|
<term><option>--copy-timezone</option></term>
|
||||||
<term><option>--copy-root-password</option></term>
|
<term><option>--copy-root-password</option></term>
|
||||||
|
|
||||||
<para>Copy a specific basic setting
|
<listitem><para>Copy a specific basic setting from the host.
|
||||||
from the host. This only works in
|
This only works in combination with <option>--root=</option>
|
||||||
combination with
|
(see above).</para></listitem>
|
||||||
<option>--root=</option> (see
|
</varlistentry>
|
||||||
above).</para>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--copy</option></term>
|
<term><option>--copy</option></term>
|
||||||
|
|
||||||
<para>Copy locale, time zone and root
|
<listitem><para>Copy locale, time zone and root password from
|
||||||
password from the host. This is
|
the host. This is equivalent to specifying
|
||||||
equivalent to specifying
|
<option>--copy-locale</option>,
|
||||||
<option>--copy-locale</option>,
|
<option>--copy-timezone</option>,
|
||||||
<option>--copy-timezone</option>,
|
<option>--copy-root-password</option> in combination.</para>
|
||||||
<option>--copy-root-password</option>
|
</listitem>
|
||||||
in combination.</para>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--setup-machine-id</option></term>
|
<term><option>--setup-machine-id</option></term>
|
||||||
|
|
||||||
<para>Initialize the system's machine
|
<listitem><para>Initialize the system's machine ID to a random
|
||||||
ID to a random ID. This only works in
|
ID. This only works in combination with
|
||||||
combination with
|
<option>--root=</option>.</para></listitem>
|
||||||
<option>--root=</option>.</para>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>localtime</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>timedatectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+100
-116
@@ -21,137 +21,121 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-fsck@.service">
|
<refentry id="systemd-fsck@.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-fsck@.service</title>
|
<title>systemd-fsck@.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-fsck@.service</refentrytitle>
|
<refentrytitle>systemd-fsck@.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-fsck@.service</refname>
|
<refname>systemd-fsck@.service</refname>
|
||||||
<refname>systemd-fsck-root.service</refname>
|
<refname>systemd-fsck-root.service</refname>
|
||||||
<refname>systemd-fsck</refname>
|
<refname>systemd-fsck</refname>
|
||||||
<refpurpose>File system checker logic</refpurpose>
|
<refpurpose>File system checker logic</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-fsck@.service</filename></para>
|
<para><filename>systemd-fsck@.service</filename></para>
|
||||||
<para><filename>systemd-fsck-root.service</filename></para>
|
<para><filename>systemd-fsck-root.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-fsck@.service</filename> and
|
<para><filename>systemd-fsck@.service</filename> and
|
||||||
<filename>systemd-fsck-root.service</filename> are
|
<filename>systemd-fsck-root.service</filename> are services
|
||||||
services responsible for file system checks. They are
|
responsible for file system checks. They are instantiated for each
|
||||||
instantiated for each device that is configured for
|
device that is configured for file system checking.
|
||||||
file system checking.
|
<filename>systemd-fsck-root.service</filename> is responsible for
|
||||||
<filename>systemd-fsck-root.service</filename> is
|
file system checks on the root file system, but in only if the
|
||||||
responsible for file system checks on the root file
|
root filesystem wasn't checked in the initramfs.
|
||||||
system, but in only if the root filesystem wasn't
|
<filename>systemd-fsck@.service</filename> is used for all other
|
||||||
checked in the initramfs.
|
file systems and for the root file system in the initramfs.</para>
|
||||||
<filename>systemd-fsck@.service</filename> is used for
|
|
||||||
all other file systems and for the root file system in
|
|
||||||
the initramfs.</para>
|
|
||||||
|
|
||||||
<para>Those services are started at boot if
|
<para>Those services are started at boot if
|
||||||
<option>passno</option> in
|
<option>passno</option> in <filename>/etc/fstab</filename> for the
|
||||||
<filename>/etc/fstab</filename> for the file system is
|
file system is set to a value greater than zero. The file system
|
||||||
set to a value greater than zero. The file system
|
check for root is performed before the other file systems. Other
|
||||||
check for root is performed before the other file
|
file systems may be checked in parallel, except when they are one
|
||||||
systems. Other file systems may be checked in
|
the same rotating disk.</para>
|
||||||
parallel, except when they are one the same rotating
|
|
||||||
disk.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-fsck</filename> does not know
|
<para><filename>systemd-fsck</filename> does not know any details
|
||||||
any details about specific filesystems, and simply
|
about specific filesystems, and simply executes file system
|
||||||
executes file system checkers specific to each
|
checkers specific to each filesystem type
|
||||||
filesystem type (<filename>/sbin/fsck.*</filename>).
|
(<filename>/sbin/fsck.*</filename>). This helper will decide if
|
||||||
This helper will decide if the filesystem should
|
the filesystem should actually be checked based on the time since
|
||||||
actually be checked based on the time since last
|
last check, number of mounts, unclean unmount, etc.</para>
|
||||||
check, number of mounts, unclean unmount, etc.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-fsck</filename> will forward
|
<para><filename>systemd-fsck</filename> will forward file system
|
||||||
file system checking progress to the console. If a
|
checking progress to the console. If a file system check fails for
|
||||||
file system check fails for a service without
|
a service without <option>nofail</option>, emergency mode is
|
||||||
<option>nofail</option>, emergency mode is activated,
|
activated, by isolating to
|
||||||
by isolating to
|
<filename>emergency.target</filename>.</para>
|
||||||
<filename>emergency.target</filename>.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para><filename>systemd-fsck</filename> understands
|
<para><filename>systemd-fsck</filename> understands one kernel
|
||||||
one kernel command line parameter:</para>
|
command line parameter:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>fsck.mode=</varname></term>
|
<term><varname>fsck.mode=</varname></term>
|
||||||
|
|
||||||
<listitem><para>One of
|
<listitem><para>One of <literal>auto</literal>,
|
||||||
<literal>auto</literal>,
|
<literal>force</literal>, <literal>skip</literal>. Controls
|
||||||
<literal>force</literal>,
|
the mode of operation. The default is <literal>auto</literal>,
|
||||||
<literal>skip</literal>. Controls the
|
and ensures that file system checks are done when the file
|
||||||
mode of operation. The default is
|
system checker deems them necessary. <literal>force</literal>
|
||||||
<literal>auto</literal>, and ensures
|
unconditionally results in full file system checks.
|
||||||
that file system checks are done when
|
<literal>skip</literal> skips any file system
|
||||||
the file system checker deems them
|
checks.</para></listitem>
|
||||||
necessary. <literal>force</literal>
|
</varlistentry>
|
||||||
unconditionally results in full file
|
|
||||||
system checks. <literal>skip</literal>
|
|
||||||
skips any file system
|
|
||||||
checks.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>fsck.repair=</varname></term>
|
<term><varname>fsck.repair=</varname></term>
|
||||||
|
|
||||||
<listitem><para>One of
|
<listitem><para>One of <literal>preen</literal>,
|
||||||
<literal>preen</literal>,
|
<literal>yes</literal>, <literal>no</literal>. Controls the
|
||||||
<literal>yes</literal>,
|
mode of operation. The default is <literal> preen</literal>,
|
||||||
<literal>no</literal>. Controls the
|
and will automatically repair problems that can be safely
|
||||||
mode of operation. The default is <literal>
|
fixed. <literal>yes </literal> will answer yes to all
|
||||||
preen</literal>, and will automatically repair
|
questions by fsck and <literal>no</literal> will answer no to
|
||||||
problems that can be safely fixed. <literal>yes
|
all questions. </para></listitem>
|
||||||
</literal> will answer yes to all questions by
|
</varlistentry>
|
||||||
fsck and <literal>no</literal> will answer no to
|
</variablelist>
|
||||||
all questions.
|
</refsect1>
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fsck.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fsck.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>fsck.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+133
-146
@@ -21,178 +21,165 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-fstab-generator">
|
<refentry id="systemd-fstab-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-fstab-generator</title>
|
<title>systemd-fstab-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-fstab-generator</refentrytitle>
|
<refentrytitle>systemd-fstab-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-fstab-generator</refname>
|
<refname>systemd-fstab-generator</refname>
|
||||||
<refpurpose>Unit generator for /etc/fstab</refpurpose>
|
<refpurpose>Unit generator for /etc/fstab</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-fstab-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-fstab-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-fstab-generator</filename> is
|
<para><filename>systemd-fstab-generator</filename> is a generator
|
||||||
a generator that translates
|
that translates <filename>/etc/fstab</filename> (see
|
||||||
<filename>/etc/fstab</filename> (see
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for details) into native systemd units early at boot and when
|
||||||
for details) into native systemd units early at boot
|
configuration of the system manager is reloaded. This will
|
||||||
and when configuration of the system manager is
|
instantiate mount and swap units as necessary.</para>
|
||||||
reloaded. This will instantiate mount and swap units
|
|
||||||
as necessary.</para>
|
|
||||||
|
|
||||||
<para>The <varname>passno</varname> field is treated
|
<para>The <varname>passno</varname> field is treated like a simple
|
||||||
like a simple boolean, and the ordering information is
|
boolean, and the ordering information is discarded. However, if
|
||||||
discarded. However, if the root file system is
|
the root file system is checked, it is checked before all the
|
||||||
checked, it is checked before all the other
|
other file systems.</para>
|
||||||
file systems.</para>
|
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
and
|
and
|
||||||
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for more information about special
|
for more information about special <filename>/etc/fstab</filename>
|
||||||
<filename>/etc/fstab</filename> mount options this
|
mount options this generator understands.</para>
|
||||||
generator understands.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-fstab-generator</filename>
|
<para><filename>systemd-fstab-generator</filename> implements the
|
||||||
implements the <ulink
|
<ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
||||||
specification</ulink>.</para>
|
specification</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para><filename>systemd-fstab-generator</filename> understands
|
<para><filename>systemd-fstab-generator</filename> understands the
|
||||||
the following kernel command line parameters:</para>
|
following kernel command line parameters:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>fstab=</varname></term>
|
<term><varname>fstab=</varname></term>
|
||||||
<term><varname>rd.fstab=</varname></term>
|
<term><varname>rd.fstab=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a boolean
|
<listitem><para>Takes a boolean argument. Defaults to
|
||||||
argument. Defaults to
|
<literal>yes</literal>. If <literal>no</literal>, causes the
|
||||||
<literal>yes</literal>. If
|
generator to ignore any mounts or swaps configured in
|
||||||
<literal>no</literal>, causes the
|
<filename>/etc/fstab</filename>. <varname>rd.fstab=</varname>
|
||||||
generator to ignore any mounts or swaps
|
is honored only by initial RAM disk (initrd) while
|
||||||
configured in
|
<varname>fstab=</varname> is honored by both the main system
|
||||||
<filename>/etc/fstab</filename>. <varname>rd.fstab=</varname>
|
and the initrd.</para></listitem>
|
||||||
is honored only by initial RAM disk
|
</varlistentry>
|
||||||
(initrd) while
|
<varlistentry>
|
||||||
<varname>fstab=</varname> is
|
<term><varname>root=</varname></term>
|
||||||
honored by both the main system and
|
|
||||||
the initrd.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><varname>root=</varname></term>
|
|
||||||
|
|
||||||
<listitem><para>Takes the root filesystem to mount
|
<listitem><para>Takes the root filesystem to mount in the
|
||||||
in the initrd.
|
initrd. <varname>root=</varname> is honored by the
|
||||||
<varname>root=</varname> is
|
initrd.</para></listitem>
|
||||||
honored by the initrd.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><varname>rootfstype=</varname></term>
|
||||||
<term><varname>rootfstype=</varname></term>
|
|
||||||
|
|
||||||
<listitem><para>Takes the root filesystem type that
|
<listitem><para>Takes the root filesystem type that will be
|
||||||
will be passed to the mount command.
|
passed to the mount command. <varname>rootfstype=</varname> is
|
||||||
<varname>rootfstype=</varname> is
|
honored by the initrd.</para></listitem>
|
||||||
honored by the initrd.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><varname>rootflags=</varname></term>
|
||||||
<term><varname>rootflags=</varname></term>
|
|
||||||
|
|
||||||
<listitem><para>Takes the root filesystem mount options
|
<listitem><para>Takes the root filesystem mount options to
|
||||||
to use. <varname>rootflags=</varname> is
|
use. <varname>rootflags=</varname> is honored by the
|
||||||
honored by the initrd.</para></listitem>
|
initrd.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>mount.usr=</varname></term>
|
<term><varname>mount.usr=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes the <filename>/usr</filename>
|
<listitem><para>Takes the <filename>/usr</filename> filesystem
|
||||||
filesystem to be mounted by the initrd. If
|
to be mounted by the initrd. If
|
||||||
<varname>mount.usrfstype=</varname> or
|
<varname>mount.usrfstype=</varname> or
|
||||||
<varname>mount.usrflags=</varname> is set, then
|
<varname>mount.usrflags=</varname> is set, then
|
||||||
<varname>mount.usr=</varname> will default to the value set in
|
<varname>mount.usr=</varname> will default to the value set in
|
||||||
<varname>root=</varname>.</para>
|
<varname>root=</varname>.</para>
|
||||||
|
|
||||||
<para>Otherwise this parameter defaults to the
|
<para>Otherwise this parameter defaults to the
|
||||||
<filename>/usr</filename> entry
|
<filename>/usr</filename> entry found in
|
||||||
found in <filename>/etc/fstab</filename> on the root
|
<filename>/etc/fstab</filename> on the root filesystem.</para>
|
||||||
filesystem.</para>
|
|
||||||
|
|
||||||
<para><varname>mount.usr=</varname> is honored by the initrd.
|
<para><varname>mount.usr=</varname> is honored by the initrd.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>mount.usrfstype=</varname></term>
|
<term><varname>mount.usrfstype=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes the <filename>/usr</filename>
|
<listitem><para>Takes the <filename>/usr</filename> filesystem
|
||||||
filesystem type that will be passed to the mount
|
type that will be passed to the mount command. If
|
||||||
command. If <varname>mount.usr=</varname> or
|
<varname>mount.usr=</varname> or
|
||||||
<varname>mount.usrflags=</varname> is set, then
|
<varname>mount.usrflags=</varname> is set, then
|
||||||
<varname>mount.usrfstype=</varname> will default to the value set in
|
<varname>mount.usrfstype=</varname> will default to the value
|
||||||
<varname>rootfstype=</varname>.</para>
|
set in <varname>rootfstype=</varname>.</para>
|
||||||
|
|
||||||
<para>Otherwise this value will be read from the
|
<para>Otherwise this value will be read from the
|
||||||
<filename>/usr</filename> entry in
|
<filename>/usr</filename> entry in
|
||||||
<filename>/etc/fstab</filename> on the root filesystem.</para>
|
<filename>/etc/fstab</filename> on the root filesystem.</para>
|
||||||
|
|
||||||
<para><varname>mount.usrfstype=</varname> is
|
<para><varname>mount.usrfstype=</varname> is honored by the
|
||||||
honored by the initrd.</para></listitem>
|
initrd.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>mount.usrflags=</varname></term>
|
<term><varname>mount.usrflags=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes the <filename>/usr</filename>
|
<listitem><para>Takes the <filename>/usr</filename> filesystem
|
||||||
filesystem mount options to use. If
|
mount options to use. If <varname>mount.usr=</varname> or
|
||||||
<varname>mount.usr=</varname> or
|
<varname>mount.usrfstype=</varname> is set, then
|
||||||
<varname>mount.usrfstype=</varname> is set, then
|
<varname>mount.usrflages=</varname> will default to the value
|
||||||
<varname>mount.usrflages=</varname> will default to the value set in
|
set in <varname>rootflags=</varname>.</para>
|
||||||
<varname>rootflags=</varname>.</para>
|
|
||||||
|
|
||||||
<para>Otherwise this value will be read from the
|
<para>Otherwise this value will be read from the
|
||||||
<filename>/usr</filename> entry in
|
<filename>/usr</filename> entry in
|
||||||
<filename>/etc/fstab</filename> on the root filesystem.</para>
|
<filename>/etc/fstab</filename> on the root filesystem.</para>
|
||||||
|
|
||||||
<para><varname>mount.usrflags=</varname> is
|
<para><varname>mount.usrflags=</varname> is honored by the
|
||||||
honored by the initrd.</para></listitem>
|
initrd.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,81 +21,77 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-getty-generator">
|
<refentry id="systemd-getty-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-getty-generator</title>
|
<title>systemd-getty-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-getty-generator</refentrytitle>
|
<refentrytitle>systemd-getty-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-getty-generator</refname>
|
<refname>systemd-getty-generator</refname>
|
||||||
<refpurpose>Generator for enabling getty instances on
|
<refpurpose>Generator for enabling getty instances on the
|
||||||
the console</refpurpose>
|
console</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-getty-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-getty-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-getty-generator</filename> is
|
<para><filename>systemd-getty-generator</filename> is a generator
|
||||||
a generator that automatically instantiates
|
that automatically instantiates
|
||||||
<filename>serial-getty@.service</filename> on the
|
<filename>serial-getty@.service</filename> on the kernel console
|
||||||
kernel console <filename>/dev/console</filename> if
|
<filename>/dev/console</filename> if that is not directed to the
|
||||||
that is not directed to the virtual console
|
virtual console subsystem. It will also instantiate
|
||||||
subsystem. It will also instantiate
|
<filename>serial-getty@.service</filename> instances for
|
||||||
<filename>serial-getty@.service</filename> instances
|
virtualizer consoles, if execution in a virtualized environment is
|
||||||
for virtualizer consoles, if execution in a
|
detected. Finally, it will instantiate
|
||||||
virtualized environment is detected. Finally, it will
|
<filename>container-getty@.service</filename> instances for
|
||||||
instantiate
|
additional container pseudo TTYs as requested by the container
|
||||||
<filename>container-getty@.service</filename>
|
manager (see <ulink
|
||||||
instances for additional container pseudo TTYs as
|
url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/"><filename>Container
|
||||||
requested by the container manager (see <ulink
|
Interface</filename></ulink>). This should ensure that the user is
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/"><filename>Container Interface</filename></ulink>). This
|
shown a login prompt at the right place, regardless of which
|
||||||
should ensure that the user is shown a login prompt at
|
environment the system is started in. For example, it is
|
||||||
the right place, regardless of which environment the
|
sufficient to redirect the kernel console with a kernel command
|
||||||
system is started in. For example, it is sufficient to
|
line argument such as <varname>console=</varname> to get both
|
||||||
redirect the kernel console with a kernel command line
|
kernel messages and a getty prompt on a serial TTY. See <ulink
|
||||||
argument such as <varname>console=</varname> to get
|
url="https://www.kernel.org/doc/Documentation/kernel-parameters.txt"><filename>kernel-parameters.txt</filename></ulink>
|
||||||
both kernel messages and a getty prompt on a serial
|
for more information on the <varname>console=</varname> kernel
|
||||||
TTY. See <ulink
|
parameter.</para>
|
||||||
url="https://www.kernel.org/doc/Documentation/kernel-parameters.txt"><filename>kernel-parameters.txt</filename></ulink>
|
|
||||||
for more information on the
|
|
||||||
<varname>console=</varname> kernel parameter.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-getty-generator</filename>
|
<para><filename>systemd-getty-generator</filename> implements the
|
||||||
implements the <ulink
|
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">generator
|
specification</ulink>.</para>
|
||||||
specification</ulink>.</para>
|
|
||||||
|
|
||||||
<para>Further information about configuration of
|
<para>Further information about configuration of gettys you may
|
||||||
gettys you may find in <ulink
|
find in
|
||||||
url="http://0pointer.de/blog/projects/serial-console.html">systemd
|
<ulink url="http://0pointer.de/blog/projects/serial-console.html">systemd
|
||||||
for Administrators, Part XVI: Gettys on Serial
|
for Administrators, Part XVI: Gettys on Serial Consoles (and
|
||||||
Consoles (and Elsewhere)</ulink>.</para>
|
Elsewhere)</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry project='man-pages'><refentrytitle>agetty</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry project='man-pages'><refentrytitle>agetty</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+140
-146
@@ -21,166 +21,160 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-gpt-auto-generator">
|
<refentry id="systemd-gpt-auto-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-gpt-auto-generator</title>
|
<title>systemd-gpt-auto-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-gpt-auto-generator</refentrytitle>
|
<refentrytitle>systemd-gpt-auto-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-gpt-auto-generator</refname>
|
<refname>systemd-gpt-auto-generator</refname>
|
||||||
<refpurpose>Generator for automatically discovering
|
<refpurpose>Generator for automatically discovering
|
||||||
and mounting root, <filename>/home</filename> and
|
and mounting root, <filename>/home</filename> and
|
||||||
<filename>/srv</filename> partitions, as well as
|
<filename>/srv</filename> partitions, as well as
|
||||||
discovering and enabling swap partitions, based on GPT
|
discovering and enabling swap partitions, based on GPT
|
||||||
partition type GUIDs.</refpurpose>
|
partition type GUIDs.</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-gpt-auto-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-gpt-auto-generator</filename>
|
<para><filename>systemd-gpt-auto-generator</filename> is a unit
|
||||||
is a unit generator that automatically discovers root,
|
generator that automatically discovers root,
|
||||||
<filename>/home</filename>, <filename>/srv</filename>
|
<filename>/home</filename>, <filename>/srv</filename> and swap
|
||||||
and swap partitions and creates mount and swap units
|
partitions and creates mount and swap units for them, based on the
|
||||||
for them, based on the partition type GUIDs of
|
partition type GUIDs of GUID partition tables (GPT). It implements
|
||||||
GUID partition tables (GPT). It implements the <ulink
|
the
|
||||||
url="http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable
|
<ulink url="http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/">Discoverable
|
||||||
Partitions Specification</ulink>. Note that this
|
Partitions Specification</ulink>. Note that this generator has no
|
||||||
generator has no effect on non-GPT systems, on systems
|
effect on non-GPT systems, on systems where the units are
|
||||||
where the units are explicitly configured (for
|
explicitly configured (for example, listed in
|
||||||
example, listed in
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
|
or where the mount points are non-empty.</para>
|
||||||
or where the mount points are non-empty.</para>
|
|
||||||
|
|
||||||
<para>This generator will only look for root
|
<para>This generator will only look for root partitions on the
|
||||||
partitions on the same physical disk the EFI System
|
same physical disk the EFI System Partition (ESP) is located on.
|
||||||
Partition (ESP) is located on. It will only look for
|
It will only look for the other partitions on the same physical
|
||||||
the other partitions on the same physical disk the
|
disk the root file system is located on. These partitions will not
|
||||||
root file system is located on. These partitions will
|
be searched on systems where the root file system is distributed
|
||||||
not be searched on systems where the root file system is
|
on multiple disks, for example via btrfs RAID.</para>
|
||||||
distributed on multiple disks, for example via btrfs
|
|
||||||
RAID.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-gpt-auto-generator</filename>
|
<para><filename>systemd-gpt-auto-generator</filename> is useful
|
||||||
is useful for centralizing file system configuration
|
for centralizing file system configuration in the partition table
|
||||||
in the partition table and making manual configuration
|
and making manual configuration in <filename>/etc/fstab</filename>
|
||||||
in <filename>/etc/fstab</filename> or suchlike
|
or suchlike unnecessary.</para>
|
||||||
unnecessary.</para>
|
|
||||||
|
|
||||||
<para>This generator looks for the partitions based on
|
<para>This generator looks for the partitions based on their
|
||||||
their partition type GUID. The following partition
|
partition type GUID. The following partition type GUIDs are
|
||||||
type GUIDs are identified:</para>
|
identified:</para>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<title>Partition Type GUIDs</title>
|
<title>Partition Type GUIDs</title>
|
||||||
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
|
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
|
||||||
<colspec colname="guid" />
|
<colspec colname="guid" />
|
||||||
<colspec colname="name" />
|
<colspec colname="name" />
|
||||||
<colspec colname="explanation" />
|
<colspec colname="explanation" />
|
||||||
<thead>
|
<thead>
|
||||||
<row>
|
<row>
|
||||||
<entry>Partition Type GUID</entry>
|
<entry>Partition Type GUID</entry>
|
||||||
<entry>Name</entry>
|
<entry>Name</entry>
|
||||||
<entry>Explanation</entry>
|
<entry>Explanation</entry>
|
||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<row>
|
<row>
|
||||||
<entry>44479540-f297-41b2-9af7-d131d5f0458a</entry>
|
<entry>44479540-f297-41b2-9af7-d131d5f0458a</entry>
|
||||||
<entry><filename>Root Partition (x86)</filename></entry>
|
<entry><filename>Root Partition (x86)</filename></entry>
|
||||||
<entry>On 32-bit x86 systems, the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
<entry>On 32-bit x86 systems, the first x86 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</entry>
|
<entry>4f68bce3-e8cd-4db1-96e7-fbcaf984b709</entry>
|
||||||
<entry><filename>Root Partition (x86-64)</filename></entry>
|
<entry><filename>Root Partition (x86-64)</filename></entry>
|
||||||
<entry>On 64-bit x86 systems, the first x86-64 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
<entry>On 64-bit x86 systems, the first x86-64 root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>69dad710-2ce4-4e3c-b16c-21a1d49abed3</entry>
|
<entry>69dad710-2ce4-4e3c-b16c-21a1d49abed3</entry>
|
||||||
<entry><filename>Root Partition (32-bit ARM)</filename></entry>
|
<entry><filename>Root Partition (32-bit ARM)</filename></entry>
|
||||||
<entry>On 32-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
<entry>On 32-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>b921b045-1df0-41c3-af44-4c6f280d3fae</entry>
|
<entry>b921b045-1df0-41c3-af44-4c6f280d3fae</entry>
|
||||||
<entry><filename>Root Partition (64-bit ARM)</filename></entry>
|
<entry><filename>Root Partition (64-bit ARM)</filename></entry>
|
||||||
<entry>On 64-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
<entry>On 64-bit ARM systems, the first ARM root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
|
<entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
|
||||||
<entry>Home Partition</entry>
|
<entry>Home Partition</entry>
|
||||||
<entry>The first home partition on the disk the root partition is located on is mounted to <filename>/home</filename>.</entry>
|
<entry>The first home partition on the disk the root partition is located on is mounted to <filename>/home</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>3b8f8425-20e0-4f3b-907f-1a25a76f98e8</entry>
|
<entry>3b8f8425-20e0-4f3b-907f-1a25a76f98e8</entry>
|
||||||
<entry>Server Data Partition</entry>
|
<entry>Server Data Partition</entry>
|
||||||
<entry>The first server data partition on the disk the root partition is located on is mounted to <filename>/srv</filename>.</entry>
|
<entry>The first server data partition on the disk the root partition is located on is mounted to <filename>/srv</filename>.</entry>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<entry>0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</entry>
|
<entry>0657fd6d-a4ab-43c4-84e5-0933c84b4f4f</entry>
|
||||||
<entry>Swap</entry>
|
<entry>Swap</entry>
|
||||||
<entry>All swap partitions located on the disk the root partition is located on are enabled.</entry>
|
<entry>All swap partitions located on the disk the root partition is located on are enabled.</entry>
|
||||||
</row>
|
</row>
|
||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>The <filename>/home</filename> and
|
<para>The <filename>/home</filename> and <filename>/srv</filename>
|
||||||
<filename>/srv</filename> partitions may be encrypted
|
partitions may be encrypted in LUKS format. In this case a device
|
||||||
in LUKS format. In this case a device mapper device is
|
mapper device is set up under the names
|
||||||
set up under the names
|
<filename>/dev/mapper/home</filename> and
|
||||||
<filename>/dev/mapper/home</filename> and
|
<filename>/dev/mapper/srv</filename>. Note that this might create
|
||||||
<filename>/dev/mapper/srv</filename>. Note that this
|
conflicts if the same partition is listed in
|
||||||
might create conflicts if the same partition is listed
|
<filename>/etc/crypttab</filename> with a different device mapper
|
||||||
in <filename>/etc/crypttab</filename> with a different
|
device name.</para>
|
||||||
device mapper device name.</para>
|
|
||||||
|
|
||||||
<para>Also note that
|
<para>Also note that
|
||||||
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
will mount the EFI System Partition (ESP) to
|
will mount the EFI System Partition (ESP) to
|
||||||
<filename>/boot</filename> if not otherwise mounted.</para>
|
<filename>/boot</filename> if not otherwise mounted.</para>
|
||||||
|
|
||||||
<para>When using this generator in conjunction with
|
<para>When using this generator in conjunction with btrfs file
|
||||||
btrfs file systems, make sure to set the correct
|
systems, make sure to set the correct default subvolumes on them,
|
||||||
default subvolumes on them, using <command>btrfs
|
using <command>btrfs subvolume set-default</command>.</para>
|
||||||
subvolume set-default</command>.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-gpt-auto-generator</filename>
|
<para><filename>systemd-gpt-auto-generator</filename> implements
|
||||||
implements the <ulink
|
the
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generator
|
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/Generators">Generator
|
||||||
Specification</ulink>.</para>
|
Specification</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,103 +23,96 @@
|
|||||||
|
|
||||||
<refentry id="systemd-halt.service">
|
<refentry id="systemd-halt.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-halt.service</title>
|
<title>systemd-halt.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-halt.service</refentrytitle>
|
<refentrytitle>systemd-halt.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-halt.service</refname>
|
<refname>systemd-halt.service</refname>
|
||||||
<refname>systemd-poweroff.service</refname>
|
<refname>systemd-poweroff.service</refname>
|
||||||
<refname>systemd-reboot.service</refname>
|
<refname>systemd-reboot.service</refname>
|
||||||
<refname>systemd-kexec.service</refname>
|
<refname>systemd-kexec.service</refname>
|
||||||
<refname>systemd-shutdown</refname>
|
<refname>systemd-shutdown</refname>
|
||||||
<refpurpose>System shutdown logic</refpurpose>
|
<refpurpose>System shutdown logic</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-halt.service</filename></para>
|
<para><filename>systemd-halt.service</filename></para>
|
||||||
<para><filename>systemd-poweroff.service</filename></para>
|
<para><filename>systemd-poweroff.service</filename></para>
|
||||||
<para><filename>systemd-reboot.service</filename></para>
|
<para><filename>systemd-reboot.service</filename></para>
|
||||||
<para><filename>systemd-kexec.service</filename></para>
|
<para><filename>systemd-kexec.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-shutdown</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-shutdown</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-halt.service</filename> is a
|
<para><filename>systemd-halt.service</filename> is a system
|
||||||
system service that is pulled in by
|
service that is pulled in by <filename>halt.target</filename> and
|
||||||
<filename>halt.target</filename> and is responsible
|
is responsible for the actual system halt. Similarly,
|
||||||
for the actual system halt. Similarly,
|
<filename>systemd-poweroff.service</filename> is pulled in by
|
||||||
<filename>systemd-poweroff.service</filename> is
|
<filename>poweroff.target</filename>,
|
||||||
pulled in by <filename>poweroff.target</filename>,
|
<filename>systemd-reboot.service</filename> by
|
||||||
<filename>systemd-reboot.service</filename> by
|
<filename>reboot.target</filename> and
|
||||||
<filename>reboot.target</filename> and
|
<filename>systemd-kexec.service</filename> by
|
||||||
<filename>systemd-kexec.service</filename> by
|
<filename>kexec.target</filename> to execute the respective
|
||||||
<filename>kexec.target</filename> to execute the
|
actions.</para>
|
||||||
respective actions.</para>
|
|
||||||
|
|
||||||
<para>When these services are run, they ensure that PID
|
<para>When these services are run, they ensure that PID 1 is
|
||||||
1 is replaced by the
|
replaced by the
|
||||||
<filename>/usr/lib/systemd/systemd-shutdown</filename>
|
<filename>/usr/lib/systemd/systemd-shutdown</filename> tool which
|
||||||
tool which is then responsible for the actual
|
is then responsible for the actual shutdown. Before shutting down,
|
||||||
shutdown. Before shutting down, this binary will try to
|
this binary will try to unmount all remaining file systems,
|
||||||
unmount all remaining file systems, disable all
|
disable all remaining swap devices, detach all remaining storage
|
||||||
remaining swap devices, detach all remaining storage
|
devices and kill all remaining processes.</para>
|
||||||
devices and kill all remaining processes.</para>
|
|
||||||
|
|
||||||
<para>It is necessary to have this code in a separate binary
|
<para>It is necessary to have this code in a separate binary
|
||||||
because otherwise rebooting after an upgrade might be broken —
|
because otherwise rebooting after an upgrade might be broken — the
|
||||||
the running PID 1 could still depend on libraries which are not
|
running PID 1 could still depend on libraries which are not
|
||||||
available any more, thus keeping the file system busy, which
|
available any more, thus keeping the file system busy, which then
|
||||||
then cannot be re-mounted read-only.</para>
|
cannot be re-mounted read-only.</para>
|
||||||
|
|
||||||
<para>Immediately before executing the actual system
|
<para>Immediately before executing the actual system
|
||||||
halt/poweroff/reboot/kexec
|
halt/poweroff/reboot/kexec <filename>systemd-shutdown</filename>
|
||||||
<filename>systemd-shutdown</filename> will run all
|
will run all executables in
|
||||||
executables in
|
<filename>/usr/lib/systemd/system-shutdown/</filename> and pass
|
||||||
<filename>/usr/lib/systemd/system-shutdown/</filename>
|
one arguments to them: either <literal>halt</literal>,
|
||||||
and pass one arguments to them: either
|
<literal>poweroff</literal>, <literal>reboot</literal> or
|
||||||
<literal>halt</literal>,
|
<literal>kexec</literal>, depending on the chosen action. All
|
||||||
<literal>poweroff</literal>,
|
executables in this directory are executed in parallel, and
|
||||||
<literal>reboot</literal> or
|
execution of the action is not continued before all executables
|
||||||
<literal>kexec</literal>, depending on the chosen
|
finished.</para>
|
||||||
action. All executables in this directory are executed
|
|
||||||
in parallel, and execution of the action is not
|
|
||||||
continued before all executables finished.</para>
|
|
||||||
|
|
||||||
<para>Note that
|
<para>Note that <filename>systemd-halt.service</filename> (and the
|
||||||
<filename>systemd-halt.service</filename> (and the
|
related units) should never be executed directly. Instead, trigger
|
||||||
related units) should never be executed
|
system shutdown with a command such as <literal>systemctl
|
||||||
directly. Instead, trigger system shutdown with a
|
halt</literal> or suchlike.</para>
|
||||||
command such as <literal>systemctl halt</literal> or
|
</refsect1>
|
||||||
suchlike.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-suspend.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,73 +21,73 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-hibernate-resume-generator">
|
<refentry id="systemd-hibernate-resume-generator">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-hibernate-resume-generator</title>
|
<title>systemd-hibernate-resume-generator</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Ivan</firstname>
|
<firstname>Ivan</firstname>
|
||||||
<surname>Shapovalov</surname>
|
<surname>Shapovalov</surname>
|
||||||
<email>intelfx100@gmail.com</email>
|
<email>intelfx100@gmail.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-hibernate-resume-generator</refentrytitle>
|
<refentrytitle>systemd-hibernate-resume-generator</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-hibernate-resume-generator</refname>
|
<refname>systemd-hibernate-resume-generator</refname>
|
||||||
<refpurpose>Unit generator for resume= kernel parameter</refpurpose>
|
<refpurpose>Unit generator for resume= kernel parameter</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</filename></para>
|
<para><filename>/usr/lib/systemd/system-generators/systemd-hibernate-resume-generator</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-hibernate-resume-generator</filename> is
|
<para><filename>systemd-hibernate-resume-generator</filename> is a
|
||||||
a generator that instantiates
|
generator that instantiates
|
||||||
<citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
unit according to the value of <option>resume=</option>
|
unit according to the value of <option>resume=</option> parameter
|
||||||
parameter specified on the kernel command line.</para>
|
specified on the kernel command line.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para><filename>systemd-hibernate-resume-generator</filename> understands
|
<para><filename>systemd-hibernate-resume-generator</filename>
|
||||||
the following kernel command line parameters:</para>
|
understands the following kernel command line parameters:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>resume=</varname></term>
|
<term><varname>resume=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Takes a path to the resume
|
<listitem><para>Takes a path to the resume device. Both
|
||||||
device. Both persistent block device paths like
|
persistent block device paths like
|
||||||
<filename>/dev/disk/by-foo/bar</filename> and
|
<filename>/dev/disk/by-foo/bar</filename> and
|
||||||
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-style
|
<citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>-style
|
||||||
specifiers like <literal>FOO=bar</literal>
|
specifiers like <literal>FOO=bar</literal> are
|
||||||
are supported.</para></listitem>
|
supported.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-hibernate-resume@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,62 +21,61 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-hibernate-resume@.service">
|
<refentry id="systemd-hibernate-resume@.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-hibernate-resume@.service</title>
|
<title>systemd-hibernate-resume@.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Ivan</firstname>
|
<firstname>Ivan</firstname>
|
||||||
<surname>Shapovalov</surname>
|
<surname>Shapovalov</surname>
|
||||||
<email>intelfx100@gmail.com</email>
|
<email>intelfx100@gmail.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-hibernate-resume@.service</refentrytitle>
|
<refentrytitle>systemd-hibernate-resume@.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-hibernate-resume@.service</refname>
|
<refname>systemd-hibernate-resume@.service</refname>
|
||||||
<refname>systemd-hibernate-resume</refname>
|
<refname>systemd-hibernate-resume</refname>
|
||||||
<refpurpose>Resume from hibernation</refpurpose>
|
<refpurpose>Resume from hibernation</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-hibernate-resume@.service</filename></para>
|
<para><filename>systemd-hibernate-resume@.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-hibernate-resume</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-hibernate-resume@.service</filename>
|
<para><filename>systemd-hibernate-resume@.service</filename>
|
||||||
initiates the resume from hibernation. It is
|
initiates the resume from hibernation. It is instantiated with the
|
||||||
instantiated with the device to resume from as the
|
device to resume from as the template argument.</para>
|
||||||
template argument.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-hibernate-resume</filename> only supports
|
<para><filename>systemd-hibernate-resume</filename> only supports
|
||||||
the in-kernel hibernation implementation, known as
|
the in-kernel hibernation implementation, known as
|
||||||
<ulink url="https://www.kernel.org/doc/Documentation/power/swsusp.txt">swsusp</ulink>.
|
<ulink url="https://www.kernel.org/doc/Documentation/power/swsusp.txt">swsusp</ulink>.
|
||||||
Internally, it works by writing the major:minor of specified
|
Internally, it works by writing the major:minor of specified
|
||||||
device node to <filename>/sys/power/resume</filename>.</para>
|
device node to <filename>/sys/power/resume</filename>.</para>
|
||||||
|
|
||||||
<para>Failing to initiate a resume is not an error condition.
|
<para>Failing to initiate a resume is not an error condition. It
|
||||||
It may mean that there was no resume image (e. g. if the
|
may mean that there was no resume image (e. g. if the system has
|
||||||
system has been simply powered off and not hibernated). In
|
been simply powered off and not hibernated). In such case, the
|
||||||
such case, the boot is ordinarily continued.</para>
|
boot is ordinarily continued.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-hibernate-resume-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,65 +23,63 @@
|
|||||||
|
|
||||||
<refentry id="systemd-hostnamed.service" conditional='ENABLE_HOSTNAMED'>
|
<refentry id="systemd-hostnamed.service" conditional='ENABLE_HOSTNAMED'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-hostnamed.service</title>
|
<title>systemd-hostnamed.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-hostnamed.service</refentrytitle>
|
<refentrytitle>systemd-hostnamed.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-hostnamed.service</refname>
|
<refname>systemd-hostnamed.service</refname>
|
||||||
<refname>systemd-hostnamed</refname>
|
<refname>systemd-hostnamed</refname>
|
||||||
<refpurpose>Host name bus mechanism</refpurpose>
|
<refpurpose>Host name bus mechanism</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-hostnamed.service</filename></para>
|
<para><filename>systemd-hostnamed.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-hostnamed</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-hostnamed</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-hostnamed</filename> is a system
|
<para><filename>systemd-hostnamed</filename> is a system service
|
||||||
service that may be used as a mechanism to change the
|
that may be used as a mechanism to change the system's hostname.
|
||||||
system's hostname. <filename>systemd-hostnamed</filename> is
|
<filename>systemd-hostnamed</filename> is automatically activated
|
||||||
automatically activated on request and terminates
|
on request and terminates itself when it is unused.</para>
|
||||||
itself when it is unused.</para>
|
|
||||||
|
|
||||||
<para>The tool
|
<para>The tool
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
is a command line client to this service.</para>
|
is a command line client to this service.</para>
|
||||||
|
|
||||||
<para>See the <ulink
|
<para>See the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/hostnamed">
|
url="http://www.freedesktop.org/wiki/Software/systemd/hostnamed">
|
||||||
developer documentation</ulink> for information about
|
developer documentation</ulink> for information about the APIs
|
||||||
the APIs <filename>systemd-hostnamed</filename>
|
<filename>systemd-hostnamed</filename> provides.</para>
|
||||||
provides.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+123
-140
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,173 +22,156 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-inhibit"
|
<refentry id="systemd-inhibit"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-inhibit</title>
|
<title>systemd-inhibit</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-inhibit</refentrytitle>
|
<refentrytitle>systemd-inhibit</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-inhibit</refname>
|
<refname>systemd-inhibit</refname>
|
||||||
<refpurpose>Execute a program with an inhibition lock taken</refpurpose>
|
<refpurpose>Execute a program with an inhibition lock taken</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-inhibit <arg choice="opt" rep="repeat">OPTIONS</arg> <arg>COMMAND</arg> <arg choice="opt" rep="repeat">ARGUMENTS</arg></command>
|
<command>systemd-inhibit <arg choice="opt" rep="repeat">OPTIONS</arg> <arg>COMMAND</arg> <arg choice="opt" rep="repeat">ARGUMENTS</arg></command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-inhibit <arg choice="opt" rep="repeat">OPTIONS</arg> --list</command>
|
<command>systemd-inhibit <arg choice="opt" rep="repeat">OPTIONS</arg> --list</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-inhibit</command> may be used
|
<para><command>systemd-inhibit</command> may be used to execute a
|
||||||
to execute a program with a shutdown, sleep or idle
|
program with a shutdown, sleep or idle inhibitor lock taken. The
|
||||||
inhibitor lock taken. The lock will be acquired before
|
lock will be acquired before the specified command line is
|
||||||
the specified command line is executed and released
|
executed and released afterwards.</para>
|
||||||
afterwards.</para>
|
|
||||||
|
|
||||||
<para>Inhibitor locks may be used to block or delay
|
<para>Inhibitor locks may be used to block or delay system sleep
|
||||||
system sleep and shutdown requests from the user, as well
|
and shutdown requests from the user, as well as automatic idle
|
||||||
as automatic idle handling of the OS. This is useful
|
handling of the OS. This is useful to avoid system suspends while
|
||||||
to avoid system suspends while an optical disc is
|
an optical disc is being recorded, or similar operations that
|
||||||
being recorded, or similar operations that should not
|
should not be interrupted.</para>
|
||||||
be interrupted.</para>
|
|
||||||
|
|
||||||
<para>For more information see the <ulink
|
<para>For more information see the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor
|
url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor
|
||||||
Lock Developer Documentation</ulink>.</para>
|
Lock Developer Documentation</ulink>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--what=</option></term>
|
<term><option>--what=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes a colon-separated
|
<listitem><para>Takes a colon-separated list of one or more
|
||||||
list of one or more
|
operations to inhibit:
|
||||||
operations to inhibit:
|
<literal>shutdown</literal>,
|
||||||
<literal>shutdown</literal>,
|
<literal>sleep</literal>,
|
||||||
<literal>sleep</literal>,
|
<literal>idle</literal>,
|
||||||
<literal>idle</literal>,
|
<literal>handle-power-key</literal>,
|
||||||
<literal>handle-power-key</literal>,
|
<literal>handle-suspend-key</literal>,
|
||||||
<literal>handle-suspend-key</literal>,
|
<literal>handle-hibernate-key</literal>,
|
||||||
<literal>handle-hibernate-key</literal>,
|
<literal>handle-lid-switch</literal>,
|
||||||
<literal>handle-lid-switch</literal>,
|
for inhibiting reboot/power-off/halt/kexec,
|
||||||
for inhibiting
|
suspending/hibernating, the automatic idle detection, or the
|
||||||
reboot/power-off/halt/kexec,
|
low-level handling of the power/sleep key and the lid switch,
|
||||||
suspending/hibernating, the automatic
|
respectively. If omitted, defaults to
|
||||||
idle detection, or the low-level
|
<literal>idle:sleep:shutdown</literal>.</para></listitem>
|
||||||
handling of the power/sleep key and
|
</varlistentry>
|
||||||
the lid switch, respectively. If omitted,
|
|
||||||
defaults to
|
|
||||||
<literal>idle:sleep:shutdown</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--who=</option></term>
|
<term><option>--who=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes a short,
|
<listitem><para>Takes a short, human-readable descriptive
|
||||||
human-readable descriptive string for the
|
string for the program taking the lock. If not passed,
|
||||||
program taking the lock. If not passed,
|
defaults to the command line string.</para></listitem>
|
||||||
defaults to the command line
|
</varlistentry>
|
||||||
string.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--why=</option></term>
|
<term><option>--why=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes a short,
|
<listitem><para>Takes a short, human-readable descriptive
|
||||||
human-readable descriptive string for the
|
string for the reason for taking the lock. Defaults to
|
||||||
reason for taking the lock. Defaults
|
"Unknown reason".</para></listitem>
|
||||||
to "Unknown reason".</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--mode=</option></term>
|
<term><option>--mode=</option></term>
|
||||||
|
|
||||||
<listitem><para>Takes either
|
<listitem><para>Takes either <literal>block</literal> or
|
||||||
<literal>block</literal> or
|
<literal>delay</literal> and describes how the lock is
|
||||||
<literal>delay</literal> and describes
|
applied. If <literal>block</literal> is used (the default),
|
||||||
how the lock is applied. If
|
the lock prohibits any of the requested operations without
|
||||||
<literal>block</literal> is used (the
|
time limit, and only privileged users may override it. If
|
||||||
default), the lock prohibits any of
|
<literal>delay</literal> is used, the lock can only delay the
|
||||||
the requested operations without time
|
requested operations for a limited time. If the time elapses,
|
||||||
limit, and only privileged users may
|
the lock is ignored and the operation executed. The time limit
|
||||||
override it. If
|
may be specified in
|
||||||
<literal>delay</literal> is used, the
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||||
lock can only delay the requested
|
Note that <literal>delay</literal> is only available for
|
||||||
operations for a limited time. If the
|
<literal>sleep</literal> and
|
||||||
time elapses, the lock is ignored and
|
<literal>shutdown</literal>.</para></listitem>
|
||||||
the operation executed. The time limit
|
</varlistentry>
|
||||||
may be specified in
|
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Note
|
|
||||||
that <literal>delay</literal> is only
|
|
||||||
available for <literal>sleep</literal>
|
|
||||||
and
|
|
||||||
<literal>shutdown</literal>.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--list</option></term>
|
<term><option>--list</option></term>
|
||||||
|
|
||||||
<listitem><para>Lists all active
|
<listitem><para>Lists all active inhibition locks instead of
|
||||||
inhibition locks instead of acquiring
|
acquiring one.</para></listitem>
|
||||||
one.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>Returns the exit status of the executed program.</para>
|
<para>Returns the exit status of the executed program.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<programlisting># systemd-inhibit wodim foobar.iso</programlisting>
|
<programlisting># systemd-inhibit wodim foobar.iso</programlisting>
|
||||||
|
|
||||||
<para>This burns the ISO image
|
<para>This burns the ISO image
|
||||||
<filename>foobar.iso</filename> on a CD using
|
<filename>foobar.iso</filename> on a CD using
|
||||||
<citerefentry project='man-pages'><refentrytitle>wodim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry project='man-pages'><refentrytitle>wodim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
and inhibits system sleeping, shutdown and idle while
|
and inhibits system sleeping, shutdown and idle while
|
||||||
doing so.</para>
|
doing so.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,54 +23,54 @@
|
|||||||
|
|
||||||
<refentry id="systemd-initctl.service">
|
<refentry id="systemd-initctl.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-initctl.service</title>
|
<title>systemd-initctl.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-initctl.service</refentrytitle>
|
<refentrytitle>systemd-initctl.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-initctl.service</refname>
|
<refname>systemd-initctl.service</refname>
|
||||||
<refname>systemd-initctl.socket</refname>
|
<refname>systemd-initctl.socket</refname>
|
||||||
<refname>systemd-initctl</refname>
|
<refname>systemd-initctl</refname>
|
||||||
<refpurpose>/dev/initctl compatibility</refpurpose>
|
<refpurpose>/dev/initctl compatibility</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-initctl.service</filename></para>
|
<para><filename>systemd-initctl.service</filename></para>
|
||||||
<para><filename>systemd-initctl.socket</filename></para>
|
<para><filename>systemd-initctl.socket</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-initctl</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-initctl</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-initctl</filename> is a system
|
<para><filename>systemd-initctl</filename> is a system service
|
||||||
service that implements compatibility with the
|
that implements compatibility with the
|
||||||
<filename>/dev/initctl</filename> FIFO file system
|
<filename>/dev/initctl</filename> FIFO file system object, as
|
||||||
object, as implemented by the SysV init system. <filename>systemd-initctl</filename> is
|
implemented by the SysV init system.
|
||||||
automatically activated on request and terminates
|
<filename>systemd-initctl</filename> is automatically activated on
|
||||||
itself when it is unused.</para>
|
request and terminates itself when it is unused.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
+185
-210
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,253 +23,228 @@
|
|||||||
|
|
||||||
<refentry id="systemd-journald.service">
|
<refentry id="systemd-journald.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-journald.service</title>
|
<title>systemd-journald.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-journald.service</refentrytitle>
|
<refentrytitle>systemd-journald.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-journald.service</refname>
|
<refname>systemd-journald.service</refname>
|
||||||
<refname>systemd-journald.socket</refname>
|
<refname>systemd-journald.socket</refname>
|
||||||
<refname>systemd-journald-dev-log.socket</refname>
|
<refname>systemd-journald-dev-log.socket</refname>
|
||||||
<refname>systemd-journald</refname>
|
<refname>systemd-journald</refname>
|
||||||
<refpurpose>Journal service</refpurpose>
|
<refpurpose>Journal service</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-journald.service</filename></para>
|
<para><filename>systemd-journald.service</filename></para>
|
||||||
<para><filename>systemd-journald.socket</filename></para>
|
<para><filename>systemd-journald.socket</filename></para>
|
||||||
<para><filename>systemd-journald-dev-log.socket</filename></para>
|
<para><filename>systemd-journald-dev-log.socket</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-journald</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-journald</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-journald</filename> is a
|
<para><filename>systemd-journald</filename> is a system service
|
||||||
system service that collects and stores logging data.
|
that collects and stores logging data. It creates and maintains
|
||||||
It creates and maintains structured, indexed journals
|
structured, indexed journals based on logging information that is
|
||||||
based on logging information that is received from a
|
received from a variety of sources:</para>
|
||||||
variety of sources:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Kernel log messages, via kmsg</para></listitem>
|
<listitem><para>Kernel log messages, via kmsg</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Simple system log messages, via the
|
<listitem><para>Simple system log messages, via the libc
|
||||||
libc <citerefentry
|
<citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||||
project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
call</para></listitem>
|
||||||
call</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Structured system log messages via the
|
<listitem><para>Structured system log messages via the native
|
||||||
native Journal API, see
|
Journal API, see
|
||||||
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>4</manvolnum></citerefentry></para></listitem>
|
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>4</manvolnum></citerefentry></para></listitem>
|
||||||
|
|
||||||
<listitem><para>Standard output and
|
<listitem><para>Standard output and standard error of system
|
||||||
standard error of system
|
services</para></listitem>
|
||||||
services</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Audit records, via the audit subsystem</para></listitem>
|
<listitem><para>Audit records, via the audit
|
||||||
</itemizedlist>
|
subsystem</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
|
||||||
<para>The daemon will implicitly collect numerous
|
<para>The daemon will implicitly collect numerous metadata fields
|
||||||
metadata fields for each log messages in a secure and
|
for each log messages in a secure and unfakeable way. See
|
||||||
unfakeable way. See
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
|
for more information about the collected metadata.
|
||||||
for more information about the collected metadata.
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>Log data collected by the journal is primarily
|
<para>Log data collected by the journal is primarily text-based
|
||||||
text-based but can also include binary data where
|
but can also include binary data where necessary. All objects
|
||||||
necessary. All objects stored in the journal can be up
|
stored in the journal can be up to 2^64-1 bytes in size.</para>
|
||||||
to 2^64-1 bytes in size.</para>
|
|
||||||
|
|
||||||
<para>By default, the journal stores log data in
|
<para>By default, the journal stores log data in
|
||||||
<filename>/run/log/journal/</filename>. Since
|
<filename>/run/log/journal/</filename>. Since
|
||||||
<filename>/run/</filename> is volatile, log data is
|
<filename>/run/</filename> is volatile, log data is lost at
|
||||||
lost at reboot. To make the data persistent, it
|
reboot. To make the data persistent, it is sufficient to create
|
||||||
is sufficient to create
|
<filename>/var/log/journal/</filename> where
|
||||||
<filename>/var/log/journal/</filename> where
|
<filename>systemd-journald</filename> will then store the
|
||||||
<filename>systemd-journald</filename> will then store
|
data.</para>
|
||||||
the data.</para>
|
|
||||||
|
|
||||||
<para><filename>systemd-journald</filename> will
|
<para><filename>systemd-journald</filename> will forward all
|
||||||
forward all received log messages to the <constant>AF_UNIX</constant>/<constant>SOCK_DGRAM</constant> socket
|
received log messages to the
|
||||||
<filename>/run/systemd/journal/syslog</filename>, if it exists, which
|
<constant>AF_UNIX</constant>/<constant>SOCK_DGRAM</constant>
|
||||||
may be used by Unix syslog daemons to process the data
|
socket <filename>/run/systemd/journal/syslog</filename>, if it
|
||||||
further.</para>
|
exists, which may be used by Unix syslog daemons to process the
|
||||||
|
data further.</para>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for information about the configuration of this
|
for information about the configuration of this service.</para>
|
||||||
service.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Signals</title>
|
<title>Signals</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>SIGUSR1</term>
|
<term>SIGUSR1</term>
|
||||||
|
|
||||||
<listitem><para>Request that journal
|
<listitem><para>Request that journal data from
|
||||||
data from <filename>/run/</filename>
|
<filename>/run/</filename> is flushed to
|
||||||
is flushed to
|
<filename>/var/</filename> in order to make it persistent (if
|
||||||
<filename>/var/</filename> in order to
|
this is enabled). This must be used after
|
||||||
make it persistent (if this is
|
<filename>/var/</filename> is mounted, as otherwise log data
|
||||||
enabled). This must be used after
|
from <filename>/run</filename> is never flushed to
|
||||||
<filename>/var/</filename> is mounted,
|
<filename>/var</filename> regardless of the
|
||||||
as otherwise log data from
|
configuration.</para></listitem>
|
||||||
<filename>/run</filename> is never
|
</varlistentry>
|
||||||
flushed to <filename>/var</filename>
|
|
||||||
regardless of the
|
|
||||||
configuration.</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>SIGUSR2</term>
|
<term>SIGUSR2</term>
|
||||||
|
|
||||||
<listitem><para>Request immediate
|
<listitem><para>Request immediate rotation of the journal
|
||||||
rotation of the journal
|
files.</para></listitem>
|
||||||
files.</para></listitem>
|
</varlistentry>
|
||||||
</varlistentry>
|
</variablelist>
|
||||||
</variablelist>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Kernel Command Line</title>
|
<title>Kernel Command Line</title>
|
||||||
|
|
||||||
<para>A few configuration parameters from
|
<para>A few configuration parameters from
|
||||||
<filename>journald.conf</filename> may be overridden on
|
<filename>journald.conf</filename> may be overridden on the kernel
|
||||||
the kernel command line:</para>
|
command line:</para>
|
||||||
|
|
||||||
<variablelist class='kernel-commandline-options'>
|
<variablelist class='kernel-commandline-options'>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>systemd.journald.forward_to_syslog=</varname></term>
|
<term><varname>systemd.journald.forward_to_syslog=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_kmsg=</varname></term>
|
<term><varname>systemd.journald.forward_to_kmsg=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_console=</varname></term>
|
<term><varname>systemd.journald.forward_to_console=</varname></term>
|
||||||
<term><varname>systemd.journald.forward_to_wall=</varname></term>
|
<term><varname>systemd.journald.forward_to_wall=</varname></term>
|
||||||
|
|
||||||
<listitem><para>Enables/disables
|
<listitem><para>Enables/disables forwarding of collected log
|
||||||
forwarding of collected log messages
|
messages to syslog, the kernel log buffer, the system console
|
||||||
to syslog, the kernel log buffer, the
|
or wall.
|
||||||
system console or wall.
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for information about these settings.</para>
|
for information about these settings.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Access Control</title>
|
<title>Access Control</title>
|
||||||
|
|
||||||
<para>Journal files are, by default, owned and readable
|
<para>Journal files are, by default, owned and readable by the
|
||||||
by the <literal>systemd-journal</literal> system group
|
<literal>systemd-journal</literal> system group but are not
|
||||||
but are not writable. Adding a user to this group thus
|
writable. Adding a user to this group thus enables her/him to read
|
||||||
enables her/him to read the journal files.</para>
|
the journal files.</para>
|
||||||
|
|
||||||
<para>By default, each logged in user will get her/his
|
<para>By default, each logged in user will get her/his own set of
|
||||||
own set of journal files in
|
journal files in <filename>/var/log/journal/</filename>. These
|
||||||
<filename>/var/log/journal/</filename>. These files
|
files will not be owned by the user, however, in order to avoid
|
||||||
will not be owned by the user, however, in order to
|
that the user can write to them directly. Instead, file system
|
||||||
avoid that the user can write to them
|
ACLs are used to ensure the user gets read access only.</para>
|
||||||
directly. Instead, file system ACLs are used to ensure
|
|
||||||
the user gets read access only.</para>
|
|
||||||
|
|
||||||
<para>Additional users and groups may be granted
|
<para>Additional users and groups may be granted access to journal
|
||||||
access to journal files via file system access control
|
files via file system access control lists (ACL). Distributions
|
||||||
lists (ACL). Distributions and administrators may
|
and administrators may choose to grant read access to all members
|
||||||
choose to grant read access to all members of the
|
of the <literal>wheel</literal> and <literal>adm</literal> system
|
||||||
<literal>wheel</literal> and <literal>adm</literal>
|
groups with a command such as the following:</para>
|
||||||
system groups with a command such as the
|
|
||||||
following:</para>
|
|
||||||
|
|
||||||
<programlisting># setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/</programlisting>
|
<programlisting># setfacl -Rnm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/</programlisting>
|
||||||
|
|
||||||
<para>Note that this command will update the ACLs both
|
<para>Note that this command will update the ACLs both for
|
||||||
for existing journal files and for future journal
|
existing journal files and for future journal files created in the
|
||||||
files created in the
|
<filename>/var/log/journal/</filename> directory.</para>
|
||||||
<filename>/var/log/journal/</filename>
|
</refsect1>
|
||||||
directory.</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Files</title>
|
<title>Files</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><filename>/etc/systemd/journald.conf</filename></term>
|
<term><filename>/etc/systemd/journald.conf</filename></term>
|
||||||
|
|
||||||
<listitem><para>Configure
|
<listitem><para>Configure
|
||||||
<command>systemd-journald</command>
|
<command>systemd-journald</command>
|
||||||
behaviour. See
|
behaviour. See
|
||||||
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><filename>/run/log/journal/<replaceable>machine-id</replaceable>/*.journal</filename></term>
|
<term><filename>/run/log/journal/<replaceable>machine-id</replaceable>/*.journal</filename></term>
|
||||||
<term><filename>/run/log/journal/<replaceable>machine-id</replaceable>/*.journal~</filename></term>
|
<term><filename>/run/log/journal/<replaceable>machine-id</replaceable>/*.journal~</filename></term>
|
||||||
<term><filename>/var/log/journal/<replaceable>machine-id</replaceable>/*.journal</filename></term>
|
<term><filename>/var/log/journal/<replaceable>machine-id</replaceable>/*.journal</filename></term>
|
||||||
<term><filename>/var/log/journal/<replaceable>machine-id</replaceable>/*.journal~</filename></term>
|
<term><filename>/var/log/journal/<replaceable>machine-id</replaceable>/*.journal~</filename></term>
|
||||||
|
|
||||||
<listitem><para><command>systemd-journald</command>
|
<listitem><para><command>systemd-journald</command> writes
|
||||||
writes entries to files in
|
entries to files in
|
||||||
<filename>/run/log/journal/<replaceable>machine-id</replaceable>/</filename>
|
<filename>/run/log/journal/<replaceable>machine-id</replaceable>/</filename>
|
||||||
or
|
or
|
||||||
<filename>/var/log/journal/<replaceable>machine-id</replaceable>/</filename>
|
<filename>/var/log/journal/<replaceable>machine-id</replaceable>/</filename>
|
||||||
with the <literal>.journal</literal>
|
with the <literal>.journal</literal> suffix. If the daemon is
|
||||||
suffix. If the daemon is stopped
|
stopped uncleanly, or if the files are found to be corrupted,
|
||||||
uncleanly, or if the files are found
|
they are renamed using the <literal>.journal~</literal>
|
||||||
to be corrupted, they are renamed
|
suffix, and <command>systemd-journald</command> starts writing
|
||||||
using the <literal>.journal~</literal>
|
to a new file. <filename>/run</filename> is used when
|
||||||
suffix, and
|
<filename>/var/log/journal</filename> is not available, or
|
||||||
<command>systemd-journald</command>
|
when <option>Storage=volatile</option> is set in the
|
||||||
starts writing to a new
|
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
file. <filename>/run</filename> is
|
configuration file. </para></listitem>
|
||||||
used when
|
</varlistentry>
|
||||||
<filename>/var/log/journal</filename>
|
</variablelist>
|
||||||
is not available, or when
|
</refsect1>
|
||||||
<option>Storage=volatile</option> is
|
|
||||||
set in the
|
|
||||||
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
||||||
configuration file.
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>setfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>setfacl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
|
||||||
<command>pydoc systemd.journal</command>.
|
<command>pydoc systemd.journal</command>.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,67 +23,65 @@
|
|||||||
|
|
||||||
<refentry id="systemd-localed.service" conditional='ENABLE_LOCALED'>
|
<refentry id="systemd-localed.service" conditional='ENABLE_LOCALED'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-localed.service</title>
|
<title>systemd-localed.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-localed.service</refentrytitle>
|
<refentrytitle>systemd-localed.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-localed.service</refname>
|
<refname>systemd-localed.service</refname>
|
||||||
<refname>systemd-localed</refname>
|
<refname>systemd-localed</refname>
|
||||||
<refpurpose>Locale bus mechanism</refpurpose>
|
<refpurpose>Locale bus mechanism</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-localed.service</filename></para>
|
<para><filename>systemd-localed.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-localed</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-localed</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-localed</filename> is a system
|
<para><filename>systemd-localed</filename> is a system service
|
||||||
service that may be used as mechanism to change the
|
that may be used as mechanism to change the system locale
|
||||||
system locale settings, as well as the console key
|
settings, as well as the console key mapping and default X11 key
|
||||||
mapping and default X11 key
|
mapping. <filename>systemd-localed</filename> is automatically
|
||||||
mapping. <filename>systemd-localed</filename> is
|
activated on request and terminates itself when it is
|
||||||
automatically activated on request and terminates
|
unused.</para>
|
||||||
itself when it is unused.</para>
|
|
||||||
|
|
||||||
<para>The tool
|
<para>The tool
|
||||||
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
is a command line client to this service.</para>
|
is a command line client to this service.</para>
|
||||||
|
|
||||||
<para>See the <ulink
|
<para>See the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/localed">
|
url="http://www.freedesktop.org/wiki/Software/systemd/localed">
|
||||||
developer documentation</ulink> for information about
|
developer documentation</ulink> for information about the APIs
|
||||||
the APIs <filename>systemd-localed</filename>
|
<filename>systemd-localed</filename> provides.</para>
|
||||||
provides.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -23,109 +23,99 @@
|
|||||||
|
|
||||||
<refentry id="systemd-logind.service" conditional='ENABLE_LOGIND'>
|
<refentry id="systemd-logind.service" conditional='ENABLE_LOGIND'>
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-logind.service</title>
|
<title>systemd-logind.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-logind.service</refentrytitle>
|
<refentrytitle>systemd-logind.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-logind.service</refname>
|
<refname>systemd-logind.service</refname>
|
||||||
<refname>systemd-logind</refname>
|
<refname>systemd-logind</refname>
|
||||||
<refpurpose>Login manager</refpurpose>
|
<refpurpose>Login manager</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-logind.service</filename></para>
|
<para><filename>systemd-logind.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-logind</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-logind</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-logind</command> is a system
|
<para><command>systemd-logind</command> is a system service that
|
||||||
service that manages user logins. It is responsible
|
manages user logins. It is responsible for:</para>
|
||||||
for:</para>
|
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Keeping track of users and
|
<listitem><para>Keeping track of users and sessions, their
|
||||||
sessions, their processes and their idle
|
processes and their idle state</para></listitem>
|
||||||
state</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Providing PolicyKit-based access
|
<listitem><para>Providing PolicyKit-based access for users to
|
||||||
for users to operations such as system
|
operations such as system shutdown or sleep</para></listitem>
|
||||||
shutdown or sleep</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Implementing a shutdown/sleep
|
<listitem><para>Implementing a shutdown/sleep inhibition logic
|
||||||
inhibition logic for
|
for applications</para></listitem>
|
||||||
applications</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Handling of power/sleep
|
<listitem><para>Handling of power/sleep hardware
|
||||||
hardware keys</para></listitem>
|
keys</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Multi-seat
|
<listitem><para>Multi-seat management</para></listitem>
|
||||||
management</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Session
|
<listitem><para>Session switch management</para></listitem>
|
||||||
switch management</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>Device access management for
|
<listitem><para>Device access management for
|
||||||
users</para></listitem>
|
users</para></listitem>
|
||||||
|
|
||||||
<listitem><para>Automatic spawning of text
|
<listitem><para>Automatic spawning of text logins (gettys) on
|
||||||
logins (gettys) on virtual console activation
|
virtual console activation and user runtime directory
|
||||||
and user runtime directory
|
management</para></listitem>
|
||||||
management</para></listitem>
|
</itemizedlist>
|
||||||
</itemizedlist>
|
|
||||||
|
|
||||||
<para>User sessions are registered in logind via the
|
<para>User sessions are registered in logind via the
|
||||||
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
PAM module.</para>
|
PAM module.</para>
|
||||||
|
|
||||||
<para>See
|
<para>See
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for information about the configuration of this
|
for information about the configuration of this service.</para>
|
||||||
service.</para>
|
|
||||||
|
|
||||||
<para>See <ulink
|
<para>See <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
|
url="http://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat
|
||||||
on Linux</ulink> for an introduction into basic
|
on Linux</ulink> for an introduction into basic concepts of logind
|
||||||
concepts of logind such as users, sessions and seats.</para>
|
such as users, sessions and seats.</para>
|
||||||
|
|
||||||
<para>See the <ulink
|
<para>See the <ulink
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/logind">
|
url="http://www.freedesktop.org/wiki/Software/systemd/logind">
|
||||||
logind D-Bus API Documentation</ulink> for information about
|
logind D-Bus API Documentation</ulink> for information about the
|
||||||
the APIs <filename>systemd-logind</filename>
|
APIs <filename>systemd-logind</filename> provides.</para>
|
||||||
provides.</para>
|
|
||||||
|
|
||||||
<para>For more information on the inhibition logic see
|
<para>For more information on the inhibition logic see the <ulink
|
||||||
the <ulink
|
url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor
|
Lock Developer Documentation</ulink>.</para>
|
||||||
Lock Developer Documentation</ulink>.</para>
|
</refsect1>
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-user-sessions.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-user-sessions.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -21,81 +21,80 @@
|
|||||||
-->
|
-->
|
||||||
<refentry id="systemd-machine-id-commit.service">
|
<refentry id="systemd-machine-id-commit.service">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-machine-id-commit.service</title>
|
<title>systemd-machine-id-commit.service</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Didier</firstname>
|
<firstname>Didier</firstname>
|
||||||
<surname>Roche</surname>
|
<surname>Roche</surname>
|
||||||
<email>didrocks@ubuntu.com</email>
|
<email>didrocks@ubuntu.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-machine-id-commit.service</refentrytitle>
|
<refentrytitle>systemd-machine-id-commit.service</refentrytitle>
|
||||||
<manvolnum>8</manvolnum>
|
<manvolnum>8</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-machine-id-commit.service</refname>
|
<refname>systemd-machine-id-commit.service</refname>
|
||||||
<refpurpose>Commit transient machine-id to disk</refpurpose>
|
<refpurpose>Commit transient machine-id to disk</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<para><filename>systemd-machine-id-commit.service</filename></para>
|
<para><filename>systemd-machine-id-commit.service</filename></para>
|
||||||
<para><filename>/usr/lib/systemd/systemd-machine-id-commit</filename></para>
|
<para><filename>/usr/lib/systemd/systemd-machine-id-commit</filename></para>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><filename>systemd-machine-id-commit.service</filename> is
|
<para><filename>systemd-machine-id-commit.service</filename> is a
|
||||||
a service responsible for committing any transient
|
service responsible for committing any transient
|
||||||
<filename>/etc/machine-id</filename> file to a writable file
|
<filename>/etc/machine-id</filename> file to a writable file
|
||||||
system. See
|
system. See
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for more information about this file.</para>
|
for more information about this file.</para>
|
||||||
|
|
||||||
<para>This service is started shortly after
|
<para>This service is started shortly after
|
||||||
<filename>local-fs.target</filename> if
|
<filename>local-fs.target</filename> if
|
||||||
<filename>/etc/machine-id</filename> is an independent mount
|
<filename>/etc/machine-id</filename> is an independent mount point
|
||||||
point (probably a tmpfs one) and /etc is writable.
|
(probably a tmpfs one) and /etc is writable.
|
||||||
<command>systemd-machine-id-commit</command> will then
|
<command>systemd-machine-id-commit</command> will then write
|
||||||
write current machine ID to disk and unmount the transient
|
current machine ID to disk and unmount the transient
|
||||||
<filename>/etc/machine-id</filename> file in a race-free
|
<filename>/etc/machine-id</filename> file in a race-free manner to
|
||||||
manner to ensure that file is always valid for other
|
ensure that file is always valid for other processes.</para>
|
||||||
processes.</para>
|
|
||||||
|
|
||||||
<para>Note that the traditional way to initialize the machine
|
<para>Note that the traditional way to initialize the machine ID
|
||||||
ID in <filename>/etc/machine-id</filename> is to use
|
in <filename>/etc/machine-id</filename> is to use
|
||||||
<command>systemd-machine-id-setup</command> by system
|
<command>systemd-machine-id-setup</command> by system installer
|
||||||
installer tools. You can also use
|
tools. You can also use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the machine ID on mounted (but not
|
to initialize the machine ID on mounted (but not booted) system
|
||||||
booted) system images. The main use case for that service is
|
images. The main use case for that service is
|
||||||
<filename>/etc/machine-id</filename> being an empty file at
|
<filename>/etc/machine-id</filename> being an empty file at boot
|
||||||
boot and initrd chaining to systemd giving it a read only file
|
and initrd chaining to systemd giving it a read only file system
|
||||||
system that will be turned read-write later during the boot
|
that will be turned read-write later during the boot
|
||||||
process.</para>
|
process.</para>
|
||||||
|
|
||||||
<para>There is no consequence if that service fails other than
|
<para>There is no consequence if that service fails other than a
|
||||||
a newer machine-id will be generated during next system boot.
|
newer machine-id will be generated during next system boot.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-commit</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-commit</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,104 +22,102 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-machine-id-commit"
|
<refentry id="systemd-machine-id-commit"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-machine-id-commit</title>
|
<title>systemd-machine-id-commit</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Didier</firstname>
|
<firstname>Didier</firstname>
|
||||||
<surname>Roche</surname>
|
<surname>Roche</surname>
|
||||||
<email>didrocks@ubuntu.com</email>
|
<email>didrocks@ubuntu.com</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-machine-id-commit</refentrytitle>
|
<refentrytitle>systemd-machine-id-commit</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-machine-id-commit</refname>
|
<refname>systemd-machine-id-commit</refname>
|
||||||
<refpurpose>Commit transient machine ID to /etc/machine-id</refpurpose>
|
<refpurpose>Commit transient machine ID to /etc/machine-id</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-machine-id-commit</command>
|
<command>systemd-machine-id-commit</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-machine-id-commit</command> may
|
<para><command>systemd-machine-id-commit</command> may be used to
|
||||||
be used to write on disk any transient machine ID
|
write on disk any transient machine ID mounted as a temporary file
|
||||||
mounted as a temporary file system in
|
system in <filename>/etc/machine-id</filename> at boot time. See
|
||||||
<filename>/etc/machine-id</filename> at boot time. See
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for more information about this file.</para>
|
||||||
for more information about this file.</para>
|
|
||||||
|
|
||||||
<para>This tool will execute no operation if
|
<para>This tool will execute no operation if
|
||||||
<filename>/etc/machine-id</filename> doesn't contain any
|
<filename>/etc/machine-id</filename> doesn't contain any valid
|
||||||
valid machine ID, isn't mounted as an independent temporary
|
machine ID, isn't mounted as an independent temporary file system,
|
||||||
file system, of <filename>/etc</filename> is read-only. If
|
of <filename>/etc</filename> is read-only. If those conditions are
|
||||||
those conditions are met, it will then write current machine ID
|
met, it will then write current machine ID to disk and unmount the
|
||||||
to disk and unmount the transient
|
transient <filename>/etc/machine-id</filename> file in a race-free
|
||||||
<filename>/etc/machine-id</filename> file in a race-free
|
manner to ensure that this file is always valid for other
|
||||||
manner to ensure that this file is always valid for other
|
processes.</para>
|
||||||
processes.</para>
|
|
||||||
|
|
||||||
<para>Note that the traditional way to initialize the machine
|
<para>Note that the traditional way to initialize the machine ID
|
||||||
ID in <filename>/etc/machine-id</filename> is to use
|
in <filename>/etc/machine-id</filename> is to use
|
||||||
<command>systemd-machine-id-setup</command> by system
|
<command>systemd-machine-id-setup</command> by system installer
|
||||||
installer tools. You can also use
|
tools. You can also use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the machine ID on mounted (but not
|
to initialize the machine ID on mounted (but not booted) system
|
||||||
booted) system images.</para>
|
images.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--root=<replaceable>root</replaceable></option></term>
|
<term><option>--root=<replaceable>root</replaceable></option></term>
|
||||||
<listitem><para>Takes a directory path
|
<listitem><para>Takes a directory path
|
||||||
as an argument. All paths will be
|
as an argument. All paths will be
|
||||||
prefixed with the given alternate
|
prefixed with the given alternate
|
||||||
<replaceable>root</replaceable> path,
|
<replaceable>root</replaceable> path,
|
||||||
including config search paths.
|
including config search paths.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-commit.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd-machine-id-setup</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version='1.0'?> <!--*-nxml-*-->
|
<?xml version='1.0'?> <!--*-nxml-*-->
|
||||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
@@ -22,115 +22,109 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="systemd-machine-id-setup"
|
<refentry id="systemd-machine-id-setup"
|
||||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
<refentryinfo>
|
<refentryinfo>
|
||||||
<title>systemd-machine-id-setup</title>
|
<title>systemd-machine-id-setup</title>
|
||||||
<productname>systemd</productname>
|
<productname>systemd</productname>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
<contrib>Developer</contrib>
|
<contrib>Developer</contrib>
|
||||||
<firstname>Lennart</firstname>
|
<firstname>Lennart</firstname>
|
||||||
<surname>Poettering</surname>
|
<surname>Poettering</surname>
|
||||||
<email>lennart@poettering.net</email>
|
<email>lennart@poettering.net</email>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>systemd-machine-id-setup</refentrytitle>
|
<refentrytitle>systemd-machine-id-setup</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>systemd-machine-id-setup</refname>
|
<refname>systemd-machine-id-setup</refname>
|
||||||
<refpurpose>Initialize the machine ID in /etc/machine-id</refpurpose>
|
<refpurpose>Initialize the machine ID in /etc/machine-id</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>systemd-machine-id-setup</command>
|
<command>systemd-machine-id-setup</command>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><command>systemd-machine-id-setup</command> may
|
<para><command>systemd-machine-id-setup</command> may be used by
|
||||||
be used by system installer tools to initialize the
|
system installer tools to initialize the machine ID stored in
|
||||||
machine ID stored in
|
<filename>/etc/machine-id</filename> at install time with a
|
||||||
<filename>/etc/machine-id</filename> at install time
|
randomly generated ID. See
|
||||||
with a randomly generated ID. See
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
for more information about this file.</para>
|
||||||
for more information about this file.</para>
|
|
||||||
|
|
||||||
<para>This tool will execute no operation if
|
<para>This tool will execute no operation if
|
||||||
<filename>/etc/machine-id</filename> is already
|
<filename>/etc/machine-id</filename> is already
|
||||||
initialized.</para>
|
initialized.</para>
|
||||||
|
|
||||||
<para>If a valid D-Bus machine ID is already
|
<para>If a valid D-Bus machine ID is already configured for the
|
||||||
configured for the system, the D-Bus machine ID is
|
system, the D-Bus machine ID is copied and used to initialize the
|
||||||
copied and used to initialize the machine ID in
|
machine ID in <filename>/etc/machine-id</filename>.</para>
|
||||||
<filename>/etc/machine-id</filename>.</para>
|
|
||||||
|
|
||||||
<para>If run inside a KVM virtual machine and a UUID
|
<para>If run inside a KVM virtual machine and a UUID is passed via
|
||||||
is passed via the <option>-uuid</option> option, this
|
the <option>-uuid</option> option, this UUID is used to initialize
|
||||||
UUID is used to initialize the machine ID instead of a
|
the machine ID instead of a randomly generated one. The caller
|
||||||
randomly generated one. The caller must ensure that the
|
must ensure that the UUID passed is sufficiently unique and is
|
||||||
UUID passed is sufficiently unique and is different
|
different for every booted instanced of the VM.</para>
|
||||||
for every booted instanced of the VM.</para>
|
|
||||||
|
|
||||||
<para>Similar, if run inside a Linux container
|
<para>Similar, if run inside a Linux container environment and a
|
||||||
environment and a UUID is set for the container this
|
UUID is set for the container this is used to initialize the
|
||||||
is used to initialize the machine ID. For details see
|
machine ID. For details see the documentation of the <ulink
|
||||||
the documentation of the <ulink
|
url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
|
||||||
url="http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface">Container
|
Interface</ulink>.</para>
|
||||||
Interface</ulink>.</para>
|
|
||||||
|
|
||||||
<para>Use
|
<para>Use
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
to initialize the machine ID on mounted (but not
|
to initialize the machine ID on mounted (but not booted) system
|
||||||
booted) system images.</para>
|
images.</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Options</title>
|
<title>Options</title>
|
||||||
|
|
||||||
<para>The following options are understood:</para>
|
<para>The following options are understood:</para>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--root=<replaceable>root</replaceable></option></term>
|
<term><option>--root=<replaceable>root</replaceable></option></term>
|
||||||
<listitem><para>Takes a directory path
|
<listitem><para>Takes a directory path as an argument. All
|
||||||
as an argument. All paths will be
|
paths will be prefixed with the given alternate
|
||||||
prefixed with the given alternate
|
<replaceable>root</replaceable> path, including config search
|
||||||
<replaceable>root</replaceable> path,
|
paths. </para></listitem>
|
||||||
including config search paths.
|
</varlistentry>
|
||||||
</para></listitem>
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
</varlistentry>
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
</variablelist>
|
||||||
<xi:include href="standard-options.xml" xpointer="version" />
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Exit status</title>
|
<title>Exit status</title>
|
||||||
|
|
||||||
<para>On success, 0 is returned, a non-zero failure
|
<para>On success, 0 is returned, a non-zero failure code
|
||||||
code otherwise.</para>
|
otherwise.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
<para>
|
<para>
|
||||||
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>dbus-uuidgen</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
<citerefentry><refentrytitle>dbus-uuidgen</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||||
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user