<div dir="ltr"><div>Regarding the failure criteria, probably there is no "size that suits all": one complication is that some drivers actively poll devices with some frequency for all data, others with different frequencies (full/quick walks mentioned earlier), yet others get interrupts or other data pushes initiated by the device. Now we are getting more drivers that de-facto talk several protocols (e.g. devices have different data channels over USB) and get different data views over each "link".</div><div><br></div><div>Either way, polling with some frequency means that frequency was hard-coded or more likely configured on the driver side. I don't think there is any configuration for expected interrupts frequency => unhealthy data age.</div><div><br></div><div>The driver reports to its local `upsd` relatively instantly (usually after it ends the data walk) which caches its copy of the data, and reports that copy to clients like `upsc`.  So the age is practically always > 0. What the unhealthy value is, that's questionable - probably MAXAGE as for data stale assigned by `upsd` to a stuck driver altogether (which is separate from drivers being alive and reporting that data is stale because they know vendor protocol dialog failed). At least, `MAXAGE` is a setting in `upsd.conf` so the data server knows the value to compare data point 
ages 

(`st_tree_t.lastset`) against.</div><div><br></div><div>Jim</div><div><br><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Nov 14, 2026 at 5:54 PM <a href="mailto:info@lenssen.biz">info@lenssen.biz</a> <<a href="mailto:kl-git@lenssen.biz">kl-git@lenssen.biz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Greg, Jim,<br>
<br>
Thanks for your replies and the discussion about my proposal. I am new to this and will put the disclosure first from now on.<br>
<br>
Re semantics: 0 = healthy; > 0 = seconds since the start of the first failed read cycle; by default datastale() sets the start and dataok() resets it.<br>
<br>
What would be the failure criteria?  "no item could be read“ or even partial failures?<br>
<br>
I understand per-variable timestamps are an interesting option, but a separate topic. Is a  simple variable acceptable for now?<br>
<br>
Does something speak against that upsc warns as soon as the age is > 0, or shall this only happen after a grace period of one poll interval, so that a single transient error don’t issue  a warning?<br>
<br>
Thanks,<br>
<br>
Klaus<br>
<br>
> Am 14.11.2026 um 14:30 schrieb Greg Troxel <<a href="mailto:gdt@lexort.com" target="_blank">gdt@lexort.com</a>>:<br>
> <br>
>  Disclosure: I prepared the analysis and the code with the help of an AI<br>
>  coding assistant (Claude Code, model Claude Opus 5.5). I reviewed the<br>
>  changes and take responsibility for them.<br>
> <br>
> Please put this up front, not at the end, in the future.<br>
> <br>
> I'm not going to read this (because I think it's not ok to ask humans to<br>
> read LLM output), but one concern about semantics.  Happy to discuss<br>
> that with people -- please ensure all LLM text in email is labelled as<br>
> such.<br>
> <br>
> The proposal is for an age variable.  Broadly that makes sense.<br>
> However, it presumes there is a single age, and therefore that data is<br>
> read all at once.  That might be true for many drivers, but other<br>
> drivers might fetch some data more often.<br>
> <br>
> I suspect blurring this doesn't really matter, but we should have clean<br>
> semantics.  Perhaps<br>
> <br>
>  when there is a failure to read, a timestamp (of the start of the<br>
>  failed read) is stored, and age reflects time since that timestamp<br>
> <br>
>  age is 0 when data is being read on the intended schedule, and the<br>
>  most recent read cycle did not fail<br>
> <br>
> Thus a reader doesn't know exactly when a data point was taken, and we<br>
> can avoid per-item timestamps, but there is still "how stale is the<br>
> data", with anything non-zero reflecting "problem reading data, began x<br>
> seconds ago", and zero reflecting "data is not stale".<br>
> <br>
<br>
</blockquote></div>