From owner-svn-doc-head@FreeBSD.ORG Thu Jan 30 23:09:22 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0CBA273; Thu, 30 Jan 2014 23:09:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4EB1FD2; Thu, 30 Jan 2014 23:09:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0UN9Mwo081720; Thu, 30 Jan 2014 23:09:22 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0UN9MVm081719; Thu, 30 Jan 2014 23:09:22 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201401302309.s0UN9MVm081719@svn.freebsd.org> From: Warren Block Date: Thu, 30 Jan 2014 23:09:22 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43704 - head/en_US.ISO8859-1/books/handbook/config X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 23:09:22 -0000 Author: wblock Date: Thu Jan 30 23:09:22 2014 New Revision: 43704 URL: http://svnweb.freebsd.org/changeset/doc/43704 Log: Whitespace-only fixes, translators please ignore. Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/config/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/config/chapter.xml Thu Jan 30 22:57:31 2014 (r43703) +++ head/en_US.ISO8859-1/books/handbook/config/chapter.xml Thu Jan 30 23:09:22 2014 (r43704) @@ -4,26 +4,53 @@ $FreeBSD$ --> - - Configuration and Tuning + + + + Configuration and Tuning + - ChernLeeWritten by + + + Chern + Lee + + Written by + + - MikeSmithBased on a tutorial written by + + + Mike + Smith + + Based on a tutorial written by + + - MattDillonAlso based on tuning(7) written by + + + Matt + Dillon + + Also based on tuning(7) written by + - - Synopsis - system configuration - system optimization + + system configuration + + + system optimization + One of the important aspects of &os; is proper system configuration. This chapter explains much of the &os; @@ -54,7 +81,8 @@ - How to use the various configuration files in /etc. + How to use the various configuration files in + /etc. @@ -71,7 +99,8 @@ - Understand &unix; and &os; basics (). + Understand &unix; and &os; basics + (). @@ -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 - /usr should be placed - toward the inner parts of the disk. It is a good idea to - create partitions in an order similar to: /, swap, + /usr should be placed toward the inner + parts of the disk. It is a good idea to create partitions + in an order similar to: /, swap, /var, and /usr. - The size of the - /var partition - reflects the intended machine's usage. This partition - is used to hold mailboxes, log files, and printer spools. + The size of the /var 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 /var. + 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 + /var. Sometimes, a lot of disk space is required in - /var/tmp. When - new software is installed with &man.pkg.add.1;, the - packaging tools extract a temporary copy of the packages - under /var/tmp. - Large software packages, like - Firefox, + /var/tmp. When new software is + installed with &man.pkg.add.1;, the packaging tools + extract a temporary copy of the packages under + /var/tmp. Large software packages, + like Firefox, OpenOffice or LibreOffice may be tricky to - install if there is not enough disk space under /var/tmp. + install if there is not enough disk space under + /var/tmp. - The /usr - 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. + The /usr 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. When selecting partition sizes, keep the space requirements in mind. Running out of space in one partition @@ -147,17 +175,21 @@ The Auto-defaults partition sizer used by &man.sysinstall.8; will sometimes select smaller - than adequate /var - and / partitions. - Partition wisely and generously. + than adequate /var and + / partitions. Partition wisely and + generously. Swap Partition - swap sizing - swap partition + + swap sizing + + + swap partition + As a rule of thumb, the swap partition should be about double the size of physical memory (RAM) @@ -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 /usr partitions are - read-mostly, with few writes, while a lot of reads and - writes could occur in /var and /var/tmp. + to tune accordingly. For example, the root and + /usr partitions are read-mostly, with + few writes, while a lot of reads and writes could occur in + /var and + /var/tmp. 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 /var 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. + disk will not lead to a significant performance improvement + over moving /var 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. @@ -286,9 +320,10 @@ ifconfig_fxp0="inet 10.1.1.1/8"/usr/local/etc - Typically, these files are installed in /usr/local/etc. In the case - where an application has a large number of configuration - files, a subdirectory will be created to hold them. + Typically, these files are installed in + /usr/local/etc. In the case where an + application has a large number of configuration files, a + subdirectory will be created to hold them. 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" - Starting Services + + Starting Services + - TomRhodesContributed by + + + Tom + Rhodes + + Contributed by + - - - services + + services + 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 mail/postfix or - www/apache22 are just two - of the many software packages which may be started during system + www/apache22 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. @@ -345,7 +388,8 @@ ifconfig_fxp0="inet 10.1.1.1/8"Now that &os; includes rc.d, configuration of application startup is easier and provides - more features. Using the key words discussed in , applications can be set to + more features. Using the key words discussed in + , applications can be set to start after certain other services and extra flags can be passed through /etc/rc.conf in place of hard coded flags in the start up script. A basic script may @@ -416,50 +460,62 @@ run_rc_command "$1" - Configuring &man.cron.8; + + Configuring &man.cron.8; + - TomRhodesContributed by + + + Tom + Rhodes + + Contributed by + - - cron - configuration + + cron + configuration + One of the most useful utilities in &os; is &man.cron.8;. This utility runs in the background and regularly checks /etc/crontab for tasks to execute and - searches /var/cron/tabs - for custom &man.crontab.5; files. These files store - information about specific functions which &man.cron.8; is - supposed to perform at certain times. + searches /var/cron/tabs for custom + &man.crontab.5; files. These files store information about + specific functions which &man.cron.8; is supposed to perform at + certain times. Two different types of configuration files are used by &man.cron.8;: the system crontab and user - crontabs. These formats only differ in - the sixth field and later. In the system + crontabs. These formats only differ in the + sixth field and later. In the system crontab, &man.cron.8; runs the command as the user specified in the sixth field. In a user crontab, all commands run as the user who - created the crontab, so the sixth field - is the last field; this is an important security feature. - The final field is always the command to run. + created the crontab, so the sixth field is + the last field; this is an important security feature. The + final field is always the command to run. User crontabs allow individual users to schedule tasks - without the need for root privileges. + without the need for + root privileges. Commands in a user's crontab run with the permissions of the user who owns the crontab. - The root user can have a user - crontab just like any other user. The - root user crontab - is separate from the system crontab, + The root user + can have a user crontab just like any + other user. The + root user + crontab is separate from the system + crontab, /etc/crontab. Because the system crontab invokes the specified commands as - root, there is usually no need to create - a user crontab for - root. + root, there is + usually no need to create a user crontab + for root. Here is a sample entry from @@ -527,8 +583,9 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin * characters mean first-last, and can be interpreted as every time. In this example, - &man.atrun.8; is invoked by root - every five minutes, regardless of the day or month. + &man.atrun.8; is invoked by + root every five + minutes, regardless of the day or month. 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 Do not use the procedure described here to edit and install the system crontab, - /etc/crontab. Instead, use an - editor and &man.cron.8; will notice that the file has - changed and immediately begin using the updated version. - See - this FAQ entry for more information. + /etc/crontab. Instead, use an editor + and &man.cron.8; will notice that the file has changed and + immediately begin using the updated version. See this + FAQ entry for more information. To install a freshly written user &man.crontab.5;, use @@ -581,14 +638,20 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin - Using &man.rc.8; Under &os; + + Using &man.rc.8; Under &os; + - TomRhodesContributed by + + + Tom + Rhodes + + Contributed by + - - In 2002, &os; integrated the NetBSD &man.rc.8; system for system initialization. The files listed in /etc/rc.d provide basic @@ -646,7 +709,8 @@ sshd_enable="YES" The # sshd line is output from the - above command, not a root console. + above command, not a + root console. To determine whether or not a service is running, use @@ -723,20 +787,27 @@ sshd is running as pid 433. systems. Additional information can be found in &man.rc.8; and - &man.rc.subr.8;. Refer to this article for - instructions on how to create custom &man.rc.8; + &man.rc.subr.8;. Refer to this article + for instructions on how to create custom &man.rc.8; scripts. - Setting Up Network Interface Cards + + Setting Up Network Interface Cards + - MarcFonvieilleContributed by + + + Marc + Fonvieille + + Contributed by + - - network cards configuration @@ -812,10 +883,11 @@ dc1: [ITHREAD] Alternatively, statically compile support for the NIC into a custom kernel. Refer to /usr/src/sys/conf/NOTES, - /usr/src/sys/arch/conf/NOTES - 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 . If the + /usr/src/sys/arch/conf/NOTES 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 + . If the NIC was detected at boot, the kernel does not need to be recompiled. @@ -824,10 +896,17 @@ dc1: [ITHREAD] Using &windows; <acronym>NDIS</acronym> Drivers - NDIS - NDISulator - &windows; drivers - µsoft.windows; + + NDIS + + + NDISulator + + + &windows; drivers + + + µsoft.windows; device drivers @@ -887,7 +966,8 @@ linuxemu/chapter.xml --> &os;/amd64, a &windows; 64-bit driver is needed. The next step is to compile the driver binary into a - loadable kernel module. As root, use + loadable kernel module. As + root, use &man.ndisgen.8;: &prompt.root; ndisgen /path/to/W32DRIVER.INF /path/to/W32DRIVER.SYS @@ -928,9 +1008,9 @@ ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18M To configure the system to load the &man.ndis.4; modules at boot time, copy the generated module, - W32DRIVER_SYS.ko, to /boot/modules. Then, add the - following line to - /boot/loader.conf: + W32DRIVER_SYS.ko, to + /boot/modules. Then, add the following + line to /boot/loader.conf: W32DRIVER_SYS_load="YES" @@ -1010,22 +1090,27 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,M The card has an Internet (inet) - address, 192.168.1.3. + address, 192.168.1.3. It has a valid subnet mask - (netmask), where 0xffffff00 is the same as - 255.255.255.0. + (netmask), where + 0xffffff00 is the + same as 255.255.255.0. - It has a valid broadcast address, 192.168.1.255. + It has a valid broadcast address, 192.168.1.255. The MAC address of the card - (ether) is 00:a0:cc:da:da:da. + (ether) is 00:a0:cc:da:da:da. @@ -1059,13 +1144,14 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,M it would indicate the card has not been configured. - The card must be configured as root. - The NIC 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 /etc/rc.conf. Add a line for each - NIC present on the system, as seen in - this example: + The card must be configured as + root. The + NIC 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 + /etc/rc.conf. Add a line for each + NIC present on the system, as seen in this + example: 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" @@ -1266,21 +1352,24 @@ round-trip min/avg/max/stddev = 0.700/0. For example, consider the case where the fxp0 interface is connected to two - networks: 10.1.1.0 with a - netmask of 255.255.255.0 and - 202.0.75.16 with a netmask of - 255.255.255.240. The system - is to be configured to appear in the ranges + networks: 10.1.1.0 + with a netmask of + 255.255.255.0 and + 202.0.75.16 with a + netmask of + 255.255.255.240. The + system is to be configured to appear in the ranges 10.1.1.1 through 10.1.1.5 and 202.0.75.17 through - 202.0.75.20. Only the first - address in a given network range should have a real netmask. - All the rest (10.1.1.2 through + 202.0.75.20. Only + the first address in a given network range should have a real + netmask. All the rest + (10.1.1.2 through 10.1.1.5 and 202.0.75.18 through - 202.0.75.20) must be configured - with a netmask of + 202.0.75.20) must be + configured with a netmask of 255.255.255.255. The following /etc/rc.conf entries @@ -1298,18 +1387,30 @@ ifconfig_fxp0_alias7="inet 202.0.75.20 n - Configuring the System Logger, - <command>syslogd</command> + + Configuring the System Logger, + <command>syslogd</command> + - NiclasZeisingContributed by + + + Niclas + Zeising + + Contributed by + - - - system logging - syslog - &man.syslogd.8; + + system logging + + + syslog + + + &man.syslogd.8; + 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 n 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 . + more advanced setups using a separate loghost, see + . Using <command>syslogd</command> @@ -1857,12 +1959,19 @@ security.bsd.see_other_uids=0 - &man.sysctl.8; Read-only + + &man.sysctl.8; Read-only + - TomRhodesContributed by + + + Tom + Rhodes + + Contributed by + - 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 on an existing partition. For information on how to encrypt swap space, which options - exist, and why it should be done, refer to . + exist, and why it should be done, refer to + . Swap on a New or Existing Hard Drive @@ -2652,15 +2762,27 @@ kern.maxvnodes: 100000 - Power and Resource Management + + Power and Resource Management + - HitenPandyaWritten by - TomRhodes + + + Hiten + Pandya + + Written by + + + + + Tom + Rhodes + + - - It is important to utilize hardware resources in an efficient manner. Before the Advanced Configuration and Power Interface (ACPI) was introduced, it was @@ -2790,18 +2912,37 @@ kern.maxvnodes: 100000 - Using and Debugging &os; <acronym>ACPI</acronym> + + Using and Debugging &os; <acronym>ACPI</acronym> + - NateLawsonWritten by + + + Nate + Lawson + + Written by + + - PeterSchultzWith contributions from - TomRhodes + + + Peter + Schultz + + With contributions from + + + + + Tom + Rhodes + + - - ACPI problems @@ -2925,11 +3066,12 @@ kern.maxvnodes: 100000 ACPI subsystem. For &os;, &intel; has provided an interpreter (ACPI-CA) that is shared with &linux; and NetBSD. The path to the - ACPI-CA source code is src/sys/contrib/dev/acpica. - The glue code that allows ACPI-CA to work - on &os; is in src/sys/dev/acpica/Osd. - Finally, drivers that implement various - ACPI devices are found in src/sys/dev/acpica. + ACPI-CA source code is + src/sys/contrib/dev/acpica. The glue + code that allows ACPI-CA to work on &os; is + in src/sys/dev/acpica/Osd. Finally, + drivers that implement various ACPI devices + are found in src/sys/dev/acpica. @@ -3320,11 +3462,12 @@ acpi_dsdt_name="/boot/DSDT.aml" - Install acpi.ko in /boot/kernel and add the - desired level and layer to - /boot/loader.conf. This example enables - debug messages for all ACPI-CA components - and all ACPI hardware drivers such as + Install acpi.ko in + /boot/kernel and add the desired level + and layer to /boot/loader.conf. This + example enables debug messages for all + ACPI-CA components and all + ACPI hardware drivers such as (CPU and LID. It only outputs error messages at the least verbose level. @@ -3353,30 +3496,30 @@ debug.acpi.level="ACPI_LV_ERROR" - The ACPI Mailing List Archives - http://lists.freebsd.org/pipermail/freebsd-acpi/ + The ACPI Mailing List Archives http://lists.freebsd.org/pipermail/freebsd-acpi/ The old ACPI Mailing List Archives - http://home.jp.FreeBSD.org/mail-list/acpi-jp/ + http://home.jp.FreeBSD.org/mail-list/acpi-jp/ - The ACPI 2.0 Specification - http://acpi.info/spec.htm + The ACPI 2.0 Specification http://acpi.info/spec.htm - &man.acpi.4;, - &man.acpi.thermal.4;, &man.acpidump.8;, &man.iasl.8;, - and &man.acpidb.8; + &man.acpi.4;, &man.acpi.thermal.4;, &man.acpidump.8;, + &man.iasl.8;, and &man.acpidb.8; - - DSDT debugging - resource. + DSDT + debugging resource.