[Nut-upsuser] Re: MGE Ellipse 800 USBS doesn't shutdown under FreeBSD

arnaud.quette at mgeups.com arnaud.quette at mgeups.com
Mon Aug 22 12:57:05 UTC 2005


Hi François,

> First of all thanks for the great work on nut ! (despite it's not fully functional yet overhere).
>
> Everything seemed to go fine until the final test : shutdown the UPS ! The system is running FreeBSD 5.3, the UPS > is MGE Ellipse 800 USBS both linked with the MGE serial cable. The system is a
remote server, only running some file > services and large disks.
>
> The porting, installation and scripting for nut went quite easily for a lowtech user as me (the user/group stuff a little > tricky anyway). I used the nut-2.0.2 release and tried the 2.0.3-pre1
too... The driver is mge-shut 0.64

yep, I'm working with some other MGE sponsored guys on *BSD support (especially for newhidups)
and NUT integration improvements...

> I still have a couple of :
>
> Aug 19 18:29:55 tamiaserver upsd[955]: Data for UPS [ups_tamiaserver] is stale - check driver
> Aug 19 18:29:56 tamiaserver upsmon[958]: Poll UPS [ups_tamiaserver at localhost] failed - Data stale
> Aug 19 18:29:56 tamiaserver upsmon[958]: Communications with UPS ups_tamiaserver at localhost lost
> Aug 19 18:29:57 tamiaserver upsd[955]: UPS [ups_tamiaserver] data is no longer stale
> Aug 19 18:30:11 tamiaserver upsmon[958]: Communications with UPS ups_tamiaserver at localhost established
>
> despite changing the MAXAGE and setting the notification parameter to 3. Can't figure why :( especially with a cpu
> load under 20%...

this is not linked to the system load but to the ups µcontroler load when
it does some internal processing and still has an important communication
load. I've addressed that point with the USB driver (the same protocol
is used for MGE SHUT and USB units, but shut is 2400 bauds only...) but
not in mge-shut, as I'm still thinking about merging it in newhidups.

Note that you can also change the polling frequency (defaults to 2 sec)
by adding "pollinterval=15" in ups.conf. This will lower the staleness
problems. You will have to change MAXAGE and DEADTIME accordingly.
For more information, have a look at mge-shut manpage...

> My main problem is that the system starts the shutdown of FreeBSD when reaching the 30% level, but when it
> comes to shutdown the UPS, nothing happens, and the computer halted continues to deplet the UPS batteries...
> You'll agree this is not good at all !

completly agreeing

> To test the feature, I tried to force the shutdown manually, the computer no longer pluged in the UPS ;-) , only the > driver running :
> ...

I've been working on an issue, not long ago, that should be the same:
this is linked to the high verbosity of the SHUT protocol. When asked
to stop, the driver will take a bit of time. If the instance started to
shutdown the UPS starts before the old instance is stopped, then
you'll face a race condition, resulting in a failed shutdown.

I've improved the general reactivity of the driver, but it might not
be sufficient enough.

A good test to validate (and solve this while waiting for something
better in the driver/packages), add something like a "killall -9 mge-shut"
before the "upsdrvctl shutdown" to ensure mge-shut is not locking the
UPS...

> But simply nothing happened, the UPS didn't shutdown (I tried with the batteries level over and under 30%).
>
> Perhaps my UPS needs some configuring, but the few info on the MGE documentation and website didn't help at all.
>
> I would really appreciate some input as I'm stuck there and I have no more idea how to narrow the problem.

Having the UPS running on battery, NUT (upsd/upsmon and
mge-shut) stopped, try running:
"mge-shut -DDDDD -a ups_tamiaserver -k"
with a dumb load attached to the UPS (ie not your computer).

The standard behavior will shutdown the UPS 20 seconds
after, and will wait for the power to be back before powering
up the UPS.

If something goes wrong, thanks to send back the output of
the above tests.

Arnaud Quette
---
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
OpenSource Developer - http://arnaud.quette.free.fr/
Debian Developer - http://people.debian.org/~aquette/
 ... and much more ...






More information about the Nut-upsuser mailing list