François Rayer / Tamia Design
2005-Aug-19 22:02 UTC
[Nut-upsuser] MGE Ellipse 800 USBS doesn't shutdown under FreeBSD
Hi all, 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 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@localhost] failed - Data stale Aug 19 18:29:56 tamiaserver upsmon[958]: Communications with UPS ups_tamiaserver@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@localhost established despite changing the MAXAGE and setting the notification parameter to 3. Can't figure why :( especially with a cpu load under 20%... 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 ! To test the feature, I tried to force the shutdown manually, the computer no longer pluged in the UPS ;-) , only the driver running : -bash-2.05b$ sudo /usr/local/ups/bin/mge-shut -u root -a ups_tamiaserver -k after getting some fancy answers : Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.64 (2.0.2) Unable to get Report Descriptor or Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.64 (2.0.2) Unable to get Device Descriptor or Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.64 (2.0.2) No communication with UPS or Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.64 (2.0.2) Unable to get HID Descriptor I finally got the right answer : Network UPS Tools - MGE UPS SYSTEMS/SHUT driver 0.64 (2.0.2) Initiating UPS shutdown 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. Francois Some more tech stuff : When asking the driver, this is the answer : -bash-2.05b$ sudo /usr/local/ups/bin/upsc ups_tamiaserver@localhost Password: battery.charge: 36 battery.charge.low: 30 battery.runtime: 00617 driver.name: mge-shut driver.parameter.lowbatt: 90 driver.parameter.notification: 3 driver.parameter.offdelay: 20 driver.parameter.ondelay: 3 driver.parameter.port: /dev/cuaa0 driver.version: 2.0.3-pre1 driver.version.internal: 0.65 outlet.0.desc: Main Outlet outlet.0.id: 1 outlet.0.switchable: 0 outlet.1.autoswitch.charge.low: 0 outlet.1.desc: PowerShare Outlet 1 outlet.1.id: 2 outlet.1.switch: 1 outlet.1.switchable: 0 output.voltage: 230 ups.delay.shutdown: -1 ups.delay.start: -1 ups.load: 8 ups.mfr: MGE UPS SYSTEMS ups.power.nominal: 800 ups.serial: unknown ups.status: OL CHRG -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20050819/6fc5e223/attachment.html
arnaud.quette@mgeups.com
2005-Aug-22 12:57 UTC
[Nut-upsuser] Re: MGE Ellipse 800 USBS doesn't shutdown under FreeBSD
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 aremote 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-pre1too... 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@localhost] failed - Data stale > Aug 19 18:29:56 tamiaserver upsmon[958]: Communications with UPS ups_tamiaserver@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@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 ...