Oracle® Solaris 11.2 Tunable Parameters Reference Manual

Exit Print View

Updated: December 2014
 
 

/etc/system File and the /etc/system.d Directory

The /etc/system file provides a static mechanism for adjusting the values of kernel parameters. Values specified in this file are read at boot time and are applied. Any changes that are made to the file are not applied to the operating system until the system is rebooted.

One pass is made to set all the values before the configuration parameters are calculated.


Note -  To tune parameters, set the parameter value in a configuration file in the /etc/system.d directory. Do not modify the /etc/system file directly.
Example 1-1  Setting a ZFS Parameter for a Specific System

The following entry sets the ZFS ARC maximum (zfs_arc_max) to 30 GB.

set zfs:zfs_arc_max = 0x780000000

Suppose that the name of your company is Widget, Inc. You would store this entry in the widget:zfs or similarly named file in the /etc/system.d directory. When the system is booted, all parameter configurations in /etc/system.d are added to the /etc/system file. The system is then configured according to the contents of /etc/system.

Recovering From an Incorrect Value

You can recover from an incorrect value by using one of the following approaches:

Resetting the Parameter in the /etc/system.d/file

Remove the defective parameter setting from your configuration file in the /etc/system.d directory. At boot time, the /etc/system file is updated with the previous configurations which are then reapplied to the system.

Using a Cloned Boot Environment

Before you introduce system parameter changes, clone the boot environment first.

# beadm create BE-clonename

Then, if your current BE becomes unusable after applying changes to /etc/system, reboot the system. From the x86 GRUB menu or SPARC boot menu, select the BE clone. After booting completes, you can optionally activate the BE clone to become the default BE to be used in subsequent system boots.

Using File Copies

Make a copy of the /etc/system file before updating it with new parameters from configuration files in the /etc/system.d directory so that you can easily recover from incorrect value. For example:

# cp /etc/system /etc/system.good

If a value specified in the configuration file in /etc/system.d causes the system to become unbootable, you can recover with the following command:

ok boot -a

This command causes the system to ask for the name of various files used in the boot process. Press the Return key to accept the default values until the name of the /etc/system file is requested. When the Name of system file [/etc/system]: prompt is displayed, type the name of the good /etc/system file or /dev/null:

Name of system file [/etc/system]: /etc/system.good

If /dev/null is specified, this path causes the system to attempt to read from /dev/null for its configuration information. Because this file is empty, the system uses the default values. After the system is booted, the /etc/system file can be corrected.

For more information on system recovery, see Troubleshooting System Administration Issues in Oracle Solaris 11.2 .