• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • Last Modified:

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...
0
jschweg
Asked:
jschweg
  • 4
  • 3
  • 2
  • +2
3 Solutions
 
Yan_westCommented:
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)

0
 
jschwegAuthor Commented:
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.
0
 
scottman29Commented:
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.


HTH,
Scott
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ChireruCommented:
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.  
0
 
ChireruCommented:
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.
0
 
jschwegAuthor Commented:
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?

0
 
scottman29Commented:
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.
0
 
Danny ChildIT ManagerCommented:
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?
0
 
ChireruCommented:
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).
0
 
jschwegAuthor Commented:
Do you guys think hibernation mode would be alright to use with Exchange Servers or DC's?
0
 
ChireruCommented:
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 ;)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now