通过在 /etc/power.conf 文件中添加条目,可以改变系统对闲置的默认定义。这些条目将改变某些可能发生在一仍被认为是不活动的系统上的系统操作之阈值:
ttychars 改变在系统被认为处于活动状态以前可输入或输出的 TTY 字符数(默认值为无字符)
diskreads 改变在系统被认为处于活动状态以前可发生的读取磁盘的次数(默认值为无读盘)
nfsreqs 改变在系统被认为处于活动状态以前可发生的 NFS 请求的次数(默认值为无 NFS 请求)
loadaverage 改变在系统被认为处于活动状态以前所达到的一分钟加载平均值(默认值 为 0.04)
然而,不可改变键盘或鼠标活动的阈值。这些设备的任何活动将终止系统的闲置期。
例如,可以修改 power.conf 文件来改变系统的闲置定义,使其在下列情况时仍然被认为处于闲置状态:
输入或输出不超过 400 个 TTY 字符
读取磁盘次数不超过 10
发生的 NFS 请求不超过 5 次
一分钟加载平均值尚未超过 0.1
# Power Management Configuration File # # Putting an entry in this file will only be effective if the # driver for the device supports device power management. # After the file is modified, pmconfig(1M) command must be # executed to activate the new change. # # Fields must be separated by white space or semicolons. # Note that physical dependents are automatically considered # by the power management framework. # Name Threshold(s) Logical Dependent(s) /dev/kbd 1800 /dev/mouse 1800 # NOTE: The entries below are only used when no window # system is running. When running the window system, monitor # power management is done by the screen saver functions. /dev/fb 0 0 /dev/kbd /dev/mouse # Auto-Shutdown Idle(min) Start/finish(hh:mm) Behavior autoshutdown 30 15:00 8:00 default statefile /.CPR ttychars 400 diskreads 10 nfsreqs 5 loadaverage 0.1>