[Nut-upsdev] NUT driver update process...

Arnaud Quette aquette.dev at gmail.com
Tue Feb 28 15:23:51 UTC 2012


Hi Charles

2012/2/28 Charles Lepple <clepple at gmail.com>:
> On Feb 28, 2012, at 3:44 AM, Arnaud Quette wrote:
>
>> Hi Billy,
>>
>> switching back this thread to -upsdev
>>
>> 2012/2/27 William R. Elliot <bill at wreassoc.com>:
>>> I have been able to set the 'FSD' from the driver and it is picked up by
>>> upsmon.  That gives me the functionality that I was asked to put in the
>>> driver.  If that is against the rules then I'll make an adjustment when the
>>> allowed method is defined.  :-)
>>
>> yup, that's against the tables of the law ;-p
>> more seriously, the right way to do this is to set the status to "OB
>> LB", which will trigger upsmon to add FSD.
>> the reason is that, in master / slave(s) setup, this allows upsmon to
>> do the job, and notify slaves.
>>
>> so, as long as you just catch something that implies the FSD status
>> using "OB LB", everything is fine.
>>
>> don't hesitate to post your patch on -upsdev to get feedback and
>> adjustment request, which is needed before we can merge your contrib.
>
>
> Arnaud,
>
> I looked at some of the existing NUT code for handling FSD, and I think it is a slightly more accurate representation of what is going on when an external source starts a shutdown on an UPS. See the following thread:
>
>   http://article.gmane.org/gmane.comp.monitoring.nut.devel/5882
>
> My thought is that the external shutdown signal may happen well before the battery is low.
>
> I don't see a reason why a driver couldn't set FSD, other than simply by convention.

well, looking again at this, it's true that the notion behind FSD and
OB+LB are not the same.
moreover, we've been using FSD directly in some drivers (see
netxml-ups, clone and clone-outlet for example) to notify an imminent
shutdown.

so you're right! In case a driver has a mapping on a data that is
related to an imminent shutdown, FSD can be used.

a patch is attached with a proposed modification to new-drivers.txt, §
Status data.
feedback and comment welcome.

@Billy: I revert my comment from my mail yesterday.

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
Index: docs/new-drivers.txt
===================================================================
--- docs/new-drivers.txt	(révision 3467)
+++ docs/new-drivers.txt	(copie de travail)
@@ -213,11 +213,20 @@
 with the nut-upsdev list before creating something new, since there will be
 duplication and ugliness otherwise.
 
-NOTE: upsd injects "FSD" by itself following that command by a master
-upsmon process.  Drivers must not set that value.
+[NOTE]
+================================================================================
 
-NOTE: the OL and OB flags are an indication of the input line status only.
+- upsd injects "FSD" by itself following that command by a master upsmon
+process.  Drivers must not set that value, apart from specific cases (see
+below).
 
+- As an exception, drivers may set "FSD" when an imminent shutdown has been
+detected. In this case, the "on battery + low battery" condition should not be
+met. Otherwise, setting status to "OB LB" should be prefered.
+
+- the OL and OB flags are an indication of the input line status only.
+================================================================================
+
 UPS alarms
 ----------
 


More information about the Nut-upsdev mailing list