This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Remote Shutdown Help Please

Hello All.

   I have been a happy user and beta tester of the ASG for a long time now and love it to bits [[:)]] 

  I have a question for you and need a bit of help.

I have three servers running in my rack. 2 windows 2003 servers and my ASG all running of a 3kva UPS. Both the 2003 boxes run a controled shutdown when a power outage lasts to long.

I want to know if there is a way using a script or command line switch that I can perform a remote full shutdown of the astaro box as aposed to it just shutting down suddenly when the power from the UPS fails. I cannot connect the ASG to the UPS as it has no usb interface.

Any help on this one would be very much appreciated [[:)]]

NB im not to hot on linux (waits for people reading to cry) [:D]


This thread was automatically locked due to age.
  • Hi,
    my understanding is if you have one of the supported UPS then power shutdown will work. The UPS I use is not on the supported list and the ASG doesn't even recognise that it exists.

    You will need to examine the HCL for the supported UPS types.

    Ian M
  • No I dont have a USB type UPS, its a symetra power aray UPS.

    I dont want to connect the UPS interface to the ASG, as it connects to my win2003 boxes, What I want to find out is if there is anyway using a script and the console/telnet to issue a shutdown command from the win2003 box to the ASG over the network.
  • From a root prompt you can issue a command like "shutdown -h now" to do a controlled shutdown, but you will need to login via ssh- so that means login as loginuser, then su to root, then issue the command.  I'm not sure what the best approach to scripting that would be.
  • From what I remember, the APC software can run a script when shutting down.

    I would write a simple script using Expect , to run ssh, except login, enter loginuser, expect password, enter password, expect the prompt, enter su -, expect password, enter password, expect prompt, enter shutdown -h now.
  • I think you will find this http://www.grape-info.com/doc/win2000srv/power/upsshutdown.html very helpful.

    Look at the remote linux shutdown part.

    Of course, modify the username to be loginuser, etc, but this is an excellent start for you.
  • Thanks red-man for that, its just what im looking for. Only problem is that teraterm does not support ssh only telnet.

    I have looked at loads and loads of terminal programs like putty ect but cant find one that will run a script/macro.

    Help [:(] 

    I get freqent power cuts here and my astaro box doesnt like being powered off when the ups's run out of juice.

    Really need some help on this one guys [[:)]]

    Any idea's ????

    Thanks [[:)]]
  • I found this

    I am wondering if I can create this user, or use the existing user account then SU to root and shutdown.

    As I said I can do this from an ssh console with now problems. The problem I have is automating/scripting it all.
  • Hi all.

      Have managed to automated a lot of this using plink and command lines. The problem is that I can SU from the script, It just wont let me [:(]

    Is there anyway to change the permisions so loginuser can have shutdown rights or if not why wont the ASG let me SU to root ?

    I am not 100% sure that my script file is correct anyway though I have tried many different commands in it.

    Would really like some help on this.

    Ta [:)]
  • Hi,

    plink is the tool to go for. I've made this with sudo. So you log on as a simple user with plink and are able to shutdown the machine.

    SuDo configuration isn't that difficult. If you need more infos, I'm back at the office on wednesday.

    Regards,
    Henrik