Koozali.org: home of the SME Server

powstatd UPS SOLA 305 mini-howto

Damien Ryan

powstatd UPS SOLA 305 mini-howto
« on: October 13, 2003, 07:16:41 PM »
Hi all,

I got a SOLA 305 UPS.
I installed powstatd using
http://www.e-smith.org/docs/howto/contrib/powstatdUPSHOWTOv5.5v5.6.txt
on a 5.6 e-smith box.

With some help from the techo at SOLA it works great.
It shipped with a "INT-0025C" cable ie option 2 below.

Hope this helps.

Damien Ryan

How to install and configure powstatd on mitel sme v5.5 & 5.6:

For
1)       Sola305 with cable "INT-0051"

CTS DSR DCD RNG DTR RTS TXD STATUS
    1      0      1       0      1       0       0     OK = full mains power
    0      0      1       0      1       0       0     FAIL = battery power, |fail|cts,0|
    0      0      0       0      1       0       0     LOW = low battery power, |low|dcd,0|

You would update the config:
/sbin/e-smith/db configuration set powstatd service status enabled \ watch
ttyS0 init0 rts init0 rng init0 dsr init1 dtr fail cts,0 low dcd,0 kill rts,1
/sbin/e-smith/signal-event console-save

2)      Sola305 or Powerware3110 with cable "INT-0025C"

   CTS    DSR    DCD     RNG    DTR     RTS     TXD    STATUS
    1      0      1       0      0       1       0     OK = full mains power
    0      0      1       0      0       1       0     FAIL = battery power, |fail|cts,0|
    0      0      0       0      0       1       0     LOW = low battery power, |low|dcd,0|

You would update the config:
/sbin/e-smith/db configuration set powstatd service status enabled \ watch
ttyS0 init0 dsr init0 rng init0 dtr init1 rts fail cts,0 low dcd,0 kill dtr,1
/sbin/e-smith/signal-event console-save
enter powstatd -t and test state changes by removing power.
To go live enter /etc/rc.d/init.d/powstatd start
Try removing power from the UPS - you should get an onscreen announcement that power has failed and shutdown will happen in x minutes. Reconnect the power and you should get a message saying power has been restored and shutdown cancelled.
If you wish to alter the default time before the UPS shuts down after power has failed, you will need to create a custom template. The default time is 2 minutes.
mkdir -p /etc/e-smith/templates-custom/etc/inittab then
cp -rp /etc/e-smith/templates/etc/inittab/40powerfail /etc/e-smith/templates- custom/etc/inittab/ then
pico /etc/e-smith/templates-custom/etc/inittab/40powerfail then change the part that says
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" (change the +2 to say +5 if you want the UPS to wait 5 minutes before shutting down after power has failed)

Kelvin

Re: powstatd UPS SOLA 305 mini-howto
« Reply #1 on: October 15, 2003, 07:31:18 PM »
Hi Damien,

I'm curious as to why you are not using the software that ships with the SOLA instead ? I've setup a few SOLA UPSes with their own cable and software with SME with no problems so far.

Regards,

Kelvin

Damien Ryan

Re: powstatd UPS SOLA 305 mini-howto
« Reply #2 on: October 16, 2003, 06:36:07 PM »
Hi Kelvin,

I just assumed it wouldn't work (For no good reason).
I never thought about loading it.

I guess I don't quite have the confidence yet to know what
software works with what versions of linux and what doesn't.

Damien

Kelvin

Re: powstatd UPS SOLA 305 mini-howto
« Reply #3 on: October 17, 2003, 03:21:39 AM »
No worries, Damien. :)

Cheers !

Kelvin