APC shutdown sequence
APC shutdown sequence
(OP)
Hello,
Have any of you successfully used the shutdown sequence to turn off remote servers within the same lan ? Currently I have 1 UPS with 1 communication port and 2 servers. I have the ups connected to one of the servers. When there's a power failure, you can program a little script so that certain operations can be performed before the UPS shuts down the server that is connected to it (via the communication cable). The script is placed in the Shutdown Sequence menu. I know that you can buy the port expander so that there are multiple communication cables going to each server but I don't want to use that option. Now I've tried the following tools to remotely shutdown my other server : psshutdown (from PSTools), nltest.exe (comes with Windows 2000 Server), tsshutdn (usable if you have terminal services running) and shutdown.exe (comes with PowerChute). Using psshutdown and tsshutdn works fine when executed within a .bat, command prompt or .cmd manually. However, when the UPS calls the script then it doesn't work. With psshutdown, nothing happens. With tsshutdn, you see a message appear on the screen indicating the server will shutdown but after the time elapses, nothing happens, the server keeps on running. With nltest and shutdown, they seem to only work locally (must be run from the remote system). It won't work when you run it from the computer connected to the UPS even through command line. I'm wondering if the APC software somehow detects you are trying to shutdown a remote system without using a port expander and blocks it. I even tried calling a batch file that resides on the remote server from the script and it still doesn't work. BTW, I have the PowerChute Business Edition 5 Nodes that comes with the APC Smart-UPS 1000
Any ideas ? Or do I have to absolutely buy a port expander or put a single UPS per server ?
Thanks
anthony
Have any of you successfully used the shutdown sequence to turn off remote servers within the same lan ? Currently I have 1 UPS with 1 communication port and 2 servers. I have the ups connected to one of the servers. When there's a power failure, you can program a little script so that certain operations can be performed before the UPS shuts down the server that is connected to it (via the communication cable). The script is placed in the Shutdown Sequence menu. I know that you can buy the port expander so that there are multiple communication cables going to each server but I don't want to use that option. Now I've tried the following tools to remotely shutdown my other server : psshutdown (from PSTools), nltest.exe (comes with Windows 2000 Server), tsshutdn (usable if you have terminal services running) and shutdown.exe (comes with PowerChute). Using psshutdown and tsshutdn works fine when executed within a .bat, command prompt or .cmd manually. However, when the UPS calls the script then it doesn't work. With psshutdown, nothing happens. With tsshutdn, you see a message appear on the screen indicating the server will shutdown but after the time elapses, nothing happens, the server keeps on running. With nltest and shutdown, they seem to only work locally (must be run from the remote system). It won't work when you run it from the computer connected to the UPS even through command line. I'm wondering if the APC software somehow detects you are trying to shutdown a remote system without using a port expander and blocks it. I even tried calling a batch file that resides on the remote server from the script and it still doesn't work. BTW, I have the PowerChute Business Edition 5 Nodes that comes with the APC Smart-UPS 1000
Any ideas ? Or do I have to absolutely buy a port expander or put a single UPS per server ?
Thanks
anthony
RE: APC shutdown sequence
RE: APC shutdown sequence
RE: APC shutdown sequence
Thanks
RE: APC shutdown sequence
RE: APC shutdown sequence
I even tried to let a first cmd file open a second cmd file and that one runs the shutdown command. Not working in Powerchute. Then I made a program in Visual Basic that opens the cmd-file with the shutdown command. NOPE
It's like powerchute blocks that command, but only if it is over the network.
If anyone has an idea or whatsoever, please post!!!!
This is the cmd-file:
NET USE \\SERVER\SharedFolder /user:administrator pasword
SHUTDOWN.EXE -s -m \\SERVER -t 60
First log on to the remote servers share as administrator, the shut it down.
When double clicking the cmd-file, it works. When Powerchute opens it, it doesn't.
Greetz
RE: APC shutdown sequence
To clear up any permission problem, you can make the APC services run as Administrator. To do this, go to the system services and: 1. Stop the APC PBE Agent and APC PBE Server services 2. modify their properties by setting Log on as account Administrator in the "Log On" tab 3. reboot the system.
RE: APC shutdown sequence
Thanks for the info. I also had tried having one batch call another batch and it didn't work as you figuered out. I never thought about a permission problem. I'll give it a try this week. I just came back yesterday and have tons of emails to catch up on. Man, going from high speed internet to nearly dial-up speed is unbearable.
RE: APC shutdown sequence
did you try it already? I'm experiencing problems with this. With the permissions issue solved I'm able to test my command file for network shutdown, but when Power fails, my command file doesn't get executed. Why I don't know...
Have you experienced the same?
RE: APC shutdown sequence
Sorry, haven't tried yet. I'm getting overwhelmed with projects. All the CEO's are back from vacation and have new and great ideas that they want implemented yesterday (if you get my drift). They (all the CEO's) were probably chatting during the holidays and were comparing IT technologies. At least I'll make a little money on some of these new "ideas". I'll let you know when I get a chance.
RE: APC shutdown sequence
"default.cmd" file
start shutdown -m \\computer name -s -f -t 180
RE: APC shutdown sequence
Powerchute Business Edition
1) Make sure that the services for the Agent and Server are bound to an authorized administrator that can run commands on the remote servers. APC actually has a decent article on this at the following location:
PowerChute Plus for Windows NT/2000/XP is not executing a command file - Answer ID: 1784
http:/
2) Make sure the extention of your script file and syntax within are correct. This is where it gets a bit tricky. Make sure you use a file with the .cmd extension (i.e. shutdown.cmd). The syntax, when executing a remote shutdown command for instance is the following:
START "" shutdown -s -m \\remote_location -t time_in_seconds
or
START "" shutdown -s -m \\j-compy -t 180
DO NOT FORGET the "" or your script will not work. APC is funny about that. It requires "" in order to delineate "spaces" in its programming...at least before you run the shutdown command.
When this script fires off, it will send the shutdown command to the computer known as "j-compy" which will shut down in 3 minutes.
Incidentally, to cancel this request, run this from the command line: shutdown -a -m \\j-compy
(Just incase...you will NOT be able to cancel this with the mouse)
Hope that helps
RE: APC shutdown sequence
Thanks for your respond. I've got it working as well. Figured out as well that the service needs to be used as administrator. Never got round to write it down in here.
Thanks
Greetz
Peter
RE: APC shutdown sequence
OK, I know this is a rather old thread, but it has been helpful to me in setting up our in-office UPS over two servers. I have a quick question though.
My UPS reports power failure/restored a couple times a week which only last about 1 to 2 minutes. If I have this command file in the shutdown sequence, I know it'll go off at whatever time interval I say, but will it still run the command if the power is restored? This may be a silly question.