chiark / gitweb /
man: fixed typo in SyslogIdentifier=
[elogind.git] / man / systemd.swap.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
11   systemd is free software; you can redistribute it and/or modify it
12   under the terms of the GNU General Public License as published by
13   the Free Software Foundation; either version 2 of the License, or
14   (at your option) any later version.
15
16   systemd is distributed in the hope that it will be useful, but
17   WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19   General Public License for more details.
20
21   You should have received a copy of the GNU General Public License
22   along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24
25 <refentry id="systemd.swap">
26         <refentryinfo>
27                 <title>systemd.swap</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd.swap</refentrytitle>
42                 <manvolnum>5</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd.swap</refname>
47                 <refpurpose>systemd swap configuration files</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>systemd.swap</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>A unit configuration file whose name ends in
58                 <filename>.swap</filename> encodes information about a
59                 swap device or file for memory paging controlled and
60                 supervised by systemd.</para>
61
62                 <para>This man page lists the configuration options
63                 specific to this unit type. See
64                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
65                 for the common options of all unit configuration
66                 files. The common configuration items are configured
67                 in the generic [Unit] and [Install] sections. The swap
68                 specific configuration options are configured in the
69                 [Swap] section.</para>
70
71                 <para>Swap units must be named after the devices they
72                 control. Example: the swap device
73                 <filename>/dev/sda5</filename> must be configured in a
74                 unit file <filename>dev-sda5.swap</filename>. For
75                 details about the escaping logic used to convert a
76                 file system path to a unit name see
77                 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
78         </refsect1>
79
80         <refsect1>
81                 <title><filename>fstab</filename></title>
82
83                 <para>Swap units may either be configured via unit
84                 files, or via <filename>/etc/fstab</filename> (see
85                 <citerefentry><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
86                 for details).</para>
87
88                 <para>If a swap device or file is configured in both
89                 <filename>/etc/fstab</filename> and a unit file the
90                 configuration in the latter takes precedence.</para>
91         </refsect1>
92
93         <refsect1>
94                 <title>Options</title>
95
96                 <para>Swap files must include a [Swap] section, which
97                 carries information about the swap device it
98                 supervises. A number of options that may be used in
99                 this section are shared with other unit types. These
100                 options are documented in
101                 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. The
102                 options specific to the [Swap] section of swap units
103                 are the following:</para>
104
105                 <variablelist>
106
107                         <varlistentry>
108                                 <term><varname>What=</varname></term>
109                                 <listitem><para>Takes an absolute path
110                                 of a device node or file to use for
111                                 paging. See
112                                 <citerefentry><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
113                                 for details. If this refers to a
114                                 device node, a dependency on the
115                                 respective device unit is
116                                 automatically created. (See
117                                 <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
118                                 for more information.) If this refers
119                                 to a file, a dependency on the
120                                 respective mount unit is automatically
121                                 created. (See
122                                 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
123                                 for more information.) This option is
124                                 mandatory.</para></listitem>
125                         </varlistentry>
126
127                         <varlistentry>
128                                 <term><varname>Priority=</varname></term>
129
130                                 <listitem><para>Swap priority to use
131                                 when activating the swap device or
132                                 file. This takes an integer. This
133                                 setting is optional.</para></listitem>
134                         </varlistentry>
135
136                         <varlistentry>
137                                 <term><varname>TimeoutSec=</varname></term>
138                                 <listitem><para>Configures the time to
139                                 wait for the swapon command to
140                                 finish. If a command does not exit
141                                 within the configured time the swap
142                                 will be considered failed and be shut
143                                 down again. All commands still running
144                                 will be terminated forcibly via
145                                 SIGTERM, and after another delay of
146                                 this time with SIGKILL. (See
147                                 <option>KillMode=</option> below.)
148                                 Takes a unit-less value in seconds, or
149                                 a time span value such as "5min
150                                 20s". Pass 0 to disable the timeout
151                                 logic. Defaults to
152                                 60s.</para></listitem>
153                         </varlistentry>
154
155                         <varlistentry>
156                                 <term><varname>KillMode=</varname></term>
157                                 <listitem><para>Specifies how
158                                 processes of this swap shall be
159                                 killed. One of
160                                 <option>control-group</option>,
161                                 <option>process-group</option>,
162                                 <option>process</option>,
163                                 <option>none</option>.</para>
164
165                                 <para>This option is mostly equivalent
166                                 to the <option>KillMode=</option>
167                                 option of service files. See
168                                 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
169                                 for details.</para></listitem>
170                         </varlistentry>
171
172                         <varlistentry>
173                                 <term><varname>KillSignal=</varname></term>
174                                 <listitem><para>Specifies which signal
175                                 to use when killing a process of this
176                                 swap. Defaults to SIGTERM.
177                                 </para></listitem>
178                         </varlistentry>
179
180                         <varlistentry>
181                                 <term><varname>SendSIGKILL=</varname></term>
182                                 <listitem><para>Specifies whether to
183                                 send SIGKILL to remaining processes
184                                 after a timeout, if the normal
185                                 shutdown procedure left processes of
186                                 the swap around. Takes a boolean
187                                 value. Defaults to "yes".
188                                 </para></listitem>
189                         </varlistentry>
190                 </variablelist>
191         </refsect1>
192
193         <refsect1>
194                   <title>See Also</title>
195                   <para>
196                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
197                           <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
198                           <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
199                           <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
200                           <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
201                           <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
202                           <citerefentry><refentrytitle>swapon</refentrytitle><manvolnum>8</manvolnum></citerefentry>
203                   </para>
204         </refsect1>
205
206 </refentry>