Skip to content

Commit

Permalink
clients/upsmon.c: for OB UPS and communications failure, leave just t…
Browse files Browse the repository at this point in the history
…he debug log message [networkupstools#2454]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jun 10, 2024
1 parent ad19e07 commit 82e5932
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions clients/upsmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,20 @@ static int is_ups_critical(utype_t *ups)
ups->sys);
return 1;
}

if (ups->linestate == 0) {
/* Just a message for post-mortem troubleshooting:
* no flag flips, no return values issued just here
* (note the message is likely to appear on every
* cycle when the communications are down, to help
* track when this was the case; no log throttling).
*/
upsdebugx(1,
"UPS [%s] was last known to be not fully online "
"and currently is not communicating, just so you "
"know (waiting for DEADTIME to elapse)",
ups->sys);
}
}

/* administratively OFF (long enough, see OFFDURATION) */
Expand Down

0 comments on commit 82e5932

Please sign in to comment.