Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Laurent DINCLAUX on September 03, 2003, 05:14:20 AM

Title: UPS - Nut How to (urgent)
Post by: Laurent DINCLAUX on September 03, 2003, 05:14:20 AM
Hi,

I have an UPS from centralion (http://www.centralion.com/product/blazer1000.html)

The bundled software is UPSmart. Got the rpm but X-window is necessary. So I have tried powstatd that have already done great jobs for me :) Unfortunatly, it doens't seems to work with my UPS, using powstatd -t, I don't notice any changes on signals when I run off power. I don't know how it is possible but it is.

I am now thinking of using NUT. Activated it from console and reboot. Pluged out power and nothing happens: seems the default NUT driver doens't match my UPS. As NUT's web site (http://www.exploits.org/nut/)  has really poor documentation, here where I am now:

- does anyone knows witch NUT driver will work with UPSmart cables ?
-  I want to test generic driver, how can I test NUT receives anything and/or recognizes my UPS ? Any monitoring tools for NUT that will do that job ?
- Seems NUT has a cgi web interface to monitor UPS actvity. Where are those cgi files ?

Thanks in advance
Title: Re: UPS - Nut How to (urgent)
Post by: del on September 03, 2003, 05:33:55 AM
Hi,
I am using a APC ups with nut, are you using serial or usb? If serial have you tried USB, I believe that NUT is configured for USB by default, I just plugged my UPS in the USB port, started NUT, rebooted and tested the UPS, it shutdown my server gracefully - no problem. I have never tried to get the activity interface to work, I personally don't see a need for it, the power goes off, battery takes over, 40 minutes later the server shutdown gracefully. What more could you ask from a UPS? Although it would be nice to be able to send the signal to another server plugged into the UPS but I'm not that good! I did try to install the NUT rpm on SME 5.5 but I couldn't get it to work so I upgraded to 5.6u4. A search for NUT UPS found:
http://e-smith.org/bboard/read.php?f=3&i=29953&t=29953
http://e-smith.org/bboard/read.php?f=1&i=27434&t=27434
plus lots more. I hope this helps.
Regards,
Del
Title: Re: UPS - Nut How to (urgent)
Post by: Laurent DINCLAUX on September 03, 2003, 06:05:42 AM
Well I went a little futher.

My ups uses serial port1. I found that page http://hutton.sh/~phil/blazer.html. It has a patch for my UPS but it also says that bestups driver should work. So here what I did:
# /sbin/e-smith/db configuration setprop nut Model bestups
# /sbin/e-smith/db configuration setprop nut Device /dev/ttyS0
# /sbin/e-smith/signal-event post-upgrade
# reboot

Now my ups.conf looks like that:
[UPS]
        driver = bestups
        port = /dev/ttyS0

I am know trying it. On power fail, nothing happens for now. I am waiting my ups goes to low battery.....

What should I do il I want to applie the patch provided on http://hutton.sh/~phil/blazer.html ?
Can I use rpm --rebuild ??
Title: Re: UPS - Nut How to (urgent)
Post by: Laurent DINCLAUX on September 03, 2003, 06:43:45 AM
Little more further:

I did  a # service ups stop

Then # service ups start:
Starting bestups: Network UPS Tools - Best UPS driver 0.51 (1.2.0)
This program is currently running as nutups (UID 420)
/dev/ttyS0 is owned by user root (UID 0), mode 0660
Change the port name, or fix the permissions or ownership of /dev/ttyS0 and try again.
Unable to open /dev/ttyS0: Permission denied
                                                           [ FAILED ]
Starting upsd:                                             [   OK   ]
Starting UPS monitor (master):                             [   OK   ]

I did a quick workaround chmoding /dev/ttS0 to 777 (maybe there is a better way ??)

Then
# service ups start
Starting bestups: Network UPS Tools - Best UPS driver 0.51 (1.2.0)
Syncing with UPS: ..............................
Failed - giving up...
                                                           [ FAILED ]
Starting upsd:                                             [   OK   ]
Starting UPS monitor (master):                             [   OK   ]

Seems the driver is not working whith my UPS. How can iI apply the patch provided here: http://hutton.sh/~phil/blazer.html.
Please help !
Title: Re: UPS - Nut How to (urgent)
Post by: Byte on September 03, 2003, 11:20:24 PM
Did you read the top of that website? just you asked how to patch it you just type what it says...

patch -p1 < ../nut-1.2.1-blazer.patch

Might sound silly but you could have missed it ;-)

Byte
Title: Re: UPS - Nut How to (urgent)
Post by: Laurent DINCLAUX on September 04, 2003, 03:38:47 AM
>Did you read the top of that website? just you asked how to patch it you just type what it says...
>patch -p1 < ../nut-1.2.1-blazer.patch
>Might sound silly but you could have missed it ;-)
>Byte

Have you ever tried to appliy such patch on an rpm ???

Have to apply it to source and then recompile :)
Title: Re: UPS - Nut How to (urgent)
Post by: Didzis Tupureins on October 10, 2003, 01:44:51 PM
Powstatd does not work because UPS which works with UPSmart have the another protocol. I have the same problem. I have bought the ScanPower UPS with UPSmart software. I contacted with the manufacture and they said that 1) I have to find the software which works with this protocol; 2) I have to find the libraries needed for UPSmart. They said that these libraries I can find in the RedHat 7.1 - 7.3 installation CD's. If you have any idea - contact me too :)