Displaying 3 results from an estimated 3 matches for "clear_alarm".
2011 Sep 15
0
Patch to NUT 2.6.0 two fix two issues
...he down
> remote host... It eventually gave up - but since the 2 minute timeout was
> pretty long - it also marked all other UPSes it was monitoring as "down"
> (and then immediately "up" again). Causing a lot of unncessary
> false alarms... Solved with a set_alarm()/clear_alarm() wrapper around the
> upscl_connect() call.
>
thanks for your patch. I've got to check it more thoroughly, but it will at
least need some rework.
as an example, the "signal(SIGCHLD, SIG_IGN)" should be in
"setup_signals(void)" and use "sigaction" for more p...
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...R2";
+ query[1] = ups->upsname;
+ numq = 2;
+ }
+
if (!strcmp(var, "status")) {
query[0] = "VAR";
query[1] = ups->upsname;
@@ -1518,7 +1530,25 @@ static void pollups(utype_t *ups)
if (get_var(ups, "status", status, sizeof(status)) == 0) {
clear_alarm();
parse_status(ups, status);
- return;
+ /* All is well, continue to poll SIGUSR1 RP */
+ set_alarm();
+ if (get_var(ups, "SIGUSR1", status, sizeof(status)) == 0) {
+ clear_alarm();
+ if ( ! (strcmp(status,"0") == 0)) { /* See K&R p.53 */
+ /* We have a...
2007 Jan 04
2
Re: [nut-Patches][303751] Checking UPS Temperature
...debug("polling ups: %s\n", ups->sys);
>
> +//EW >>>>>>
> + /* if the user wants us to check for overtemp */
> + if (upsovertemp > 0.0) {
> + set_alarm();
> +
> + if (get_var(ups, "temp", status, sizeof(status)) == 0) {
> + clear_alarm();
> + parse_temperature(ups, status);
> + }
> +
> + /* fallthrough: no communications */
> + clear_alarm();
> + }
> +//EW <<<<<<
> +
> set_alarm();
>
>
>
> +++ upsmon.config (changes somewhere in the config file)
>
> # ----...