Link to home
Start Free TrialLog in
Avatar of Jay Schwegler
Jay SchweglerFlag for United States of America

asked on

Unattended Shutdown

Quick question concerning the Native Windows 2000 unattended shutdown features that work with UPS devices.

Obviously there is a section in the configuration for when the battery reaches a critical charge level, to shut the machine down properly before the UPS powers down.

I've tested this, however this type of shutdown is different than a regular shutdown. When the critical level is reached, it seems to shut the machine down very quickly in a matter of a few seconds, while a regular shutdown would normally take a minute or so for the machine to properly stop all the services, ect.

Anyone have any input here? The whole point of doing this would be to insure that the machine gets shut down cleanly, and I'm not really sure if thats happening...
Avatar of Yan_west
Yan_west

When you shutdown a Windows (XP, 2000, or 2003) computer, the OS will tell each of the running applications and services to close, and gives them a period of time (20 seconds) to do so gracefully. If the application doesn't respond, the user is prompted with options to cancel, wait, or kill the application. With a change to the following Registry entry, you can adjust the 20 second timeout period, which can be helpful if you have an application that normally takes longer to respond when shutting down. Keep in mind that the longer you make the timeout period, the longer it could potentially take your computer to shut down. In the case of a UPS shutdown because of loss of power, this could potentially extend the shutdown time past the life of the battery, so use discretion when changing this entry.

Hive: HKEY_CURRENT_USER
Key: \Control Panel\Desktop
Name: WaitToKillAppTimeout
Data Type: REG_SZ
Value: Milliseconds in decimal (default is 20000)

Avatar of Jay Schwegler

ASKER

I'm not sure if I follow. I'm not having a problem with the length of time it takes to shutdown, it's just the drastic difference between the two following scenarios:

If I do a regular Start/Shutdown it roughly takes about a minute or two.

If I let the UPS shut the box down it takes a few seconds.

The fact that the UPS shutdown only takes 5 seconds is leading me to believe that the services aren't getting stopped properly.
ASKER CERTIFIED SOLUTION
Avatar of scottman29
scottman29

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This same "quick shutdown" also happens when you press the SoftOff button on the front of the computer..  shuts down in a few seconds instead of a full shutdown.  I would think that it's less of a graceful shutdown, and more of a kill of all running processes.  I don't know the inner details of exactly what it does though.
Thanks for the replies everyone.

So is there any way I can get Windows to shutdown normally on unattended shutdown?

The whole point of having a UPS is so the machine can be brought down gracefully. Whats the point if its just going to basically just turn it off?

If you are using APC's ups, I think their parachute program will do a graceful shutdown.  I'll have to double check, but that's what I use.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Enable hibernation by going into Control Panel / Power Options, then into the Hibernation tab.  Check the box that says "Enable Hibernation" (which will reserve an amount of harddrive space equial to the size of your ram), then apply it and go to the UPS tab, in there, click the configure button, and at the bottom, there's a pulldown for "Next, instruct the computer to:" .. select Hibernate.  You can also now hibernate manually from the start/shutdown menu.

Hibernation will basically take everything in RAM and write it to the harddrive..  kind of like standby, but using no power.  On the next boot, windows will see the hibernation state data, and restore it, after it reads it back into ram, it'll chug for a few seconds as all processes resume where they left off.  

I've been hibernating my main box here lately when I'm not using it, the only side effect that I've seen is that if there is a lot running, windows will want to swap stuff to and from the harddisk immediately after coming out of hibernation.  This does break all of your current network connections (but my email and instant messangers immediately reconnect without issue).
Do you guys think hibernation mode would be alright to use with Exchange Servers or DC's?
The only problem that I can see with it, versus shutting down, is that when hibernating, and coming out of hibernation, you may still have orphan connections... where you had connections to clients up until the powerout that havn't timed out or closed up.  I remember this being an issue with older versions of exchange.. they didn't like it when clients dropped suddenly.  However, that is unavoidable, but with a standard shutdown, it would force them to close and shut down... with hibernation, not so much.. upon coming out of hibernation, it would be in an identical state to before ths hibernation, with all of the abandoned connections.

Besides that I don't see any problems.. I don't know if this issue still exists or not.  With DCs, I think it would be okay to hibernate them.  Another issue could be "servers that rely on other servers".. if you require your financial system to be online before your ebusiness sofware comes up, for example, then you may want to shut them down so they properly reconnect to eachother upon boot, instead of believing a connection still exists (which, it still may exist ;)