<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 12 (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:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</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=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>We&#8217;ve been running Rancid for a couple years now on
some pretty standard Cisco gear and the powers that be decided it was time to throw
some Nexus switches into the mix. Seems like some strange things happen with
these ones. We figured out that the service account Rancid uses to log in had
to have a certain privilege level to execute some commands so that fixed our
initial issues. But I&#8217;m still having some troubles.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I&#8217;ve done quite a bit of searching around and narrowed
the main problem down to the &#8216;show version&#8217; command. It would
appear that it does not have an EOL or something like that so the command that immediately
follows it in the list appears to fail. In the debug output below I can see the
first two commands then it appears to skip the &#8216;show environment fan&#8217;
which is right after the &#8216;show version&#8217; in the command list then
reports that it failed. If I comment out the &#8216;show environment fan&#8217;
command then the &#8216;show environment temp&#8217; command becomes the
missing one and so on. This is what leads me to believe that the &#8216;show
version&#8217; command is not &#8220;finishing clean&#8221; or however that
should be stated. Do I need to add some regex to the ShowVersion subroutine to
watch for some text in the lower portion of the &#8216;show version&#8217;
command to &#8220;tell&#8221; the script that it&#8217;s over and good or
something similar or am I way off track with all this?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Here&#8217;s the debug output (slightly shortened):<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal># nxrancid -d x.x.x.x<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>executing clogin -t 90 -c&quot;term no monitor-force;show
version;show environment fan;show environment temperature;show environment
power; &#8230;&lt;snipped&gt;&#8230;&#8221; x.x.x.x<o:p></o:p></p>

<p class=MsoNormal>PROMPT MATCH: NY4-CORE-SW01#<o:p></o:p></p>

<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01#&nbsp; term no monitor-force<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; In RunCommand: NY4-CORE-SW01#&nbsp; term
no monitor-force<o:p></o:p></p>

<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01# show version<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; In ShowVersion: NY4-CORE-SW01# show
version<o:p></o:p></p>

<p class=MsoNormal>TYPE = NXOS<o:p></o:p></p>

<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01# show environment temperature<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; In ShowEnvTemp: NY4-CORE-SW01# show
environment temperature<o:p></o:p></p>

<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01# show environment power<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; In ShowEnv: NY4-CORE-SW01# show
environment power<o:p></o:p></p>

<p class=MsoNormal>&#8230; &lt;snipped&gt; &#8230;<o:p></o:p></p>

<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01# show running-config<o:p></o:p></p>

<p class=MsoNormal>&nbsp;&nbsp;&nbsp; In WriteTerm: NY4-CORE-SW01# show
running-config<o:p></o:p></p>

<p class=MsoNormal>192.168.128.4: found exit<o:p></o:p></p>

<p class=MsoNormal>192.168.128.4: missed cmd(s): show environment fan<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Any light that could be shed on this is appreciated.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Thanks,<o:p></o:p></p>

<p class=MsoNormal>Bob Weaver<o:p></o:p></p>

</div>

</body>

</html>