-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean-up or legalise: revise status_set()
values vs. the NUT standard dictionary
#2708
Comments
…further strings if we had a match; report unexpected tokens [networkupstools#415, networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
I will give this some more thought, but condensing |
Assorted thoughts:
|
Sorry for delay.
I hope I understood the question right... |
https://eaton-powerware.ru/ess.html Some info from copilot: ESS is an innovative technology designed to significantly enhance the energy efficiency of uninterruptible power supplies (UPSs) without compromising load protection. Here are the key points about ESS: What Is ESS? |
Oh seems I didn't got the question so right. So I think HE should be renamed to ECO status. ABM no need for status as per above comments. :) |
This point is a bit harder historically. Gotta check what different drivers do, but according to notes in the document, for some time now (since before my time IIRC) the
To me, the "ECO" definition is fundamentally vague and "as vendor says", with one common feature being that it is some togglable trade-off between power overheads wasted by the UPS to do its job with different strategies, and reliability. Generally it boils down to either being hardwired for two power circuits with inverter and battery in the middle always active (marketed in the past decades as an "on-line UPS"), or hardwired for the inverter being inactive most of the time - with less waste and maybe less wear (marketed as "line-interactive"), or software-defined to have a run-time choice between whichever options the vendor gives. The "ECO" token in As such, I think the "ECO" |
Sure you right, also as i wrote befor seems only 2 enterprise models using this mode, but after merging essmode status maybe they users will use NUT :) |
The only Confusing thing with ECO I found was |
….status` flag tokens [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
The track record of this sort of "AI" is that it is unreliable. I would like to see a group-wide norm not to use such tools at all. |
Stepping back: why do we have tokens in ups.status at all? Just because some UPS has some feature doesn't mean it should be put in ups.status. That only makes sense for things that are broadly definned/implemented in a way which seems common across manufacturers. I'm basically saying that for now, a driver that supports something like this should just put in a variable, and people can log/process it and then eventually, if we think there is a common definition, and it is useful, it can be promoted to a flag. But interfaces once defined stick around, so I think we should very much lean to not adding things until we can write a spec modification that holds up to scrutiny. |
Sure, realiity is messier. I just meant that changing tokens around should start off with a presumption that it's bad, and then think about how things are affected.
I think from a Free Software ethics viewpoint, we need to define and then map. Parroting marketing goofiness (or sometthing that might make sense) is not responible to users. Carrying a vendor-specific mode bit without judging it so that users can get at it is fine. But we should not pretend there is a global meaning. We should not aggregate N fuzzy meanings into one flag; that is an assertion that they mean the same thing. I think it is better to decline to play the game then to give people bad information. Some UPS systems are always in standby (when power is ok). Thus the ECO flag applies to them; they simply lack the less efficient mode. So if a flag is defined to mean "in operation such that input is piped to output and no inverter is running, basicaly only usage is battery trikcle and control electronics", those UPS units should have it set. The real question is: what are we trying to define and why? Who wants to know this? How do they benefit? We should insist on coherent answers to this in a multi-vendor way before we define multi-vendor flags. Thus, I think we should remove the ECO token in ups.status, and we can add mode variables to manufacturer/model-specific drivers. |
I have now |
My UPS doesn't say ECO but it is doing the same thing. It's a Best Fortress 660 and that's the only mode it has. My point is that we should either define ECO without involving "the device manufacturer says eco", and have a flag, or we should remove it from ups.status and put in each driver a variable that only claims to mean some word that one manufacturer uses. ECO in particular is problematic as there is lots of greenwashing, and structurally it is a word everybody tries to claim. Thus, I see it as starting off with a rebuttable presumption that it is at best vague and at worst fake. This can be overcome with a good definition that does not reference 'the manufacturer uses the word eco". As for "wrong", no, without it you would not be having a report in ups.status that this mode is active or not. That is not in any way "wrong". So far, I remain skeptical that we have an adequate definition to base a flag on, and I think we should have a RFC-modifcation process (at least having text in the nut repo) before we use them. |
Also by Eaton UPS HID Path we have variable that Represent UPS Line 1869 in 077c08c
|
What do you mean "can't avoid"? nut reads from the ups and translates to nut protocol. Of course we can avoid. |
i meaned we should not avoid this but not others . why to avoid this one HID but not bypass or other? |
|
if this one backup ups its not the really same as online with eco |
I guess it's good the discussion happened sooner or later, many good points raised by both sides, and thanks for some reality check even if harsh - life hurts :) A few random thoughts from recent reading:
My commute time is over, but I think it's all I had to say right now :) Not sure I'll be online tomorrow, got a conference at dayjob... |
After reading up and giving this some more in-depth thought, I'm also overall leaning more towards @gdt 's views. I think
But then I'd argue I also really like the addition of In any case - |
CC @arnaudquette-eaton |
Finally got a moment to dive into this, as the situation with ECO status remains as one significant blocker before a release (so that standard documentation snapshots remain authoritative and stable). First however I've addressed the case of |
…etworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…atus_set() [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2565, networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…ng "A FEW TOKENS" at once, recurse to add one by one and so avoid duplicates [networkupstools#2708] As a side effect, should also strip surrounding whitespace characters. Signed-off-by: Jim Klimov <[email protected]>
…_set() args are stripped [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
Iirc, snmp-ups is suffering some similar issues |
…LM can be added [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…etworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…atus_set() [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2565, networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…ng "A FEW TOKENS" at once, recurse to add one by one and so avoid duplicates [networkupstools#2708] As a side effect, should also strip surrounding whitespace characters. Signed-off-by: Jim Klimov <[email protected]>
…_set() args are stripped [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…LM can be added [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
Relocated code tried earlier in generic_gpio_utest.c (not as portable a container - far from everyone builds it) Signed-off-by: Jim Klimov <[email protected]>
…stools#2708] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…rkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…rings of another [networkupstools#2708, networkupstools#2565] Signed-off-by: Jim Klimov <[email protected]>
Relocated code tried earlier in generic_gpio_utest.c (not as portable a container - far from everyone builds it) Signed-off-by: Jim Klimov <[email protected]>
…stools#2708] Signed-off-by: Jim Klimov <[email protected]>
Signed-off-by: Jim Klimov <[email protected]>
…rkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…tworkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
…rings of another [networkupstools#2708, networkupstools#2565] Signed-off-by: Jim Klimov <[email protected]>
…) for test mocks [networkupstools#2708] Signed-off-by: Jim Klimov <[email protected]>
The "Status data" section in
docs/new-drivers.txt
defines certain keywords that are "Possible values for status_set", stressing that "Anything else will not be recognized by the usual clients. Coordinate with the nut-upsdev list before creating something new, since there will be duplication and ugliness otherwise."In fact we do have a number of other values in code, currently:
ALARM
=> upsmon: add ALARM support #415 and introduce further handling and notifiers for ALARM status #2658, andECO
=> ecomode_addon-2 #2684 are recent additions, not standardized here yet but elaborated a lot in other parts of the code base, including C++ bindings, clients likeupsmon
and should be CGI...ALARM
is set indstate.c
since before 2007, see 5f42691 - recent PRs just added its handling inupsmon
and other parts of codeACFAIL
,BY
,COMMFAULT
,DEPLETED
,HE
,OVERHEAT
,SD
,TIP
,TEST
are not definedHE
may be renamed toECO
now that it has led in evolution across the code base; should other advanced power management technology (ESS
,ABM
) activation states also be aliased toECO
? (WDYT - @desertwitch @masterwishx ?)TEST
same asCAL
?info_lkp_default(4, "OL BYPASS"),
seen in acpqpower_pwr_info[]
array. Somebody gotta use those strings, right?..status_set()
does check that its argument is absent in a collectedstatus_buf
string (although since after NUT v2.8.2 release), it relies onstrstr
matching of the whole argument - this is one way how some drivers can end up with duplicate status values likeOL OL BYPASS
I suppose.status_set()
for arguments with multiple tokens separated or surrounded by spaces should now do the right thing: recurse to add (or not) each non-trivial token independently.Gotta decide what to do with the unknown names - can rename some cases, but what about others? Legalize them into the docs chapter (also concerns "ALARM" and "ECO"), and add handling in C++ bindings, augeas, clients, etc.?
Perhaps more importantly: would such legalization of keywords acceptable in
ups.status
constitute a bump of NUT protocol/API for formal versioning, as in "clients conforming to protocol N are expected to handle at least tokens X,Y,Z with ascribed meanings" (free about considering, logging or ignoring other tokens, as long as the client does not crash on them)?CC @clepple @aquette - WDYT?
The text was updated successfully, but these errors were encountered: