[Nut-upsdev] "ups.status" -> "ups.alarm"
Arjen de Korte
nut+devel at de-korte.org
Tue Aug 7 09:10:45 UTC 2007
The list of status bits we're seeing has increased over the years.
Currently for instance, the usbhid-ups driver has defined no less than 20
status bits (and I intend to add two more in the next couple of days,
FRANGE and FANFAIL):
#define STATUS_ONLINE 0x00001 /* on line */
#define STATUS_DISCHRG 0x00002 /* discharging */
#define STATUS_CHRG 0x00004 /* charging */
#define STATUS_LOWBATT 0x00008 /* low battery */
#define STATUS_OVERLOAD 0x00010 /* overload */
#define STATUS_REPLACEBATT 0x00020 /* replace battery */
#define STATUS_SHUTDOWNIMM 0x00040 /* shutdown imminent */
#define STATUS_TRIM 0x00080 /* SmartTrim */
#define STATUS_BOOST 0x00100 /* SmartBoost */
#define STATUS_BYPASS 0x00200 /* on bypass */
#define STATUS_OFF 0x00400 /* ups is off */
#define STATUS_CAL 0x00800 /* calibration */
#define STATUS_OVERHEAT 0x01000 /* overheat; Belkin, TrippLite */
#define STATUS_COMMFAULT 0x02000 /* UPS fault; Belkin, TrippLite */
#define STATUS_DEPLETED 0x04000 /* battery depleted; Belkin */
#define STATUS_TIMELIMITEXP 0x08000 /* time limit expired; APC */
#define STATUS_BATTERYPRES 0x10000 /* battery present; APC */
#define STATUS_FULLYCHARGED 0x20000 /* battery full; CyberPower */
#define STATUS_AWAITINGPOWER 0x40000 /* awaiting power; Belkin,
TrippLite */
#define STATUS_VRANGE 0x80000 /* voltage out of range; TrippLite */
I think that quite a few of the above deserve to be put in "ups.alarm",
since they do not require *immediate* action from clients, but rather from
an operator. For instance, it is certainly worthwhile that a battery needs
replacement, but as long as the UPS is providing power, clients probably
don't care about that (or can do something about that). The same probably
goes for OVERHEAT, COMMFAULT, DEPLETED, TIMELIMITEXP, BATTERYPRES (we
should reverse the logic here, so that we don't raise an alarm on systems
that don't support this flag), AWAITINGPOWER, VRANGE, FRANGE and FANFAIL.
Any thoughts?
Best regards, Arjen
PS I will add the alarm_* functions to usbhid-ups later this week.
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsdev
mailing list