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
  • 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.


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.
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline


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

DanCh99 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now