<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’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’m still having some troubles.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I’ve done quite a bit of searching around and narrowed
the main problem down to the ‘show version’ 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 ‘show environment fan’
which is right after the ‘show version’ in the command list then
reports that it failed. If I comment out the ‘show environment fan’
command then the ‘show environment temp’ command becomes the
missing one and so on. This is what leads me to believe that the ‘show
version’ command is not “finishing clean” 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 ‘show version’
command to “tell” the script that it’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> </o:p></p>
<p class=MsoNormal>Here’s the debug output (slightly shortened):<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal># nxrancid -d x.x.x.x<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>executing clogin -t 90 -c"term no monitor-force;show
version;show environment fan;show environment temperature;show environment
power; …<snipped>…” 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# term no monitor-force<o:p></o:p></p>
<p class=MsoNormal> In RunCommand: NY4-CORE-SW01# 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> 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> 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> In ShowEnv: NY4-CORE-SW01# show
environment power<o:p></o:p></p>
<p class=MsoNormal>… <snipped> …<o:p></o:p></p>
<p class=MsoNormal>HIT COMMAND:NY4-CORE-SW01# show running-config<o:p></o:p></p>
<p class=MsoNormal> 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> </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> </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>