Unattended Shutdown

Posted on 2004-09-29
Last Modified: 2010-04-12
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...
Question by:jschweg
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
LVL 15

Expert Comment

ID: 12180472
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.

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


Author Comment

ID: 12180582
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.

Accepted Solution

scottman29 earned 200 total points
ID: 12180763
Here's KB article #815269

When you configure the uninterruptible power supply (UPS) you can select either a critical or a typical shutdown. This selection has no effect, and a critical shut down is always performed. You may receive the following message:

Force stand by or shutdown even if program stops responding.

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.


Assisted Solution

Chireru earned 200 total points
ID: 12180772
I have my boxes hibernate if the UPS is running low, that way processes are simply paused and RAM is written to the harddisk.  It takes a good 20 seconds or so depending on how much is running with a gig of ram.  Upon restarting, the system is exactly where it was before the powerout.  

Expert Comment

ID: 12180819
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.

Author Comment

ID: 12183943
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?


Expert Comment

ID: 12184347
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.
LVL 23

Assisted Solution

by:Danny Child
Danny Child earned 100 total points
ID: 12185669
I've set our UPS to use some scripts to stop the exchange services before triggering the shutdown, and that was the only one I was worried about.  I can dig them out if that's useful.

I figured that all the users would have lost their power too, so the servers would be sat there not doing much at all by the time the UPS said "Power Off, Everyone"
The fast shutdowns are pretty scary, but as long as all my disk writes from cache happen, I'd be pretty confident that all would be ok.  

Chireru - your idea is interesting, and hadn't occurred to me - how do you activate the hibernation?

Expert Comment

ID: 12186291
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).

Author Comment

ID: 12209503
Do you guys think hibernation mode would be alright to use with Exchange Servers or DC's?

Expert Comment

ID: 12210468
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 ;)

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
We take a look at some of the most common obstacles that IT teams run into as they work relentlessly to keep all the alarms and sirens from going off at once.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question