Koozali.org: home of the SME Server

Best UPS

Del

Best UPS
« on: May 02, 2003, 07:39:49 AM »
Hi All,
Can anyone advise on the best UPS to use with SME? Preferably one with software that can be used to shut down the server gracefully after a power failure.
I have seen apcupsd mentioned on the forum, is this only for use with APC ups's?
Has anyone actually got NUT to work yet? Any info or feedback is appreciated.
Regards,
Del

Paul

Re: Best UPS
« Reply #1 on: May 02, 2003, 10:29:13 AM »
I have NUT working on a APC XS 1500 USB UPS.  I like this UPS because it is fairly priced and provides over 1 hour of back-up on my Athlon XP 1800 (monitor off), 2 network hubs and cable modem.  You can also purchase an "extra" battery pack that just plugs in and will provide an additional 2 hours.

This UPS is a "dumb" ups but it has so much standby time it has only had to shut the box down once in several months.  It did a gracefull shutdown and when the power came back on I have my BIOS setup to reboot after a power failure and the server booted right back up.  I was quite pleased.

By default NUT is set up for a USB UPS, this surprised me because the USB implementation of NUT (and the other ups apps) is experimental.  However, it seems to work just as it's supposed to.

The only problem with NUT that has not been worked out is some sort of monitor.  upsmon is included and as I understand, upsmon works with a CGI script to provide real-time information but I haven't been able to figure out how to get that to work.  Shad Lords posted that he was working out some kinks (I don't know what problems he was having, he did not elaborate) with NUT but I haven't seen him post anything new for a couple of months.

I am happily using NUT with a USB UPS.  NUT is disabled when you install it with update 2 or above.  You have to enable it and the command is as follows but don't turn it on until you have a USB UPS connected or it will fill your log files with errors.

/sbin/e-smith/db configuration setprop nut status enabled

I'm pretty sure you have to reboot for this change to take effect.

Good Luck,

Paul

Ray Mitchell

UPS NUT and USB
« Reply #2 on: May 02, 2003, 05:32:01 PM »
> I have NUT working on a APC XS 1500 USB UPS.  

Hey Paul that's intesting to hear.

> By default NUT is set up for a USB UPS, ..........
> However, it seems to work just as it's supposed to.

What is the "supposed to" bit ?

> NUT is disabled when you install it with update 2 or above.
> You have to enable it.....
> /sbin/e-smith/db configuration setprop nut status enabled

Was there any other configuration setup required, did you change any settings in any config files for your UPS ie run time before shutdown etc etc. What and where ?

Thanks & Regards
Ray Mitchell

Paul

Re: UPS NUT and USB
« Reply #3 on: May 02, 2003, 09:16:29 PM »
Ray Mitchell wrote:

> > By default NUT is set up for a USB UPS, ..........
> > However, it seems to work just as it's supposed to.
>
> What is the "supposed to" bit ?

1-It scans the USB port and determines if a UPS is present.
2-If not present it will fill logs with "stale data" errors.
3-If present, it determines if on line power or battery power.
4-If on battery and battery gets low it executes a proper shutdown of the box.

Like I said, my UPS is a "dumb" UPS and thats about all it is capable of doing.  Some UPS's will provide much more info and will even take a powerdown command and turn the UPS off, mine will NOT.  So as far as my UPS is concerned, it works as it's "supposed to".

> > NUT is disabled when you install it with update 2 or above.
> > You have to enable it.....
> > /sbin/e-smith/db configuration setprop nut status enabled
>
> Was there any other configuration setup required, did you
> change any settings in any config files for your UPS ie run
> time before shutdown etc etc. What and where ?

No, I just enabled it as above and the "stock" configuration worked out of the box.  My UPS is able to send a "low battery" signal and there was no need to change any config files.  I looked at all the templates and config files first and determined that the settings (according to the nut website) would be acceptable for my UPS and tested it with a dummy load before I actually plugged the sme box into the UPS.

The only thing that needs to be worked out for me is how to get the monitor page in upsmon (I think it is a CGI script)  working.  I also think Shad is/was working on a server-manager panel to configure everything but he won't email or post back to me so I gave up asking.  I offered up my assistance but I have never heard back from Shad so I just started poking around the templates and config files and determined NUT might just work.  I tested on my test box first and after that worked, I moved the UPS over to my production server.

Just remember, I am using a USB connection and the cable that came with the UPS (APC XS 1500) and that's the only UPS I have tested it on.  The default setup when you install the NUT RPM's is for a USB (hidups) interface, this can be changed with a custom template until Shad finishes what he is doing.  There is only 1 driver for USB, there are many for serial and you can run into major problems with cables on a serial connection and even have to make up your own cable.  This is why I wanted to get a USB UPS working.  NUT seems to have almost as many configuration options as SAMBA, hahaha.  Shad is probably having a hell of a time trying to decide what options are needed/wanted for an sme box.  Go to the web site and read, Hell I even think there is an option for NUT to make your coffee for you in the morning :)

del

Re: UPS NUT and USB
« Reply #4 on: May 03, 2003, 02:08:01 AM »
Hi Paul,
Thanks for the info, where are you located, I am in Florida and a search on the US APC website says that the APC XS 1500 is not available in my region!
Thanks again,
Del

Ray Mitchell

Re: UPS NUT and USB
« Reply #5 on: May 03, 2003, 05:21:04 AM »
Dear Paul
You may recall we had some dialogue about NUT a while ago, and yes I did do a bit of looking at the NUT site also but did not have enough time available to work through it all.

Thanks for the feedback, at least we all know that NUT will work out of the box for sme with USB UPS's, at least for the configuration you mentioned, which fares well for other possible combinations.

Regards
Ray Mitchell

Paul

Re: UPS NUT and USB
« Reply #6 on: May 03, 2003, 05:50:46 AM »
Ray Mitchell wrote:
>
> Dear Paul
> You may recall we had some dialogue about NUT a while ago,
> and yes I did do a bit of looking at the NUT site also but
> did not have enough time available to work through it all.

Yes, I do remember and I thank you for heading me in the right direction with the proper "enable" command.  I actually printed out the entire thread for future reference.  It's friends (if I am allowed to call you that) like you that have made my e-smith experience so positive.

> Thanks for the feedback, at least we all know that NUT will
> work out of the box for sme with USB UPS's, at least for the
> configuration you mentioned, which fares well for other
> possible combinations.

Like I have been saying, I don't know too much being a total noobee but I want to contribute in any way I am able.  e-smith and this forum have saved me a lot of time, money and my sanity, the least I can do is try to help.  I am going to toy around with a belkin serial UPS on my test server to see if I can get it working that way as well.

I wish I could find out where Shad is on this, I understand how some of NUT works and I think I can help him out with it but I don't want to start working on it if he is almost done and I don't want him to think I am "stepping on his toes" so to speak.  I don't really know open source etiquette.

Thanks, Paul

Paul

Re: UPS NUT and USB
« Reply #7 on: May 03, 2003, 06:12:45 AM »
del wrote:
>
> Hi Paul,
> Thanks for the info, where are you located, I am in Florida
> and a search on the US APC website says that the APC XS 1500
> is not available in my region!
> Thanks again,
> Del

It seems to be some sort of item only availabe at CompUSA and a few other stores, you won't find it on tha APC website as I was told by an APC support person that this product belongs in their "retail line" whatever that is supposed to mean.  Try this link at compusa and put in your zip and it will tell you the closest location that has it.

http://www.compusa.com/products/product_info.asp?product_code=298348&pfp=BROWSE

Also available is the XS 1000 at $129 (after rebate)

http://www.compusa.com/products/product_info.asp?product_code=298345&pfp=BROWSE

It doesn't seem the extra external battery is available yet.

Paul

Re: UPS NUT and USB
« Reply #8 on: May 03, 2003, 06:22:11 AM »
One other thing, the mfg. part number on this unit is BX1500 (on the serial number label) and on the front of the unit it says XS1500 so I really think the correct model number is BX1500, maybe???

Just thought I would let you know that.

Paul

del

Re: UPS NUT and USB
« Reply #9 on: May 06, 2003, 07:06:11 PM »
Hi Paul,
I have plugged in the ups (usb) and logged on as root, then I typed:
/sbin/e-smith/db configuration setprop nut status enabled
then pressed enter and the server says:
bash: /sbin/e-smith/db/: Not a directory  

Have I missed something here? I am a relative noobie, so please forgive me if I am being stupid here!

Regards,
Del

del

Re: Best UPS
« Reply #10 on: May 06, 2003, 07:10:27 PM »
Sorry, I am using sme 5.6u4
Del

Ray Mitchell

Re: UPS NUT and USB
« Reply #11 on: May 06, 2003, 08:05:36 PM »
del
> /sbin/e-smith/db configuration setprop nut status enabled
> then pressed enter and the server says:
> bash: /sbin/e-smith/db/: Not a directory  

That command appears to be correct, try it again and be careful about typos.

the /sbin/e-smith/db part has no spaces and there is a space between all the other parts.

You will know if it has worked by checking the services that start up after a reboot
NUT [enabled]
is what you are looking for.

further info about NUT see
http://forums.contribs.org/index.php?topic=7145.msg25986#msg25986

Ray

Paul

Re: UPS NUT and USB
« Reply #12 on: May 06, 2003, 09:44:04 PM »
Del,

db is not a directory, it is an executable (I think) file and should be in /sbin/e-smith

It appears that you put an extra slash in your command after db (/sbin/e-smith/db/ configuration setprop nut status enabled WILL NOT WORK).  If you use putty or another SSL client to connect to your server, try cut and paste.

/sbin/e-smith/db configuration setprop nut status enabled

if you type the following, it should come back with a small "usage help" menu.

/sbin/e-smith/db

Good Luck,

Paul

del

Re: Best UPS
« Reply #13 on: May 07, 2003, 05:28:04 AM »
Hi Paul, Hi Ray,
OK I found the problem,  was in the /root directory not the / directory! DUH!
Anyhow I have used the command, I got no errors and I restarted the server and watched all the services start and it said that nut started OK.
 
Paul said "No, I just enabled it as above and the "stock" configuration worked out of the box. My UPS is able to send a "low battery" signal and there was no need to change any config files. I looked at all the templates and config files first and determined that the settings (according to the nut website) would be acceptable for my UPS and tested it with a dummy load before I actually plugged the sme box into the UPS."

Without being to stupid how can I test it with a dummy load?
I have had a look at the nut web site and it doesn't appear to give you instructions on how to test the shut down part.
Thanks again for all the help.
Del

Paul

Re: Best UPS
« Reply #14 on: May 07, 2003, 05:55:22 AM »
Del,

1-Hook the POWER cable from the computer to a "live" outlet (not to the UPS).

2-Connect the USB cable from the computer to the UPS.

3-Hook a monitor and a 60 watt lamp to the battery powered outlets on the back of the UPS.

4-Turn everything on and then after boot, unplug the UPS from the wall power so it goes into battery mode.  You log files should indicate "UPS on battery" or something like that.

5-Wait, Wait, Wait (aprox 1 hr) until the UPS sends a low battery signal to the computer and executes a shutdown.  The computer should shut down BEFORE the battery goes dead.

6-Wait to see how much longer the ups stays on, it should run out of battery and the UPS should then shut down in a few minutes.

This will let you know if the kill command works and shuts off the box before the battery goes dead.  If it fails, your box will still have power and won't do a hard (loss of power) shutdown.

7-If all goes well, plug everything back as normal and boot up.

8-Look at log files and you should see line simular to:

UPS on line power
UPS on battery power
UPS battery low signal
UPS shutting down computer

If you can set the bios in you box to "power back on after power loss" the server will start up by itself once the line power is resumed and the UPS powers back on.  This feature is fairly new (maybe a couple of years old) so if you have an older motherboard bios, you may not have this feature.

Good Luck,  Paul