Main Menu

Shutdown on power failure

Started by andrew_ashby, September 12, 2012, 01:46:27 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

andrew_ashby

Has anyone gone a script / batch file I can get our UPS to run to gracefully shut down our server following a power failure ?

I'm sure I've got one somewhere, just can't find it.

Thanks
Andrew Ashby
Ashby Wray & Partners Ltd
Wolverhampton - UK
TAM 7.6, 8 users, W2k Server + XP Pro, ActFax, Mdaemon ??, Panda Gatedefender Integra

Mark

For windows, the command is

To shutdown with a ten second warning
shutdown -s -t 10

To force an instant shutdown
shutdown -f -s -t 00

Open a command line and try
shutdown /?
to get an idea of what all of the options are.

Write your script in Notepad, save as a .bat and set it up in the Power Options through control panel.
Mark Piontek, MBA
Director of Information Systems
BS in Information Systems Security

Bob

Funny just had power loss (construction crews).  Had to use shutdown command on my TS server which hung - shutdown -R -T 2

Didn't properly reload all services leaving some locations ok others unable to login.  Long morning..  Just now have all operations back up and normal.   Looks like we will be adding a generator since all locations connect here and us being down brings company down state wide.

I've brought it up many times but until it happens, only then does it get proper consideration from principal.   See if I can't get something done today yet.   :(

Mark

Bob  -R reboots, not shut down.

We have a generator.  It's probably about 12 - 15 years old, but we had it in storage never used!  I inquired about it, we got it serviced, and now we run it monthly for good measure.

It's enough to power our entire rack, our phone system, and last time we had a 3 hour power outage we also plugged in one workstation (including all accessories).  Worked out well for us.
Mark Piontek, MBA
Director of Information Systems
BS in Information Systems Security

Bob

Correct what I wanted reboot.  Fast one too why -2

Just meant used same command just recently and discussion and timing ironic.  :)