[Nut-upsdev] Suspend-to-disk & NUT

Arjen de Korte nut+devel at de-korte.org
Sun Jan 8 20:15:57 UTC 2006


Arjen de Korte schreef:

[...]

> I'll probably first try to insert some code in the SafeNet driver which
> communicates with the UPS attached to this system, to see whether the
> problem is related to the communication with the UPS or somewhere else
> in NUT.

I made good progress today. The problem is not in the (SafeNet) driver,
nor in the communication with the UPS. Even when upsmon keeps on telling
that the data is stale, the UPS is polled for its status and the result
is processed.

I found something remarkable though which may lead to the solution of
this problem. See the following exerpt from the system log just after
waking from the suspend-to-disk state:

Jan  8 21:01:16 linux upsmon[27022]: Poll UPS [fenton at localhost] failed
- Data stale

< couple of lines deleted >

Jan  8 21:02:57 linux upsmon[27022]: Poll UPS [fenton at localhost] failed
- Data stale
Jan  8 21:03:02 linux upsmon[27022]: Poll UPS [fenton at localhost] failed
- Data stale
Jan  8 21:03:07 linux upsmon[27022]: Poll UPS [fenton at localhost] failed
- Data stale
Jan  8 21:03:07 linux safenet[27012]: Communications with UPS lost:
Status read failed
Jan  8 21:03:10 linux safenet[27012]: Communications with UPS lost:
Status read failed
Jan  8 21:03:12 linux upsmon[27022]: Poll UPS [fenton at localhost] failed
- Data stale
Jan  8 21:03:13 linux safenet[27012]: Communications with UPS lost:
Status read failed
Jan  8 21:03:15 linux safenet[27012]: Communications with UPS re-established
Jan  8 21:03:15 linux upsd[27024]: UPS [fenton] data is no longer stale
Jan  8 21:03:17 linux upsmon[27022]: Communications with UPS
fenton at localhost established

At 21:03:00 I yanked the serial cable from the UPS. As can be seen in
this log, the safenet driver noticed this a few seconds later. However,
when I plugged the cable back in again, somehow upsd picked this up and
everything started working again. Without restarting anything! This
leads me to the conclusion that probably upsd missed a state change and
consequently fails to notice that communication is good.

It looks like this problem is not limited to just one driver.

Regards,
Arjen



More information about the Nut-upsdev mailing list