包含在查找更多文档专项支持资源 | 以 PDF 格式下载本书 (191 KB)
Appendix A Configuring Power Management Using the Command LineThis chapter explains how you can change the system default settings for the Power Management utilities on systems that are not configured to run the CDE or OpenWindows environment. Also, you can edit the /etc/power.conf file to change the definition of idleness for a system in ways that cannot be set through the dtpower user interface. Note - Refer to the power.conf(4) man page for additional information. Idleness DefinitionIn earlier releases of Power Management software, inactivity of a system was defined only in terms of the amount of time since the last keyboard or mouse activity. Now, additional aspects of a machine's activity are taken into account. By default, a machine is considered inactive when all of these conditions apply:
To change the idleness definition from these defaults, see "Changing the Idleness Definition". Note - Running a screen saver pattern in CDE, other than the blank screen option, may create additional system activity that prevents the system from being idle enough to qualify for AutoShutdown. To enable a system that runs a screen pattern to AutoShutdown at a specified idle time, you may need to change the threshold settings for load average or disk reads. The power.conf FileThe power.conf file in the /etc directory lets you set the configuration for managing system power. It also enables you to set display power configurations that are followed for that display when a CDE or OpenWindows desktop isn't present. (See Chapter 2, Power Managing Displays, for details on managing display power in those windowing environments.) The default /etc/power.conf file has the following content:
Logical DependentsIn the /etc/power.conf file, there are entries for "Logical Dependent(s)." These are physical devices (such as a mouse) whose activity is related to another device (such as a frame buffer) without being physically attached to it. If a logical dependent device is active, then the main device is considered active as well. This affects idle times for the main device. Becoming SuperuserTo change any of the system default settings by using the procedures in this section, you first must become superuser. To Become SuperuserSetting Device Idle TimeYou specify the length of idle time before a system device (such as a screen) uses the low power mode by changing the threshold field in the /etc/power.conf file. To Change the Length of Idle Time
Setting AutoShutdownTo Change the Automatic Shutdown Time
Changing the Idleness DefinitionYou can change the idleness definition for a system from the default by adding entries to the /etc/power.conf file. These entries change the thresholds for certain system operations that could occur on a system that was still considered inactive:
You cannot, however, change the threshold for keyboard or mouse activity. Any such activity concludes the period of idleness for a system. For example, you can revise your power.conf file to change the system's idleness definition so that it is still considered idle if:
The resulting /etc/power.conf file appears like the following:
Using a Script to Define IdlenessYou can create a script that tests additional criteria that must be met before a system is considered inactive long enough to trigger an autoshutdown. After all other idleness criteria have been met, an idlecheck entry in the /etc/power.conf file causes the script you name in that entry to run. For example, a script located in the /home/grumpy directory will be run on a system that has the following idlecheck line in its /etc/power.conf file whenever the system has been idle according to all other criteria defined in the power.conf file:
Your script should return an exit code representing minutes of idle time. If the exit code is equal or greater than the idle time listed in the "autoshutdown" entry of the /etc/power.conf file, your system will shut down. If the script reports a lower number than the stated idle time, your system will not shut down. Note - When you create such a script for idlecheck, make sure it is executable and that it returns an exit code. If the script does not produce an explicit exit code, the value zero is returned, which indicates that the system is busy and autoshutdown does not occur. Changing the Statefile LocationWhen the system is suspended, a statefile is created by the Suspend-Resume software that preserves checkpoint information about that system at the time it was shut down. You can specify any UFS location for this statefile by editing the /etc/power.conf file to include an entry in this format:
For location, provide the absolute path name of a local UFS file. The size of the file created at this location depends on a variety of factors, including the size of the system's memory, the number of loadable drivers or modules in use, the number and type of processes running, and the amount of user memory that has been "locked down." Power Management for Two Monitors on One SystemIf your workstation has two monitors (sometimes called a "double-headed system"), Power Management of both displays is supported through the CDE and OpenWindows windowing environments. The /etc/power.conf file no longer needs to be edited to provide support for the second monitor. |
|||||||||||