Solaris Reference Manual for SMCC-Specific Software
只搜尋這本書
以 PDF 格式下載這本書

NAME

power.conf - power management configuration information file

SYNOPSIS

/etc/power.conf

AVAILABILITY

SUNWpmr

DESCRIPTION

The power.conf file is used by the power management configuration program, pmconfig(1M), to initialize the settings for power management of the system.
There are two types of entries in the power.conf file, device management entries and system management entries. These two types of entries are described in the corresponding sections below.

DEVICE MANAGEMENT

Devices not appearing in this file will not be power managed without explicit configuration using the power management pseudo driver (see pm (7D)). It is recommended the power management framework be fully understood before modifying device management entries in this file. Although inappropriate settings will not cause system damage, severe performance reduction may result.
Device management entries consist of line by line listings of the devices to be configured. Each line is of the form:
device_name
threshold . . .
dependents . . .
Each line must contain a device_name field and a threshold field; it may also contain a dependents field. The fields must be in that order (device_name, threshold, dependents). Fields and sub-fields are separated by white space (tabs or spaces). A line may be more than 80 characters. If a newline character is preceded by a backslash ('\') it will be treated as white space. Comment lines must begin with a hash character ('#').
The device_name field specifies the device to be configured. device_name is either a pathname specifying the device special file or a "relative" pathname containing the name of the device special file. When using the latter format, instead of using the full pathname, it is possible to omit the portion of the pathname specifying the parent devices. This includes the leading '/'. Using this "relative" pathname format, the first device found with a full pathname containing device_name as its tail is matched. In either case, the leading /devices component of the pathname does not need to be specified.
For example, a SCSI disk target with the following full path name:
/iommu@f,e000/sbus@f,e001/espdma@f,4000/esp@f,8000/sd@1,0
may also be specified as:
sbus@f,e000/espdma@f,4000/esp@f,8000/sd@1,0
or
esp@f,8000/sd@1,0
or
sd@1,0
The threshold field is used to configure the power manageable components of a device. These components represent entities within a device which may be power managed separately. This field may contain as many integer values as the device has components. Each threshold time specifies the idle time in seconds before the respective component may be powered down. If there are fewer component threshold times than device components, the remaining components are not power managed. To explicitly disable power down for a component use a value of -1 . At least one component threshold must be specified per device (in the file).
The dependents field may contain a list of logical dependents for this device. A logical dependent is a selected device that is not physically connected to the power managed device (e.g. the display and the keyboard). A dependent device is one which must be idle and powered down before the managed device may be powered down. The dependents field entries use the same formats allowed in the first field and are separated by white space. A device must previously have been configured before it may be used as a dependent.

SYSTEM MANAGEMENT

The system management entries control power management for the system as a whole. They are distinguished by the use of the special device names below.
Note that the following (autoshutdown) entry is not intended to be hand edited, but to be maintained by dtpower(1M).
If the device_name field contains the special device name " autoshutdown", the threshold value specifies the system idle time (measured as discussed below) before the system may be shut down by powerd (1M). The threshold value is followed by start and finish times (each in the format hh:mm) which specify the time period during which the system may be automatically shut down (see powerd (1M)). Following the start and finish times is the behavior field, consisting of one of the words shutdown, noshutdown, autowakeup, or default.
If the behavior field is shutdown then the system will be automatically shut down when it has been idle for the number of minutes specified in the threshold value and the time of day falls between the start and finish values.
If the behavior field is noshutdown then the system is never automatically shut down.
If the behavior field is autowakeup and the hardware has the capability to do autowakeup, then the system is shut down as if the value were shutdown and the system will be restarted automatically the next time that the time of day equals the finish time.
If the behavior field is default then the behavior of the system will depend upon which model it is. Desktop models which were first put into production after October 1, 1995 will behave as if the behavior field were set to shutdown and desktop models first put into production before this date and server models will act as if the behavior field were set to noshutdown. The determination of default behavior is made by looking for the existence of a root node property named energystar-v2.
If the device_name field contains the special device name " ttychars", the threshold field will be interpreted as the maximum number of tty characters which may pass through the ldterm module and the system still be considered to be idle. If no entry is provided this
value defaults to 0.
If the device_name field contains the special device name " loadaverage", the (floating point) threshold field will be interpreted as the maximum load average that may be seen and the system still be considered to be idle. If no entry is provided this value defaults to 0.04.
If the device_name field contains the special device name " diskreads", the threshold field will be interpreted as the maximum number of disk reads which may be done by the system and the system will still be considered to be idle. If no entry is provided this value defaults to 0.
If the device_name field contains the special device name " nfsreqs", the threshold field will be interpreted as the maximum number of NFS requests which may be sent or received by the system and it still be considered to be idle. Null requests, access requests and gettattr requests are excluded from this count. If no entry is provided this value defaults to 0.
The values for tty characters, disk reads and NFS requests are determined by periodic sampling of the kstat interface. The thresholds for these events apply to a period extending into the past for system idle time minutes as specified in the " autoshutdown" entry described above.
The value for load average is also determined by periodic sampling of the kstat interface. The threshold for this value is an instantaneous one. The system won't be considered idle with respect to load average until system idle time minutes have passed with the sampled load average value not exceeding the threshold.
If the device_name field contains the special device name " idlecheck", the device_name field must be followed by the pathname of a program to be executed to determine if the system is idle. If autoshutdown is enabled and the console keyboard, mouse, tty, CPU (as indicated by load average), network (as measured by NFS requests) and disk (as measured by read activity) have been idle for the amount of time specified in the autoshutdown entry specified above, and the time of day falls between the start and finish times, then this program will be executed to check for other idleness criteria. The value of the idle time specified in the above autoshutdown entry will be passed to the program in the environment variable PM_IDLETIME. The process must terminate with an exit code which represents the number of minutes that the process considers the system to have been idle.
There is no default idlecheck entry. The default behavior is to consider only mouse, keyboard, tty, load average, NFS requests and disk reads as indicators of non-idleness. To extend the definition of non-idleness a shell script can be created which must exit with the number of minutes it considers the system to have been idle by its criteria. The path to this new script can then be put in the idlecheck entry in power.conf.

EXAMPLES

The following is a sample power.conf file.
# This is a sample power management configuration file
# Fields must be separated by white space.
#

# Name            Threshold(s)   Logical Dependent(s)
/dev/kbd          1800
/dev/mouse        1800
/dev/fb           0 0             /dev/kbd /dev/mouse

#Example of a second display
/dev/fb1          0 0             /dev/kbd /dev/mouse

# This entry is maintained by dtpower(1M)
# This (default as of SunOS 2.5) entry causes the system to be shut down
# after 30 minutes of idle time if it is a model first shipped after
# Oct 1, 1995. Older models default to noshutdown.
#
#                                       autoshutdown in effect
# Auto-Shutdown         Idle(min)       Start/Finish(hh:mm)     Behavior
autoshutdown            30      9:00 9:00               default

# Idlecheck program is passed autoshutdown idle time entry in $PM_IDLETIME
# returns number of minutes the system has been idle in exit code
idlecheck   /home/critical/idlecheck

The following is a sample idlecheck script.
#!/bin/sh
# This is a sample idlecheck script which considers the system not idle
# if user critical is logged in

critical=`who|grep -w critical`
if [ "$critical" ]              # if "$critical" is not null string
then
        exit 0                  # not idle because critical logged in
else
        exit $PM_IDLETIME       # idle long enough
fi

SEE ALSO

dtpower(1M), pmconfig(1M), powerd (1M),pm (7D)
Writing Device Drivers

NOTES

The default behavior for desktop models introduced after October 1, 1995 is to shut down after 30 minutes of idleness any time of day. dtpower(1M) can be used to change the default.
This behavior being the default as shipped is mandated by the US Government Environmental Protection Agency as a requirement for EnergyStar compliance. The user might want to use dtpower(1M) to set the autoshutdown start time to the end of the normal work day and to set the autoshutdown stop time to the start of the normal work day.
Remember that physical dependents are automatically included by the power manager and need not be specified.
The default power.conf file supports the standard hardware configuration. For each additional power manageable device (e.g. second display), a new entry must be manually added to the power.conf file and pmconfig(1M) executed to activate the new change.
Powering devices up and down frequently may reduce device reliability, especially for devices not designed for power management. Do not put additional devices under power management unless the hardware documentation permits it. At this time most SCSI hard disks are not power manageable.