<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">I am running tests on my system and UPS, making sure that it is reliably able to come up, detect power loss, shutdown safely, and then come back up when the power returns.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">It does that MOST of the time.  However, a significant part of the time, the system comes up, and then doesn’t respond to loss of power.  Doing some checking, I find that the reason is because upsd never started.  Capturing its output,
 I see that it says :<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Fatal error: A previous upsd instance is already running!<o:p></o:p></p>
<p class="MsoNormal">Either stop the previous instance first, or use the 'reload' command.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Again note that this only happens SOME of the time….all other times, all 3 things get started that are supposed to (upsdrvctl, upsd, upsmon).  Even when upsd fails, the other two services start.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is being run in Porteus 3.1 with nut 2.7.2.  I’m calling my script from /etc/rc.d/rc.local.  This script contains:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#!/bin/sh<o:p></o:p></p>
<p class="MsoNormal">/usr/local/ups/sbin/upsdrvctl –u ups start<o:p></o:p></p>
<p class="MsoNormal">sleep 2<o:p></o:p></p>
<p class="MsoNormal">/usr/local/ups/sbin/upsd  -u ups<o:p></o:p></p>
<p class="MsoNormal">sleep 2<o:p></o:p></p>
<p class="MsoNormal">/usr/local/ups/sbin/upsmon –u ups<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I checked that upsd wasn’t getting started from anywhere else, and I looked in the NUT code to see if I could figure out why it thought upsd was already started, but nothing was obvious.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone have any other suggestions for tracking down why upsd errors out like that sometimes? 
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sincerely,<o:p></o:p></p>
<p class="MsoNormal">Rob Groner<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
<b><span style="color:#A70C28">RTD Embedded Technologies, Inc.</span></b><br>
</span><b><i><span style="font-size:10.0pt;font-family:"Times New Roman",serif;color:black">ISO 9001 and AS9100 Certified</span></i></b><span style="font-size:10.0pt;font-family:"Times New Roman",serif;color:black"><br>
Ph: 814-234-8087<br>
</span><span style="font-size:10.0pt;font-family:"Times New Roman",serif"><a href="http://www.rtd.com/"><span style="color:blue">www.rtd.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>