Comments (8)
Fair point, at least for the non-critical OB
state. Would you care to post a PR for the new toggle?
For a bit more context about the current/default behavior, note however that as an UPS or its batteries age, the original assumptions of what would comprise an actual critical state can become obsolete (part of why some devices offer calibration functionality). So based on invalid assumptions we can think there's a lot of juice in the battery, while in fact the UPS is a glorified power strip or close to that.
from nut.
I suppose "link down/up" transitions broke the TCP session, so the upsmon
client was forcefully disconnected from the upsd
data server while in a critical state, and behaved by design.
from nut.
So, any communication problem between upsd and upsmon while on battery, and upsmon is supposed to immediately start powering off?
Then, what DEADTIME
is for?
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status
# fetch fails, the UPS is marked stale. If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition. This may force a shutdown if it is providing
# a critical amount of power to your system.
Is that applicable only to a local (serial or USB connected) UPS?
Is there any control like that for network communication?
from nut.
The data server regularly updates the connected clients like upsmon
with broadcasts about device information. For your corner case, "connected" is the critical word. Link flickered, IP address probably disappeared for a few seconds, TCP session got broken, server is assumed abruptly powered off (and/or its OS went down without waiting for clients to disconnect, so its upsd
is off). And since the UPS was last known to be on battery, we haven't got much more time to reconnect or investigate either. To keep data safe, gotta run to stop services, flush filesystems ASAP.
This seems similar to the documented example with networking gear turning off because it is not on an UPS (or a weaker one) and that being among the reasons for emergency shutdown of a client. Here your lack of network just did not have some switch or router disappearing.
from nut.
I see your point.
At the same time, the UPS was not really critical, it was on battery but not low battery.
It would be nice if users had some control over the behavior.
Immediate shutdown on any glitch is not suitable for all.
In some scenarios a UPS is used just to give enough time for an orderly shutdown.
But in other scenarios people want to keep services running for as long as possible (e.g., with regularly scheduled blackouts).
We give the master server DEADTIME
to restore communications with a UPS device.
But we do not give slaves any time to restore communications with the master.
Seems like an omission.
from nut.
@jimklimov, I created #2462. Not sure if that matches your idea on how the issue should be resolved.
In my opinion, going back to the traditional behavior is the best solution.
from nut.
Primary PR merged. Exploratory one (to return the log message) left out for now, per discussion. Maybe will come back to it for debug-only logging just in case, though.
from nut.
Just reading up on this some more after being out and about for a while. I agree a criticality should not be triggered by a minor communication staleness even when OB
, respecting DEADTIME
regardless of linestate seems a wise decision here. The default value of 15 seconds should be short enough not to cause any major crises if the UPS is in fact dead, but also long enough not to bring down a server prematurely due to some minor, short-lived communication hiccups.
In any case, I'm always happy with user-configurability where it makes sense (and especially for shutdown criteria), and instant criticality might have indeed been a bit too strict here in retrospect (but with good intentions nonetheless).
from nut.
Related Issues (20)
- Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions) | Eaton 9130 HOT 5
- Weird connectivity issues with a generic ViewPower UPS HOT 2
- With `nut.exe` help and docs, suggest (automate?) using `net start/stop SERVICENAME` to actually start/stop NUT for Windows
- usbhid-ups: Eaton input.current value is always 0 HOT 2
- APC SRV2KA support
- upsmon fails to start if the old pid happens to exist for an unrelated process HOT 14
- NOTIFYCMD does not work HOT 3
- Connectivity Issues with GE VH3000 UPS (Now owned by ABB) HOT 13
- Trying to upgrade on RPi HOT 6
- [HCL] <Cyber Energy> <Models with USB ID 0483:A430> supported by <usbhid-ups> HOT 1
- Cyberpower PR2200LCDSL: frequent usbfs errors HOT 1
- Supported device: GreenCell UPS07 (800VA)
- Salicru SPS 2000 ADV T not showing HOT 6
- [HCL] PowerWalker VI 800 CSW supported by nutdrv_qx HOT 1
- `usbhid-ups` sucks CPU in a tight `select` loop (2.8.2+ later branch build) HOT 8
- How to Set ECO/HE mode in Eaton 9E model HOT 1
- How to use nut-monitor on primary without actualy shuting down the system? HOT 2
- snmp-ups pw driver not working for Eaton Network-M2 HOT 2
- Temperature not reported for SMT1500i HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nut.