<div dir="ltr"><div>Hello all,</div><div><br></div><div>  Sorry for not jumping in earlier, I was away to a conference.</div><div><br></div><div>  One point that Ted raised, about storage, is generally valid, correct and indeed very important (you can't replace worn-out soldered storage as easily as pop an MMC/USB/M.2 module).</div><div>  "But, there's always a `but`!" :)</div><div><br></div><div>  NUT by itself does not write log files. System integrations (service units, init scripts...) might redirect its daemons' stdout/stderr to log files, but this is not a requirement of NUT programs as such. Depending on debug verbosity settings (now can be more easily changed at run-time than before) the stream can be pretty intense or practically nothing. With newer codebase, there are also provisions for a number of `NUT_QUIET_<something>` envvar settings to suppress start-up banners, systemd or similar framework notification initializers, etc. that can help in embedded space.<br></div><div><br></div><div>
  One notable exception is `upslog` that can write to files (or stderr). I am not sure how widely it is used, but it did get a series of face-lifts recently.<br></div><div>  Other daemons write PID files and create UNIX sockets, the killpower file in upsmon, etc. that can all be done in tmpfs. These locations can be built-in by build configuration or tuned by environment variables like NUT_CONFPATH, NUT_STATEPATH etc.<br></div><div><br></div><div>  Also note that NUT daemons send messages to at least two streams (enabled or not as settings would tell them) - stderr or syslog. I think the latter goes to a local syslog daemon socket per local syslog library implementation (we just call the standard method), at least there are no explicit settings in NUT for that like selecting an external log sink server. So another system component that might write to storage is that. Generally, it can also route collected messages to a remote sink.<br></div><div><br></div><div>  I saw some embedded systems like routers write a copy of logs to a RAM-backed tmpfs, so usually a few last kilobytes of system activity can be seen that way before they rotate away. In this case, note that if syslog messages are written and rotated by daemon, it is easier to arrange, than somehow reloading/restarting NUT daemons (or some collector of their stderr outputs) every few minutes/seconds to do so.</div><div><br></div><div>  Regarding disconnections in general, some drivers (usbhid-ups) were improved in recent years about this, but I haven't seen pcmusb specifically touched in a while.</div><div><br></div><div>  In some cases, e.g. with CPS-originated devices, we saw their controller chip going to sleep if not polled frequently enough - so reducing the cycle times could help.</div><div><br></div><div>  For example, with Raspberry Pi being popular recently, by the flow of questions on NUT issue tracker there was a feeling that e.g. RPi3 had connection issues reported often, RPi4 rarely, RPi5 on the rise again. This might reflect popularity of the platform and some chance of hitting issues at all, compared to some same-device series less used, or it could be linked with hardware (chips, soldering, overheating, firmware tuning, etc.) - so certainly something to look into with your router HW designer. Either to confirm that it might be a venue or to honestly(!) rule out a dead end and focus on the more likely causes. Double-check the power budget, maybe the appetites of hardware grew with its new revision. Insufficient sources causing logical chips to do random things especially at a "wrong time to fail" did bite me a number of times in small machines and big ones alike.<br></div><div><br></div><div>Hope this helps,<br></div><div>Jim Klimov<br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2025 at 7:28 PM Ted Mittelstaedt via Nut-upsdev <<a href="mailto:nut-upsdev@alioth-lists.debian.net">nut-upsdev@alioth-lists.debian.net</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">
  
    
  
  <div>
    <p>OpenWRT version 23.05.0-rc3 is, for starters, not supported
      anymore by the OpenWRT project, and is old.</p>
    <p>The current version is OpenWRT 23.05.05</p>
    <p>The reason you are likely getting an old version of NUT when you
      load the nut package is because you are using an old version of
      openwrt.</p>
    <p>Your team needs to sysupdate your 4G LTE Wifi router</p>
    <p>You also, in my opinion, need to seriously reconsider running NUT
      on an openwrt router.  The reason why is that NUT generates
      logfiles and writes to the filesystem.</p>
    <p>The flash chips that are used on routers are not designed like a
      USB flash stick where they are intended to have a read/write
      filesystem on them.  They have no bad block management with NAND
      flash chips.  That is provided by a UBI layer.  You can read about
      that here:</p>
    <p><a href="https://openwrt.org/docs/techref/flash.layout" target="_blank">[OpenWrt
        Wiki] The OpenWrt Flash Layout</a></p>
    <p>SOME of the NAND devices that OpenWRT has been ported to, DO have
      complete UBI support, others don't.  You did not say what model of
      router you are running - but unless you have researched it and are
      completely sure that it has a fully functional bad block
      management, you can easily cause problems over time attempting to
      run programs on an OpenWRT router.</p>
    <p>In general it's safest to run READ ONLY programs on openwrt.  For
      example, the snmpd server.  Programs that WRITE to the filesystem
      on the OpenWRT router should be avoided.</p>
    <p>There's a reason we use hard drives on servers.</p>
    <p>Ted<br>
    </p>
    <div>On 1/30/2025 7:50 PM, Rushabh Sanghavi
      (Rush) wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      <div>
        <p class="MsoNormal">Dear NUT Developers,</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">A very good morning to you and hope that
          you are in the best of health and spirits.</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">For an upcoming UPS Project, our team has
          been testing <span style="color:black">
            Powercom’s Cleanline T-1500 UPS model whose photo has been
            attached with this e-mail. Our team has been testing this
            UPS with one of our 4G LTE WiFi router models on which
            Network UPS Tools (NUT) Version 2.8.0-3 has been installed.
            BUT during the testing our team observed multiple instances
            of error message <b><span style="background:yellow">"Data
                for UPS [pcmusb] is stale - check driver"</span></b>
            being randomly reported by our 4G LTE WiFi router. Here is
            the SUMMARY of the issue below for clear understanding
            purposes.</span></p>
        <p class="MsoNormal"><span style="color:black"> </span></p>
        <ul style="margin-top:0cm" type="disc">
          <li style="margin-left:18pt">NUT
            Version <span style="color:black">
              2.8.0-3 was installed on our 4G LTE WiFi router by our
              team.</span></li>
          <li style="margin-left:18pt">Also
            our 4G LTE WiFi router had Linux Kernel Version 5.15.127,
            OpenWRT Distribution release “23.05.0-rc3” and OpenWRT
            Distribution Revision “r23389-5deed175a5” installed on it.
          </li>
          <li style="margin-left:18pt"><span style="color:black">Powercom’s Cleanline T-1500 UPS was
              connected with our 4G LTE WiFi router via USB to USB Cable
              Connection (</span>i.e. USB Port on router side and USB
            Port on UPS side)</li>
        </ul>
        <p style="margin-left:54pt">Now when
          NUT installed on our 4G LTE WiFi router model unit tried to
          poll and fetch values of different UPS parameters from
          Powercom’s Cleanline T-1500 UPS model
        </p>
        <p style="margin-left:54pt">after
          both UPS and router had been running for sometime (i.e. for
          random period of time):</p>
        <p style="margin-left:54pt"><span> </span></p>
        <ul style="margin-top:0cm" type="disc">
          <ul style="margin-top:0cm" type="circle">
            <li style="margin-left:18pt">router
              started reporting the error message
              <b><span style="background:yellow">“Data for UPS [pcmusb]
                  is stale - check driver”</span></b></li>
            <li style="margin-left:18pt">after
              that router could not get UPS’s status any more unless we
              restart the NUT service</li>
            <li style="margin-left:18pt">and
              the router started reporting the error message “Data for
              UPS [pcmusb] is stale - check driver” after running for
              sometime again</li>
          </ul>
        </ul>
        <p class="MsoNormal"><span style="font-size:14pt;font-family:"Angsana New",serif"> </span></p>
        <p style="margin-left:90pt">Note: <strong><span style="font-family:"Calibri",sans-serif">[pcmusb]</span></strong>
          represents the
          <strong><span style="font-family:"Calibri",sans-serif">name or
              identifier</span></strong> assigned to the UPS instance
          within the NUT (Network UPS Tools) configuration</p>
        <p class="MsoNormal"> </p>
        <ul style="margin-top:0cm" type="disc">
          <li style="margin-left:18pt">Our
            team tried to increase value of NUT’s timers such as
            “pollinterval”, “pollfreq”, “maxage” but still the issue
            could not get solved or fixed</li>
          <li style="margin-left:18pt">Kindly
            NOTE that our team tested the above with both the NUT
            Drivers i.e. blazer_usb and nutdrv_qx. But the same error
            message mentioned above was observed.
          </li>
          <li style="margin-left:18pt">Also
            kindly NOTE that our team also tried to test with NUT Driver
            “usbhid-ups” but it is seems that this particular Driver is
            not supported by
            <span style="color:black">Powercom’s Cleanline T-1500 UPS
              model whose photo has been attached with this e-mail.
            </span></li>
          <li style="margin-left:18pt">Currently
            our team is not 100% sure about the exact root cause.</li>
        </ul>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Our team need to know the following from
          NUT Developers.</p>
        <p class="MsoNormal"> </p>
        <ul style="margin-top:0cm" type="disc">
          <li style="margin-left:18pt">Which
            the is correct NUT Driver that our team need to use on the
            4G LTE WiFi router so that it can communicate smoothly and
            successfully with
            <span style="color:black">Powercom’s Cleanline T-1500 UPS
              model</span> whose photo has been attached with this
            e-mail?</li>
          <li style="margin-left:18pt">Which
            specific parameters within the default Configuration
            Settings file of NUT Version
            <span style="color:black">2.8.0-3</span> on our 4G LTE WiFi
            router need to be tweaked / changed so that our 4G LTE WiFi
            router model can communicate with the
            <span style="color:black">Powercom’s Cleanline T-1500 UPS
              model</span> smoothly and successfully?</li>
          <li style="margin-left:18pt">Which
            specific parameters within the default ups.conf / upsd.conf
            file on our 4G LTE WiFi router needs to be tweaked / changed
            so that our 4G LTE WiFi router model can communicate with
            the
            <span style="color:black">Powercom’s Cleanline T-1500 UPS
              model</span> smoothly and successfully?</li>
        </ul>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Also I am hereby attaching the Log Files
          with the Log Messages reported on our 4G LTE WiFi router
          model. The 1st Log file contains Log Messages during testing
          with NUT Driver “blazer_usb” while the 2nd Log file contains
          Log Messages during testing with NUT Driver “nutdrv_qx”. You
          will observe the ERROR Message <b><span style="background:yellow">“Data for UPS [pcmusb] is stale
              - check driver”</span></b> within both these attached Log
          Files.
        </p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Awaiting your swift response back.</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Thanking you,</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal">Yours sincerely,</p>
        <p class="MsoNormal"> </p>
        <p class="MsoNormal"><span style="font-size:8pt;color:rgb(31,73,125)"> </span></p>
        <p class="MsoNormal"><span style="font-size:8pt;color:rgb(31,73,125)"><img id="m_-8928049028593954307Picture_x0020_1" src="cid:ii_194cff1411a4ce8e91" alt="Legs Logo" style="width: 1.3472in; height: 1.2986in;" width="129" height="125"></span></p>
        <p class="MsoNormal"><b><span style="color:rgb(31,73,125)">Rushabh N. S</span></b><b><span style="color:rgb(31,73,125)"></span></b></p>
        <p class="MsoNormal"><b><span style="color:rgb(31,73,125)">Research and
              Development Director</span></b></p>
        <p class="MsoNormal"><b><span style="color:rgb(31,73,125)">PP Ontime
              Company Limited</span></b></p>
        <p class="MsoNormal"><b><span style="color:rgb(31,73,125)">PP Group of
              Companies</span></b></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Address: 1011
            Supalai Grand Tower,</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">16th Floor,
            Rama 3 Road,</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Chongnonsi,
            Yannawa,</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Bangkok –
            10120, Thailand</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Landline No:
            +66-2-0562099 Ext. 2201</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Fax No:
            +66-2-0562088</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Cell Phone No:
            +66-8-59118578 / +66-6-22236221</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">E-mail: <a href="mailto:rushabh@pp-ontime.co.th" target="_blank">
              <span style="color:blue">rushabh@pp-ontime.co.th</span></a></span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Web: <a href="http://www.pp-ontime.co.th" target="_blank">
              <span style="color:blue">www.pp-ontime.co.th</span></a></span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)">Skype ID:
            rushabh.sanghavi</span></p>
        <p class="MsoNormal"><span style="color:rgb(31,73,125)"> </span></p>
        <p class="MsoNormal"><b><span style="color:rgb(36,64,97)">Disclaimer:</span></b></p>
        <p class="MsoNormal"><span style="color:rgb(36,64,97)">***************************************************************<br>
            <b>Important</b> <br>
            Confidentiality: This Information is intended for the
            above-named person and may contain confidential and/or
            legally privileged material. Any opinions expressed in this
            information are not necessarily those of the company. If it
            has come to you in error you must take no action based on
            it, nor must you copy or show it to anyone; please
            delete/destroy and inform the sender immediately.
          </span></p>
        <p class="MsoNormal"><span style="color:rgb(36,64,97)"> </span></p>
        <p class="MsoNormal"><b><span style="color:rgb(36,64,97)">Monitoring/Viruses/Malwares</span></b><span style="color:rgb(36,64,97)">
            <br>
            PP-Ontime reserves the right to monitor all incoming and
            outgoing emails via PP-Ontime's systems. Although we have
            security program to monitor and eliminate virus/malware, we
            also advise that in keeping with good computing practice the
            recipient should ensure they are actually virus/malwares
            free. <br>
*************************************************************** </span></p>
        <p class="MsoNormal"> </p>
      </div>
      <h3>Disclaimer:</h3>
***********************************************************************************************<br>
      <b>Important</b> <br>
      Confidentiality: This Information is intended for the above-named
      person and may contain confidential and/or legally privileged
      material. Any opinions expressed in this information are not
      necessarily those of the company. If it has come to you in error
      you must take no action based on it, nor must you copy or show it
      to anyone; please delete/destroy and inform the sender
      immediately.
      <b>Monitoring/Viruses/Malwares</b> <br>
      PP-Ontime reserves the right to monitor all incoming and outgoing
      emails via PP-Ontime's systems. Although we have security program
      to monitor and eliminate virus/malware, we also advise that in
      keeping with good computing practice the recipient should ensure
      they are actually virus/malwares free. <br>
**********************************************************************************************
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Nut-upsdev mailing list
<a href="mailto:Nut-upsdev@alioth-lists.debian.net" target="_blank">Nut-upsdev@alioth-lists.debian.net</a>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a>
</pre>
    </blockquote>
  </div>
_______________________________________________<br>
Nut-upsdev mailing list<br>
<a href="mailto:Nut-upsdev@alioth-lists.debian.net" target="_blank">Nut-upsdev@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev</a><br>
</blockquote></div>