Whitespace-only fixes, translators please ignore.

This commit is contained in:
Warren Block 2014-01-30 23:09:22 +00:00
parent f9597a778d
commit d216048b26
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43704

View file

@ -4,26 +4,53 @@
$FreeBSD$
-->
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="config-tuning">
<info><title>Configuration and Tuning</title>
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
xml:id="config-tuning">
<info>
<title>Configuration and Tuning</title>
<authorgroup>
<author><personname><firstname>Chern</firstname><surname>Lee</surname></personname><contrib>Written by </contrib></author>
<author>
<personname>
<firstname>Chern</firstname>
<surname>Lee</surname>
</personname>
<contrib>Written by </contrib>
</author>
</authorgroup>
<authorgroup>
<author><personname><firstname>Mike</firstname><surname>Smith</surname></personname><contrib>Based on a tutorial written by </contrib></author>
<author>
<personname>
<firstname>Mike</firstname>
<surname>Smith</surname>
</personname>
<contrib>Based on a tutorial written by </contrib>
</author>
</authorgroup>
<authorgroup>
<author><personname><firstname>Matt</firstname><surname>Dillon</surname></personname><contrib>Also based on tuning(7) written by </contrib></author>
<author>
<personname>
<firstname>Matt</firstname>
<surname>Dillon</surname>
</personname>
<contrib>Also based on tuning(7) written by </contrib>
</author>
</authorgroup>
</info>
<sect1 xml:id="config-synopsis">
<title>Synopsis</title>
<indexterm><primary>system configuration</primary></indexterm>
<indexterm><primary>system optimization</primary></indexterm>
<indexterm>
<primary>system configuration</primary>
</indexterm>
<indexterm>
<primary>system optimization</primary>
</indexterm>
<para>One of the important aspects of &os; is proper system
configuration. This chapter explains much of the &os;
@ -54,7 +81,8 @@
</listitem>
<listitem>
<para>How to use the various configuration files in <filename>/etc</filename>.</para>
<para>How to use the various configuration files in
<filename>/etc</filename>.</para>
</listitem>
<listitem>
@ -71,7 +99,8 @@
<itemizedlist>
<listitem>
<para>Understand &unix; and &os; basics (<xref linkend="basics"/>).</para>
<para>Understand &unix; and &os; basics
(<xref linkend="basics"/>).</para>
</listitem>
<listitem>
@ -106,39 +135,38 @@
faster from the outer tracks to the inner. Thus, smaller
and heavier-accessed file systems should be closer to the
outside of the drive, while larger partitions like
<filename>/usr</filename> should be placed
toward the inner parts of the disk. It is a good idea to
create partitions in an order similar to: <filename>/</filename>, swap,
<filename>/usr</filename> should be placed toward the inner
parts of the disk. It is a good idea to create partitions
in an order similar to: <filename>/</filename>, swap,
<filename>/var</filename>, and
<filename>/usr</filename>.</para>
<para>The size of the
<filename>/var</filename> partition
reflects the intended machine's usage. This partition
is used to hold mailboxes, log files, and printer spools.
<para>The size of the <filename>/var</filename> partition
reflects the intended machine's usage. This partition is
used to hold mailboxes, log files, and printer spools.
Mailboxes and log files can grow to unexpected sizes
depending on the number of users and how long log files
are kept. On average, most users rarely need more than
about a gigabyte of free disk space in <filename>/var</filename>.</para>
depending on the number of users and how long log files are
kept. On average, most users rarely need more than about a
gigabyte of free disk space in
<filename>/var</filename>.</para>
<note>
<para>Sometimes, a lot of disk space is required in
<filename>/var/tmp</filename>. When
new software is installed with &man.pkg.add.1;, the
packaging tools extract a temporary copy of the packages
under <filename>/var/tmp</filename>.
Large software packages, like
<application>Firefox</application>,
<filename>/var/tmp</filename>. When new software is
installed with &man.pkg.add.1;, the packaging tools
extract a temporary copy of the packages under
<filename>/var/tmp</filename>. Large software packages,
like <application>Firefox</application>,
<application>OpenOffice</application> or
<application>LibreOffice</application> may be tricky to
install if there is not enough disk space under <filename>/var/tmp</filename>.</para>
install if there is not enough disk space under
<filename>/var/tmp</filename>.</para>
</note>
<para>The <filename>/usr</filename>
partition holds many of the files which support the system,
including the &os; Ports Collection and system source code.
At least 2 gigabytes is recommended for this
partition.</para>
<para>The <filename>/usr</filename> partition holds many of
the files which support the system, including the &os; Ports
Collection and system source code. At least 2 gigabytes is
recommended for this partition.</para>
<para>When selecting partition sizes, keep the space
requirements in mind. Running out of space in one partition
@ -147,17 +175,21 @@
<note>
<para>The <literal>Auto-defaults</literal> partition sizer
used by &man.sysinstall.8; will sometimes select smaller
than adequate <filename>/var</filename>
and <filename>/</filename> partitions.
Partition wisely and generously.</para>
than adequate <filename>/var</filename> and
<filename>/</filename> partitions. Partition wisely and
generously.</para>
</note>
</sect3>
<sect3 xml:id="swap-design">
<title>Swap Partition</title>
<indexterm><primary>swap sizing</primary></indexterm>
<indexterm><primary>swap partition</primary></indexterm>
<indexterm>
<primary>swap sizing</primary>
</indexterm>
<indexterm>
<primary>swap partition</primary>
</indexterm>
<para>As a rule of thumb, the swap partition should be about
double the size of physical memory (<acronym>RAM</acronym>)
@ -191,9 +223,11 @@
fine, but there are several reasons why this is a bad idea.
First, each partition has different operational
characteristics and separating them allows the file system
to tune accordingly. For example, the root and <filename>/usr</filename> partitions are
read-mostly, with few writes, while a lot of reads and
writes could occur in <filename>/var</filename> and <filename>/var/tmp</filename>.</para>
to tune accordingly. For example, the root and
<filename>/usr</filename> partitions are read-mostly, with
few writes, while a lot of reads and writes could occur in
<filename>/var</filename> and
<filename>/var/tmp</filename>.</para>
<para>By properly partitioning a system, fragmentation
introduced in the smaller write heavy partitions will not
@ -202,11 +236,11 @@
increase I/O performance in the partitions where it occurs
the most. While I/O performance in the larger partitions
may be needed, shifting them more toward the edge of the
disk will not lead to a significant performance
improvement over moving <filename>/var</filename> to the edge. Finally,
there are safety concerns. A smaller, neater root
partition which is mostly read-only has a greater chance of
surviving a bad crash.</para>
disk will not lead to a significant performance improvement
over moving <filename>/var</filename> to the edge. Finally,
there are safety concerns. A smaller, neater root partition
which is mostly read-only has a greater chance of surviving
a bad crash.</para>
</sect3>
</sect2>
</sect1>
@ -286,9 +320,10 @@ ifconfig_fxp0="inet 10.1.1.1/8"</programlisting>
<indexterm><primary>/usr/local/etc</primary></indexterm>
<para>Typically, these files are installed in <filename>/usr/local/etc</filename>. In the case
where an application has a large number of configuration
files, a subdirectory will be created to hold them.</para>
<para>Typically, these files are installed in
<filename>/usr/local/etc</filename>. In the case where an
application has a large number of configuration files, a
subdirectory will be created to hold them.</para>
<para>Normally, when a port or package is installed, sample
configuration files are also installed. These are usually
@ -318,22 +353,30 @@ ifconfig_fxp0="inet 10.1.1.1/8"</programlisting>
</sect1>
<sect1 xml:id="configtuning-starting-services">
<info><title>Starting Services</title>
<info>
<title>Starting Services</title>
<authorgroup>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<indexterm><primary>services</primary></indexterm>
<indexterm>
<primary>services</primary>
</indexterm>
<para>Many users install third party software on &os; from the
Ports Collection and require the installed services to be
started upon system initialization. Services, such as
<package>mail/postfix</package> or
<package>www/apache22</package> are just two
of the many software packages which may be started during system
<package>www/apache22</package> are just two of the many
software packages which may be started during system
initialization. This section explains the procedures available
for starting third party software.</para>
@ -345,7 +388,8 @@ ifconfig_fxp0="inet 10.1.1.1/8"</programlisting>
<para>Now that &os; includes <filename>rc.d</filename>,
configuration of application startup is easier and provides
more features. Using the key words discussed in <xref linkend="configtuning-rcd"/>, applications can be set to
more features. Using the key words discussed in
<xref linkend="configtuning-rcd"/>, applications can be set to
start after certain other services and extra flags can be
passed through <filename>/etc/rc.conf</filename> in place of
hard coded flags in the start up script. A basic script may
@ -416,50 +460,62 @@ run_rc_command "$1"</programlisting>
</sect1>
<sect1 xml:id="configtuning-cron">
<info><title>Configuring &man.cron.8;</title>
<info>
<title>Configuring &man.cron.8;</title>
<authorgroup>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<indexterm><primary>cron</primary>
<secondary>configuration</secondary></indexterm>
<indexterm>
<primary>cron</primary>
<secondary>configuration</secondary>
</indexterm>
<para>One of the most useful utilities in &os; is &man.cron.8;.
This utility runs in the background and regularly checks
<filename>/etc/crontab</filename> for tasks to execute and
searches <filename>/var/cron/tabs</filename>
for custom &man.crontab.5; files. These files store
information about specific functions which &man.cron.8; is
supposed to perform at certain times.</para>
searches <filename>/var/cron/tabs</filename> for custom
&man.crontab.5; files. These files store information about
specific functions which &man.cron.8; is supposed to perform at
certain times.</para>
<para>Two different types of configuration files are used by
&man.cron.8;: the system <filename>crontab</filename> and user
<filename>crontab</filename>s. These formats only differ in
the sixth field and later. In the system
<filename>crontab</filename>s. These formats only differ in the
sixth field and later. In the system
<filename>crontab</filename>, &man.cron.8; runs the command as
the user specified in the sixth field. In a user
<filename>crontab</filename>, all commands run as the user who
created the <filename>crontab</filename>, so the sixth field
is the last field; this is an important security feature.
The final field is always the command to run.</para>
created the <filename>crontab</filename>, so the sixth field is
the last field; this is an important security feature. The
final field is always the command to run.</para>
<note>
<para>User crontabs allow individual users to schedule tasks
without the need for <systemitem class="username">root</systemitem> privileges.
without the need for
<systemitem class="username">root</systemitem> privileges.
Commands in a user's crontab run with the permissions of the
user who owns the crontab.</para>
<para>The <systemitem class="username">root</systemitem> user can have a user
<filename>crontab</filename> just like any other user. The
<systemitem class="username">root</systemitem> user <filename>crontab</filename>
is separate from the system <filename>crontab</filename>,
<para>The <systemitem class="username">root</systemitem> user
can have a user <filename>crontab</filename> just like any
other user. The
<systemitem class="username">root</systemitem> user
<filename>crontab</filename> is separate from the system
<filename>crontab</filename>,
<filename>/etc/crontab</filename>. Because the system
<filename>crontab</filename> invokes the specified commands as
<systemitem class="username">root</systemitem>, there is usually no need to create
a user <filename>crontab</filename> for
<systemitem class="username">root</systemitem>.</para>
<systemitem class="username">root</systemitem>, there is
usually no need to create a user <filename>crontab</filename>
for <systemitem class="username">root</systemitem>.</para>
</note>
<para>Here is a sample entry from
@ -527,8 +583,9 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <co xml:id="co-env"/>
<literal>*</literal> characters mean
<quote>first-last</quote>, and can be interpreted as
<emphasis>every</emphasis> time. In this example,
&man.atrun.8; is invoked by <systemitem class="username">root</systemitem>
every five minutes, regardless of the day or month.</para>
&man.atrun.8; is invoked by
<systemitem class="username">root</systemitem> every five
minutes, regardless of the day or month.</para>
<para>Commands can have any number of flags passed to them;
however, commands which extend to multiple lines need to be
@ -548,11 +605,11 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <co xml:id="co-env"/>
<important>
<para>Do not use the procedure described here to edit and
install the system <filename>crontab</filename>,
<filename>/etc/crontab</filename>. Instead, use an
editor and &man.cron.8; will notice that the file has
changed and immediately begin using the updated version.
See <link xlink:href="&url.books.faq;/admin.html#root-not-found-cron-errors">
this FAQ entry</link> for more information.</para>
<filename>/etc/crontab</filename>. Instead, use an editor
and &man.cron.8; will notice that the file has changed and
immediately begin using the updated version. See <link
xlink:href="&url.books.faq;/admin.html#root-not-found-cron-errors">this
FAQ entry</link> for more information.</para>
</important>
<para>To install a freshly written user &man.crontab.5;, use
@ -581,14 +638,20 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin <co xml:id="co-env"/>
</sect1>
<sect1 xml:id="configtuning-rcd">
<info><title>Using &man.rc.8; Under &os;</title>
<info>
<title>Using &man.rc.8; Under &os;</title>
<authorgroup>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<para>In 2002, &os; integrated the NetBSD &man.rc.8; system for
system initialization. The files listed in
<filename>/etc/rc.d</filename> provide basic
@ -646,7 +709,8 @@ sshd_enable="YES"
<note>
<para>The <literal># sshd</literal> line is output from the
above command, not a <systemitem class="username">root</systemitem> console.</para>
above command, not a
<systemitem class="username">root</systemitem> console.</para>
</note>
<para>To determine whether or not a service is running, use
@ -723,20 +787,27 @@ sshd is running as pid 433.</screen>
systems.</para>
<para>Additional information can be found in &man.rc.8; and
&man.rc.subr.8;. Refer to <link xlink:href="&url.articles.rc-scripting;">this article</link> for
instructions on how to create custom &man.rc.8;
&man.rc.subr.8;. Refer to <link
xlink:href="&url.articles.rc-scripting;">this article</link>
for instructions on how to create custom &man.rc.8;
scripts.</para>
</sect1>
<sect1 xml:id="config-network-setup">
<info><title>Setting Up Network Interface Cards</title>
<info>
<title>Setting Up Network Interface Cards</title>
<authorgroup>
<author><personname><firstname>Marc</firstname><surname>Fonvieille</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Marc</firstname>
<surname>Fonvieille</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<indexterm>
<primary>network cards</primary>
<secondary>configuration</secondary>
@ -812,10 +883,11 @@ dc1: [ITHREAD]</screen>
<para>Alternatively, statically compile support for the
<acronym>NIC</acronym> into a custom kernel. Refer to
<filename>/usr/src/sys/conf/NOTES</filename>,
<filename>/usr/src/sys/arch/conf/NOTES</filename>
and the manual page of the driver to determine which line
to add to the custom kernel configuration file. For more
information about recompiling the kernel, refer to <xref linkend="kernelconfig"/>. If the
<filename>/usr/src/sys/arch/conf/NOTES</filename> and the
manual page of the driver to determine which line to add
to the custom kernel configuration file. For more
information about recompiling the kernel, refer to
<xref linkend="kernelconfig"/>. If the
<acronym>NIC</acronym> was detected at boot, the kernel
does not need to be recompiled.</para>
</listitem>
@ -824,10 +896,17 @@ dc1: [ITHREAD]</screen>
<sect3 xml:id="config-network-ndis">
<title>Using &windows; <acronym>NDIS</acronym> Drivers</title>
<indexterm><primary><acronym>NDIS</acronym></primary></indexterm>
<indexterm><primary>NDISulator</primary></indexterm>
<indexterm><primary>&windows; drivers</primary></indexterm>
<indexterm><primary>&microsoft.windows;</primary>
<indexterm>
<primary><acronym>NDIS</acronym></primary>
</indexterm>
<indexterm>
<primary>NDISulator</primary>
</indexterm>
<indexterm>
<primary>&windows; drivers</primary>
</indexterm>
<indexterm>
<primary>&microsoft.windows;</primary>
<secondary>device drivers</secondary>
</indexterm>
<indexterm>
@ -887,7 +966,8 @@ linuxemu/chapter.xml -->
&os;/amd64, a &windows; 64-bit driver is needed.</para>
<para>The next step is to compile the driver binary into a
loadable kernel module. As <systemitem class="username">root</systemitem>, use
loadable kernel module. As
<systemitem class="username">root</systemitem>, use
&man.ndisgen.8;:</para>
<screen>&prompt.root; <userinput>ndisgen /path/to/W32DRIVER.INF /path/to/W32DRIVER.SYS</userinput></screen>
@ -928,9 +1008,9 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
<para>To configure the system to load the &man.ndis.4; modules
at boot time, copy the generated module,
<filename>W32DRIVER_SYS.ko</filename>, to <filename>/boot/modules</filename>. Then, add the
following line to
<filename>/boot/loader.conf</filename>:</para>
<filename>W32DRIVER_SYS.ko</filename>, to
<filename>/boot/modules</filename>. Then, add the following
line to <filename>/boot/loader.conf</filename>:</para>
<programlisting>W32DRIVER_SYS_load="YES"</programlisting>
</sect3>
@ -1010,22 +1090,27 @@ lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; metric 0 mtu 16384
<listitem>
<para>The card has an Internet (<literal>inet</literal>)
address, <systemitem class="ipaddress">192.168.1.3</systemitem>.</para>
address, <systemitem
class="ipaddress">192.168.1.3</systemitem>.</para>
</listitem>
<listitem>
<para>It has a valid subnet mask
(<literal>netmask</literal>), where <systemitem class="netmask">0xffffff00</systemitem> is the same as
<systemitem class="netmask">255.255.255.0</systemitem>.</para>
(<literal>netmask</literal>), where
<systemitem class="netmask">0xffffff00</systemitem> is the
same as <systemitem
class="netmask">255.255.255.0</systemitem>.</para>
</listitem>
<listitem>
<para>It has a valid broadcast address, <systemitem class="ipaddress">192.168.1.255</systemitem>.</para>
<para>It has a valid broadcast address, <systemitem
class="ipaddress">192.168.1.255</systemitem>.</para>
</listitem>
<listitem>
<para>The <acronym>MAC</acronym> address of the card
(<literal>ether</literal>) is <systemitem class="etheraddress">00:a0:cc:da:da:da</systemitem>.</para>
(<literal>ether</literal>) is <systemitem
class="etheraddress">00:a0:cc:da:da:da</systemitem>.</para>
</listitem>
<listitem>
@ -1059,13 +1144,14 @@ lo0: flags=8049&lt;UP,LOOPBACK,RUNNING,MULTICAST&gt; metric 0 mtu 16384
<para>it would indicate the card has not been configured.</para>
<para>The card must be configured as <systemitem class="username">root</systemitem>.
The <acronym>NIC</acronym> configuration can be performed
from the command line with &man.ifconfig.8; but will not
persist after a reboot unless the configuration is also added
to <filename>/etc/rc.conf</filename>. Add a line for each
<acronym>NIC</acronym> present on the system, as seen in
this example:</para>
<para>The card must be configured as
<systemitem class="username">root</systemitem>. The
<acronym>NIC</acronym> configuration can be performed from the
command line with &man.ifconfig.8; but will not persist after
a reboot unless the configuration is also added to
<filename>/etc/rc.conf</filename>. Add a line for each
<acronym>NIC</acronym> present on the system, as seen in this
example:</para>
<programlisting>ifconfig_dc0="inet 192.168.1.3 netmask 255.255.255.0"
ifconfig_dc1="inet 10.0.0.1 netmask 255.255.255.0 media 10baseT/UTP"</programlisting>
@ -1266,21 +1352,24 @@ round-trip min/avg/max/stddev = 0.700/0.729/0.766/0.025 ms</screen>
<para>For example, consider the case where the
<filename>fxp0</filename> interface is connected to two
networks: <systemitem class="ipaddress">10.1.1.0</systemitem> with a
netmask of <systemitem class="netmask">255.255.255.0</systemitem> and
<systemitem class="ipaddress">202.0.75.16</systemitem> with a netmask of
<systemitem class="netmask">255.255.255.240</systemitem>. The system
is to be configured to appear in the ranges
networks: <systemitem class="ipaddress">10.1.1.0</systemitem>
with a netmask of
<systemitem class="netmask">255.255.255.0</systemitem> and
<systemitem class="ipaddress">202.0.75.16</systemitem> with a
netmask of
<systemitem class="netmask">255.255.255.240</systemitem>. The
system is to be configured to appear in the ranges
<systemitem class="ipaddress">10.1.1.1</systemitem> through
<systemitem class="ipaddress">10.1.1.5</systemitem> and
<systemitem class="ipaddress">202.0.75.17</systemitem> through
<systemitem class="ipaddress">202.0.75.20</systemitem>. Only the first
address in a given network range should have a real netmask.
All the rest (<systemitem class="ipaddress">10.1.1.2</systemitem> through
<systemitem class="ipaddress">202.0.75.20</systemitem>. Only
the first address in a given network range should have a real
netmask. All the rest
(<systemitem class="ipaddress">10.1.1.2</systemitem> through
<systemitem class="ipaddress">10.1.1.5</systemitem> and
<systemitem class="ipaddress">202.0.75.18</systemitem> through
<systemitem class="ipaddress">202.0.75.20</systemitem>) must be configured
with a netmask of
<systemitem class="ipaddress">202.0.75.20</systemitem>) must be
configured with a netmask of
<systemitem class="netmask">255.255.255.255</systemitem>.</para>
<para>The following <filename>/etc/rc.conf</filename> entries
@ -1298,18 +1387,30 @@ ifconfig_fxp0_alias7="inet 202.0.75.20 netmask 255.255.255.255"</programlisting>
</sect1>
<sect1 xml:id="configtuning-syslog">
<info><title>Configuring the System Logger,
<command>syslogd</command></title>
<info>
<title>Configuring the System Logger,
<command>syslogd</command></title>
<authorgroup>
<author><personname><firstname>Niclas</firstname><surname>Zeising</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Niclas</firstname>
<surname>Zeising</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<indexterm><primary>system logging</primary></indexterm>
<indexterm><primary>syslog</primary></indexterm>
<indexterm><primary>&man.syslogd.8;</primary></indexterm>
<indexterm>
<primary>system logging</primary>
</indexterm>
<indexterm>
<primary>syslog</primary>
</indexterm>
<indexterm>
<primary>&man.syslogd.8;</primary>
</indexterm>
<para>System logging is an important aspect of system
administration. It is used to detect hardware and software
@ -1322,7 +1423,8 @@ ifconfig_fxp0_alias7="inet 202.0.75.20 netmask 255.255.255.255"</programlisting>
system logger, &man.syslogd.8;, and how to perform log rotation
and log management using &man.newsyslog.8;. Focus will be on
setting up and using &man.syslogd.8; on a local machine. For
more advanced setups using a separate loghost, see <xref linkend="network-syslogd"/>.</para>
more advanced setups using a separate loghost, see
<xref linkend="network-syslogd"/>.</para>
<sect2>
<title>Using <command>syslogd</command></title>
@ -1857,12 +1959,19 @@ security.bsd.see_other_uids=0</programlisting>
</sect2>
<sect2 xml:id="sysctl-readonly">
<info><title>&man.sysctl.8; Read-only</title>
<info>
<title>&man.sysctl.8; Read-only</title>
<authorgroup>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Contributed by </contrib></author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
<contrib>Contributed by </contrib>
</author>
</authorgroup>
</info>
<para>In some cases it may be desirable to modify read-only
&man.sysctl.8; values, which will require a reboot of the
@ -2550,7 +2659,8 @@ kern.maxvnodes: 100000</screen>
on an existing partition.</para>
<para>For information on how to encrypt swap space, which options
exist, and why it should be done, refer to <xref linkend="swap-encrypting"/>.</para>
exist, and why it should be done, refer to
<xref linkend="swap-encrypting"/>.</para>
<sect2 xml:id="new-drive-swap">
<title>Swap on a New or Existing Hard Drive</title>
@ -2652,15 +2762,27 @@ kern.maxvnodes: 100000</screen>
</sect1>
<sect1 xml:id="acpi-overview">
<info><title>Power and Resource Management</title>
<info>
<title>Power and Resource Management</title>
<authorgroup>
<author><personname><firstname>Hiten</firstname><surname>Pandya</surname></personname><contrib>Written by </contrib></author>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname></author>
<author>
<personname>
<firstname>Hiten</firstname>
<surname>Pandya</surname>
</personname>
<contrib>Written by </contrib>
</author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
</author>
</authorgroup>
</info>
<para>It is important to utilize hardware resources in an
efficient manner. Before the Advanced Configuration and Power
Interface (<acronym>ACPI</acronym>) was introduced, it was
@ -2790,18 +2912,37 @@ kern.maxvnodes: 100000</screen>
</sect1>
<sect1 xml:id="ACPI-debug">
<info><title>Using and Debugging &os; <acronym>ACPI</acronym></title>
<info>
<title>Using and Debugging &os; <acronym>ACPI</acronym></title>
<authorgroup>
<author><personname><firstname>Nate</firstname><surname>Lawson</surname></personname><contrib>Written by </contrib></author>
<author>
<personname>
<firstname>Nate</firstname>
<surname>Lawson</surname>
</personname>
<contrib>Written by </contrib>
</author>
</authorgroup>
<authorgroup>
<author><personname><firstname>Peter</firstname><surname>Schultz</surname></personname><contrib>With contributions from </contrib></author>
<author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname></author>
<author>
<personname>
<firstname>Peter</firstname>
<surname>Schultz</surname>
</personname>
<contrib>With contributions from </contrib>
</author>
<author>
<personname>
<firstname>Tom</firstname>
<surname>Rhodes</surname>
</personname>
</author>
</authorgroup>
</info>
<indexterm>
<primary>ACPI</primary>
<secondary>problems</secondary>
@ -2925,11 +3066,12 @@ kern.maxvnodes: 100000</screen>
<acronym>ACPI</acronym> subsystem. For &os;, &intel; has
provided an interpreter (<acronym>ACPI-CA</acronym>) that is
shared with &linux; and NetBSD. The path to the
<acronym>ACPI-CA</acronym> source code is <filename>src/sys/contrib/dev/acpica</filename>.
The glue code that allows <acronym>ACPI-CA</acronym> to work
on &os; is in <filename>src/sys/dev/acpica/Osd</filename>.
Finally, drivers that implement various
<acronym>ACPI</acronym> devices are found in <filename>src/sys/dev/acpica</filename>.</para>
<acronym>ACPI-CA</acronym> source code is
<filename>src/sys/contrib/dev/acpica</filename>. The glue
code that allows <acronym>ACPI-CA</acronym> to work on &os; is
in <filename>src/sys/dev/acpica/Osd</filename>. Finally,
drivers that implement various <acronym>ACPI</acronym> devices
are found in <filename>src/sys/dev/acpica</filename>.</para>
</sect2>
<sect2 xml:id="ACPI-comprob">
@ -3320,11 +3462,12 @@ acpi_dsdt_name="/boot/DSDT.aml"</programlisting>
&amp;&amp; make clean &amp;&amp;
make ACPI_DEBUG=1</userinput></screen>
<para>Install <filename>acpi.ko</filename> in <filename>/boot/kernel</filename> and add the
desired level and layer to
<filename>/boot/loader.conf</filename>. This example enables
debug messages for all <acronym>ACPI-CA</acronym> components
and all <acronym>ACPI</acronym> hardware drivers such as
<para>Install <filename>acpi.ko</filename> in
<filename>/boot/kernel</filename> and add the desired level
and layer to <filename>/boot/loader.conf</filename>. This
example enables debug messages for all
<acronym>ACPI-CA</acronym> components and all
<acronym>ACPI</acronym> hardware drivers such as
(<acronym>CPU</acronym> and <acronym>LID</acronym>. It only
outputs error messages at the least verbose level.</para>
@ -3353,30 +3496,30 @@ debug.acpi.level="ACPI_LV_ERROR"</programlisting>
</listitem>
<listitem>
<para>The <acronym>ACPI</acronym> Mailing List Archives
<uri xlink:href="http://lists.freebsd.org/pipermail/freebsd-acpi/">http://lists.freebsd.org/pipermail/freebsd-acpi/</uri></para>
<para>The <acronym>ACPI</acronym> Mailing List Archives <uri
xlink:href="http://lists.freebsd.org/pipermail/freebsd-acpi/">http://lists.freebsd.org/pipermail/freebsd-acpi/</uri></para>
</listitem>
<listitem>
<para>The old <acronym>ACPI</acronym> Mailing List Archives
<uri xlink:href="http://home.jp.FreeBSD.org/mail-list/acpi-jp/">http://home.jp.FreeBSD.org/mail-list/acpi-jp/</uri></para>
<uri
xlink:href="http://home.jp.FreeBSD.org/mail-list/acpi-jp/">http://home.jp.FreeBSD.org/mail-list/acpi-jp/</uri></para>
</listitem>
<listitem>
<para>The <acronym>ACPI</acronym> 2.0 Specification
<uri xlink:href="http://acpi.info/spec.htm">http://acpi.info/spec.htm</uri></para>
<para>The <acronym>ACPI</acronym> 2.0 Specification <uri
xlink:href="http://acpi.info/spec.htm">http://acpi.info/spec.htm</uri></para>
</listitem>
<listitem>
<para>&man.acpi.4;,
&man.acpi.thermal.4;, &man.acpidump.8;, &man.iasl.8;,
and &man.acpidb.8;</para>
<para>&man.acpi.4;, &man.acpi.thermal.4;, &man.acpidump.8;,
&man.iasl.8;, and &man.acpidb.8;</para>
</listitem>
<listitem>
<para><link xlink:href="http://www.cpqlinux.com/acpi-howto.html#fix_broken_dsdt">
<acronym>DSDT</acronym> debugging
resource</link>.</para>
<para><link
xlink:href="http://www.cpqlinux.com/acpi-howto.html#fix_broken_dsdt"><acronym>DSDT</acronym>
debugging resource</link>.</para>
</listitem>
</itemizedlist>
</sect2>