Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: jb on December 31, 2003, 07:10:37 AM

Title: NUT ups module
Post by: jb on December 31, 2003, 07:10:37 AM
Anyone using the NUT UPS module that is installed with SME 6 and 5.6 I believe?  All I ever see are references to powstatd or apcupsd.  If you are, I would appreciate it if you would let me know your experiences with using it.  Pro and con, and give me a link so I can do some investigating as well.  If this is included with a stock install, I'd like to try to use it.

Thanks,

JB
Title: Re: NUT ups module
Post by: Duncan on December 31, 2003, 12:25:17 PM
A timely post.

I am migrating my mail over to a fresh 5.6 install (on and off over the holidays) and this is one of the things i intend to look at before monday.

I will let you know how i go. Looking at the documentation - it appears that my UPS (Fortress) is supported.

A link I found
http://vesuvio.physics.lsa.umich.edu/~herrj/doc/UPS/NUT_UPS.html

Regards Duncan
Title: Re: NUT ups module
Post by: jb on December 31, 2003, 07:20:36 PM
Thanks Duncan, please do keep me informed.
Title: Re: NUT ups module
Post by: Ray Mitchell on January 01, 2004, 06:02:48 AM
A search on "NUT" found these, Learn to to do a search first, many questions have already been answered.

http://forums.contribs.org/index.php?topic=17103.msg66366#msg66366

http://forums.contribs.org/index.php?topic=17103.msg66366#msg66366

and there are more if you care to look back further

Regs
Ray Mitchell
Title: Re: NUT ups module
Post by: jb on January 01, 2004, 06:12:52 AM
FYI.. I did a search (AND ALWAYS DO) and have many of those references bookmarked.  Since I asked the question yet again, maybe none of them addresses my issue IMO.  And, that is why I posed it again.  It doesn't seem like too many people are using it and I am/was wondering why.  It comes with a stock install but it seemed many are using something else.  So, thanks for trying to help.  None of those previous searches is helping me.  I'll wait and see what Duncan's experiences are, and hopefully I will get a chance to share mine with him as well.
Title: Re: NUT ups module
Post by: Ray Mitchell on January 01, 2004, 06:51:58 AM
Dear jb

Perhaps not so many people are using NUT as there has been little info on these forums about it, although Mitel appear to be recommending and using it.
Supposedly NUT has good built in support for "smart" UPS's.

It does support USB UPS's so it's one of the few choices available for use with sme.

No one seems to have done any server manager panel contrib for NUT as v6.0 final has only just been released, so setup is a command line job. This I guess limits popularity

What about the further post on one of the threads I mentioned, doesn't that answer a lot of your queries ??


http://forums.contribs.org/index.php?topic=7523.msg27626#msg27626

Author: Paul
Date:   05-02-03 12:16

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 :)

Regs
Ray
Title: Re: NUT ups module
Post by: jb on January 01, 2004, 12:55:18 PM
Indeed, that is the main one I have bookmarked.
Title: Re: NUT ups module
Post by: Arne on January 01, 2004, 04:16:55 PM
Sometime "the answer" is not only "the answer" but the sum of 10 different answers, so it can never be wrong to ask, discuss and find out, as required, to get the other 9 ;-)
Title: Re: NUT ups module
Post by: Paul on January 01, 2004, 08:00:39 PM
Jb,

Pros-IT WORKS (flawlessly for about 7 months now)

Cons -No user panel but none so far with NUT itself.  My UPS is stupid so I have to manually power back up but this has only happened once because my ups lasts about 4 hours (6 if I remember to turn off the monitor).

What specific questions did you have?

Paul
Title: Re: NUT ups module
Post by: jb on January 01, 2004, 10:05:52 PM
Paul,

That kind of testimony of what I'd like to hear.  I can get by with no panel for now as well.  It just seemed like not many people were using this and I had wondered why.

thx,

JB
Title: Re: NUT ups module
Post by: Boris on January 02, 2004, 03:23:40 AM
>> Hell I even think there is an option for NUT to make your coffee for you in the morning :)

HassleNUT flavor? :-)


I use few APC BackUPS EX (USB) with NUT and system-monitor(4.0.11) shows graph for it, but only voltage level (13.x V or 27.x volt depends on UPS model)
With SmartUPS, apcupsd and serial cable more parameters available like few different voltage levels, time remaining etc…
Considering price difference it is fair trade-off and basic functions (shutdown server on low battery signal) works.
Title: Re: NUT ups module
Post by: Paul on January 02, 2004, 06:30:58 AM
http://www.compusa.com/products/product_info.asp&product_code=298348&pfp=BROWSE

This is one FINE UPS for the money.  I use this one.

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

This one comes with an extra battery pack (not shown in picture) and tripples the time.  You might get up to 12 hours with this bad boy.

Good Luck

Paul
Title: Re: NUT ups module
Post by: Duncan on January 02, 2004, 06:36:27 AM
A very brief howto.

/sbin/e-smith/config set nut service status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

The default is for a USB UPS - so it will probably fail.

I use a Sola 550 (which uses the bestfortress driver and serial ports)

edit

/etc/ups/ups.conf like so

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------

[UPS]
    driver = bestfortress
    port = /dev/ttyS0

And
/etc/sysconfig/ups

#------------------------------------------------------------
# DO NOT MODIFY THIS FILE! It is updated automatically by the
# SME Server software. Instead, modify the source template in
# an /etc/e-smith/templates-custom directory. For more
# information, see http://www.e-smith.org/custom/
#
# copyright (C) 2002 Mitel Networks Corporation
#------------------------------------------------------------

DEVICE=/dev/ttyS0
MODEL=bestfortress

OPTIONS=

SERVER=yes


As it says DO NOT MODIFY THIS FILE! - the changes will probably not survive long so make and edit the templates in /etc/e-smith/templates-custom/etc as required.

I had some permission problems with /dev/ttyS0 so i did the following

chmod a+r /dev/ttyS0
chmod a+w /dev/ttyS0

The defaults worked fine - system halted and UPS shutdown. System came backup with no problems when  power to the UPS was restored.

Regards Duncan

[%sig%]
Title: Re: NUT ups module
Post by: Del on January 02, 2004, 10:04:54 PM
I have been using it for a few months with APC back-UPS XS 1000 (USB) and it works great, tested it and it shuts itself down OK. Without any server-manager panel it is basic, but it works. When you enable it at the command line make sure your UPS is plugged in (USB) or you fill the log with error messages. Hoipe this helps.
Regards,
Del
Title: Re: NUT ups module
Post by: Nick on January 19, 2004, 03:07:07 PM
I am also trying to get my UPS working with NUT, but am having a few problems. - I Can't find any info in the forums on how to do the most basic checks...

How can I tell if the SME/NUT has detected my UPS?
Where are the NUT logfiles? (not in server manager)

I'm using an "APC BackUPS ES 350" & SME 6.0Final (new install, No mods except the powerswitch rpm)

It states on the NUT compatibility website ( http://us1.networkupstools.org/compat/stable.html ) that is is compatible using the "hidups" driver, Which I understand is the Default setting on SME.

I Enabled NUT using the following commands from Duncans Post:

/sbin/e-smith/config set nut service status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

The NUT Service starts ok but the SME doen't shut down when power to the UPS goes off... Even when Power Gets LOW (continuous beeping)

Am I doing something wrong?

Cheers,

Nick