Editing /etc/power.conf
March 3, 2008 10:50 am Solaris AdminThis weekend i moved my Sun boxes to the garage into a new Sun rack. Only one server was powered up and i found myself having to constantly go into the garage as there was no connectivity. I found the server was running but there was nothing on the console. I plugged a monitor in to find a login screen which was odd. I then plugged mouse and kb in and had to reboot after which it was fine, at least for a while. The next morning i again had lost connectivity. I went back to the garage and found the monitor black and no console output but the system was running. I rebooted again and again it looked like all was fine. I looked at the messages file which detail no issues. So i have been looking at the /etc/power.conf file.
anouk:/ # cat /etc/power.conf
# Copyright (c) 1996 - 2001 by Sun Microsystems, Inc.
# All rights reserved.
#
#pragma ident “@(#)power.conf 1.16 01/03/19 SMI”
#
# Power Management Configuration File
#
# This entry keeps removable media from being powered down unless the
# console framebuffer and monitor are powered down
# (See removable-media(9P))
device-dependency-property removable-media /dev/fb
autopm default
statefile //.CPR
# Auto-Shutdown Idle(min) Start/Finish(hh:mm) Behavior
autoshutdown 30 9:00 9:00 noshutdown
So this is not shutting anything down. I thought while i’m here let’s look at the options for this file. The reality of course is that you’re very unlikely to ever want to change this.
A system is considered idle with the following conditions: No mouse or keyboard activity, no tty characters are input, no disk activity and no nfs requests. In example 1 let’s change the idle conditions.
autoshutdown 30 17:00 8:00 default ttychars 400 diskreads 10 nfsreqs 5 loadaverage 0.1
So now the system will be considered idle if no more than 400 characters are input or output. No more than 10 disk reads occur or 5 nfs requests. A 1 minute load average whilst idle is no more than 0.04 so in this case it is set to 0.1. The autoshutdown line means that shutdown will only occur after a system is idle for 30 minutes between 5pm and 8am. The default behavior value depends upon the model. For some it will mean auto shutdown and not for others. So better to be specific.
autoshutdown 30 17:00 8:00 noshutdown
So with this setting the system will not shut down. If you do make changes don’t forget to inform the power management framework with the new settings in the /etc/power.conf file.
anouk:/ # /usr/sbin/pmconfig
See also man pages for power.conf and the Solaris 10 sys admin guide.