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

UPS support missing...

Okay,
first of all i'm a newbie, and the wonderful product called "ASL" [;)].
But...
...why there isn't UPS support in webadmin???

now, i'm thinking to a quick solution and i would know if is possible:
can we make a script (send by ssh) by a remote win machine that will login as root and "say" > before shutting down with its managed ups?
obviusly asl is connect at ups.
Win machine will lunch the script before shutting down thx to the ups manager software (in my case).

tia

Mario

ps: sorry for all grammatical errors, i'm italian and i don't speak english well... [:$]
pps: if is possible can you teach to me how to do this script?


This thread was automatically locked due to age.
Parents
  • ups support is not built into asl at all....
  • [ QUOTE ]
    ups support is not built into asl at all.... 

    [/ QUOTE ]

    okay,
    the way to bypass this problem (IMHO) is to have a machine (win, linux doesn't matter) with support for ups. when the batteries of ups goes low the machine will shutdown, but before shutdown it lunch a script (many ups monitorage software allow to run application or batch before shutting down). 
    This script must only login as root and say "shutdown -h now".
    The asl machine is also connecte to another ups (there are ups that give powewr until their batteries are empty) but we shutdown this machine before the batterie goes empty thx to the script.

    any suggestion??

    Mario
  • Look into using the "expect" language.. one of the guys at my work uses it a lot for working with Cisco routers...

    Here is a simple perl script, unable to test it right now as I dont want to shutdown my production firewall.. try it out if you can/want to...

    #!/usr/bin/perl -w
    use Expect;

    $expect_delay=120;
    $system_pass = "thisisthepassword";

    $login=Expect->spawn("ssh -l loginuser node.domain.com") or die "Can't start SSH: $! \n";
    $login->clear_accum();
    $match = $login->expect($expect_delay,"Password:");
    print $login "$system_pass\r";

    $login->clear_accum();
    $match = $login->expect($expect_delay,'$');
    print $login "shutdown -h now\r";

    END
  • You shouldn't need to use a script like that (not that it wouldn't work).

    You can tell most SSH clients to run a single command on login.
    # ssh
    Usage: ssh [options] host [command]

    Nonetheless, you probably don't need to worry too much about killing the power on ASL... it uses EXT3 which is resistant to filesystem corruption from things like that.
  • [ QUOTE ]
    You shouldn't need to use a script like that (not that it wouldn't work).

    You can tell most SSH clients to run a single command on login.
    # ssh
    Usage: ssh [options] host [command]

    Nonetheless, you probably don't need to worry too much about killing the power on ASL... it uses EXT3 which is resistant to filesystem corruption from things like that. 

    [/ QUOTE ]

    ok, thx a lot, this seem easier.
    but under M$ os how can i lunch this script??
    currently i'm using putty, do you know others clients that support scripts??
  • The simple solution is to just connect your Astaro box to a big UPS (I use an APC Smart-UPS 1400) and forget about it.

    Astaro is a router and firewall, not a file server, so shutting down the disk system before the power disappears is not that critical.
Reply
  • The simple solution is to just connect your Astaro box to a big UPS (I use an APC Smart-UPS 1400) and forget about it.

    Astaro is a router and firewall, not a file server, so shutting down the disk system before the power disappears is not that critical.
Children
No Data