Re: [Nut-upsuser] "no longer stale" when disconnected with 2.0.5 newhidups

2007-01-28 Thread Arjen de Korte

> After I disconnect the UPS the upsd write "Data for UPS [apc] is stale -
> check driver" in /var/log/messages. In the same second it tells "UPS [apc]
> data is no longer stale". This repeats all the time the ups is
> disconnected:
>
> Jan 25 14:45:03 degpn026w226 kernel: usb 4-1: USB disconnect, address 3
> Jan 25 14:45:06 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
> check driver
> Jan 25 14:45:08 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
> Jan 25 14:45:10 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
> check driver
> Jan 25 14:45:10 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale

[...]

Now that Peter has pointed me in the right direction, forget my previous
posts.

This is really weird. There are basically two ways for upsd (by means of
the sstate_dead() function) to determine the *driver* is stale (it has
nothing to do with the UPS, we'd better change the wording of the error
messages). Either the driver has not send us anything within MAXAGE
seconds or upsd has problems maintaining the connection to the driver
socket.

Unless you've changed the value of MAXAGE to some ludicrous low value of
two seconds, this might be a socket problem. I recall someone having
similar problems on a *BSD system a while ago. What system are you using?
Could you check if the socket is in /var/state/ups? Whatever happens, the
driver should *not* remove the socket if it can't communicate with the
UPS. It should call dstate_datastale() rather than giving up the socket in
that case (this is not how the line of communication works). So the
problem is probably in the driver, since it has no problems keeping the
socket fresh when the UPS is connected.

Best regards, Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] "no longer stale" when disconnected with 2.0.5 newhidups

2007-01-27 Thread Arjen de Korte

> After reconnect the ups, the communication is ok and nut works until I
> disconnect again.

Which version of NUT are you using?

> I tired also different values for pollinterval.

Which values? Did you also change the MAXAGE value for upsd?

> We want to shutdown the server, if the ups is disconnected from the server
> (e.g. if the ups is defect).

You can do this by means of a script that is called by NOTIFYCMD (see 'man
5 upsmon.conf') or through upssched (see 'man 8 upssched'), which is more
flexible.

Best regards, Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] "no longer stale" when disconnected with 2.0.5 newhidups

2007-01-26 Thread Markus Kress

Hello,

I'm using driver newhidups with APC Back-UPS CS 500. Most things works fine
except the following:

After I disconnect the UPS the upsd write "Data for UPS [apc] is stale -
check driver" in /var/log/messages. In the same second it tells "UPS [apc]
data is no longer stale". This repeats all the time the ups is
disconnected:

Jan 25 14:45:03 degpn026w226 kernel: usb 4-1: USB disconnect, address 3
Jan 25 14:45:06 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:08 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:10 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:10 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:12 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:12 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:14 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:14 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:16 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:16 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:18 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:18 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale
Jan 25 14:45:20 degpn026w226 upsd[4275]: Data for UPS [apc] is stale -
check driver
Jan 25 14:45:20 degpn026w226 upsd[4275]: UPS [apc] data is no longer stale

After reconnect the ups, the communication is ok and nut works until I
disconnect again.
I tired also different values for pollinterval.

We want to shutdown the server, if the ups is disconnected from the server
(e.g. if the ups is defect).

Mit freundlichen Grüßen / Best regards

Markus Kress
System Technologies

GLS IT-Services GmbH
GLS Germany-Straße 1-7
36286 Neuenstein
Germany

T +49 (0) 66 77 17 426
M +49 (0) 172 1781 426
F +49 (0) 66 77 17 111

E [EMAIL PROTECTED]


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser