<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=utf-8">
<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:12.0pt;
        font-family:"Times New Roman",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.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">That fixed, but only after I also commented out several of the “show vdc” commands in the command-table which didn’t apply to either our Nexus 5K’s or our MDS
 switches.  Just in case we might have VDC’s in the future, I ended up doing this on a copy of the current nxrancid script named nx56-mds-rancid and then added that as a type called cisco-nx56-mds in the rancid-fe file. 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks, everything seems to be working now!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Dan Anderson [mailto:dan.w.anderson@gmail.com]
<br>
<b>Sent:</b> Wednesday, March 04, 2015 2:39 PM<br>
<b>To:</b> John Livingston<br>
<b>Cc:</b> rancid-discuss@shrubbery.net<br>
<b>Subject:</b> Re: [rancid] Issue with nx-os after switch upgrades<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Sorry. Should have included the diff:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">--- nxrancid.orig       2014-09-24 10:02:46.017969251 -0400<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">+++ nxrancid    2014-09-24 10:03:06.039305060 -0400<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">@@ -660,7 +660,7 @@<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        next if (/^(\s*|\s*$cmd\s*)$/);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        return(1) if /Line has invalid autocommand /;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        return(1) if /(Invalid input detected|Type help or )/;<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">-       return(-1) if (/\% Invalid command at /);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">+       return(1) if (/\% Invalid command at /);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        return(-1) if (/\% Permission denied/);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">        return(-1) if (/command authorization failed/i);<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Mar 4, 2015 at 5:37 PM, Dan Anderson <<a href="mailto:dan.w.anderson@gmail.com" target="_blank">dan.w.anderson@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">I had a similar problem with nxrancid. I ended up modifying the script in the ShowVersion sub to return(1) for Invalid input detected rather than -1.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The issue is that some of the commands will only show up with certain hardware ("show vdc all" doesn't work on anything other than a Nexus 7000/7700) or unless certain features have been enabled ("show fex" only works when "feature fex"
 has been enabled). It's a hack, but I thought that it was the easiest solution without creating a command list for every variable of hardware/configuration.<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Mar 4, 2015 at 5:08 PM, John Livingston <<a href="mailto:John.Livingston@emulex.com" target="_blank">John.Livingston@emulex.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Thanks guys!  Here is the full output of the nxrancid -d script:<br>
<br>
<br>
[user@host1 ~]$ cd bin<br>
[user@host1 ~]$ nxrancid -d rv-ibmbc1-fc2<br>
executing clogin -t 90 -c"term no monitor-force;show version;show version build-info all;show license;show license usage;show license host-id;show system redundancy status;show environment clock;show environment fan;show environment fex all fan;show environment
 temperature;show environment power;show boot;dir bootflash:;dir debug:;dir logflash:;dir slot0:;dir usb1:;dir usb2:;dir volatile:;show module;show module xbar;show inventory;show vtp status;show vlan;show debug;show cores vdc-all;show processes log vdc-all;show
 running-config" rv-ibmbc1-fc2<br>
PROMPT MATCH: rv-ibmbc1-fc2#<br>
HIT COMMAND:rv-ibmbc1-fc2#  term no monitor-force<br>
    In RunCommand: rv-ibmbc1-fc2#  term no monitor-force<br>
HIT COMMAND:rv-ibmbc1-fc2# show version<br>
    In ShowVersion: rv-ibmbc1-fc2# show version<br>
TYPE = NXOS<br>
HIT COMMAND:rv-ibmbc1-fc2# show version build-info all<br>
    In ShowVersionBuild: rv-ibmbc1-fc2# show version build-info all<br>
HIT COMMAND:rv-ibmbc1-fc2# show license<br>
    In ShowLicense: rv-ibmbc1-fc2# show license<br>
HIT COMMAND:rv-ibmbc1-fc2# show license usage<br>
    In ShowLicense: rv-ibmbc1-fc2# show license usage<br>
HIT COMMAND:rv-ibmbc1-fc2# show license host-id<br>
    In ShowLicense: rv-ibmbc1-fc2# show license host-id<br>
HIT COMMAND:rv-ibmbc1-fc2# show system redundancy status<br>
    In ShowRedundancy: rv-ibmbc1-fc2# show system redundancy status<br>
HIT COMMAND:rv-ibmbc1-fc2# show environment clock<br>
    In ShowEnv: rv-ibmbc1-fc2# show environment clock<br>
HIT COMMAND:rv-ibmbc1-fc2# show environment fan<br>
    In ShowEnv: rv-ibmbc1-fc2# show environment fan<br>
HIT COMMAND:rv-ibmbc1-fc2# show environment fex all fan<br>
    In ShowEnv: rv-ibmbc1-fc2# show environment fex all fan<br>
HIT COMMAND:rv-ibmbc1-fc2# show environment temperature<br>
    In ShowEnvTemp: rv-ibmbc1-fc2# show environment temperature<br>
HIT COMMAND:rv-ibmbc1-fc2# show environment power<br>
    In ShowEnvPower: rv-ibmbc1-fc2# show environment power<br>
HIT COMMAND:rv-ibmbc1-fc2# show boot<br>
    In ShowBoot: rv-ibmbc1-fc2# show boot<br>
HIT COMMAND:rv-ibmbc1-fc2# dir bootflash:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir bootflash:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir debug:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir debug:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir logflash:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir logflash:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir slot0:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir slot0:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir usb1:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir usb1:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir usb2:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir usb2:<br>
HIT COMMAND:rv-ibmbc1-fc2# dir volatile:<br>
    In DirSlotN: rv-ibmbc1-fc2# dir volatile:<br>
HIT COMMAND:rv-ibmbc1-fc2# show module<br>
    In ShowModule: rv-ibmbc1-fc2# show module<br>
HIT COMMAND:rv-ibmbc1-fc2# show module xbar<br>
    In ShowModule: rv-ibmbc1-fc2# show module xbar<br>
HIT COMMAND:rv-ibmbc1-fc2# show inventory<br>
    In ShowInventory: rv-ibmbc1-fc2# show inventory<br>
HIT COMMAND:rv-ibmbc1-fc2# show vtp status<br>
    In ShowVTP: rv-ibmbc1-fc2# show vtp status<br>
HIT COMMAND:rv-ibmbc1-fc2# show vlan<br>
    In ShowVLAN: rv-ibmbc1-fc2# show vlan<br>
HIT COMMAND:rv-ibmbc1-fc2# show debug<br>
    In ShowDebug: rv-ibmbc1-fc2# show debug<br>
HIT COMMAND:rv-ibmbc1-fc2# show cores vdc-all<br>
    In ShowCores: rv-ibmbc1-fc2# show cores vdc-all<br>
HIT COMMAND:rv-ibmbc1-fc2# show processes log vdc-all<br>
    In ShowProcLog: rv-ibmbc1-fc2# show processes log vdc-all<br>
rv-ibmbc1-fc2: show processes log vdc-all failed: -1<br>
rv-ibmbc1-fc2: missed cmd(s): show running-config<br>
rv-ibmbc1-fc2: missed cmd(s): show running-config<br>
rv-ibmbc1-fc2: End of run not found<br>
rv-ibmbc1-fc2: End of run not found<br>
rv-ibmbc1-fc2: clean: 0, end: 0<br>
!PROC_LOGS:                                   ^<br>
[user@host1 ~]$<br>
<br>
<br>
And here's the output of clogin with just the "show running-config" command:<br>
<br>
<br>
<br>
[user@host1 ~]$clogin -t 90 -c:"show running-config" rv-ibmbc1-fc2<br>
rv-ibmbc1-fc2<br>
spawn ssh -c 3des -x -l user rv-ibmbc1-fc2<br>
MDS Switch<br>
Password:<br>
Cisco Nexus Operating System (NX-OS) Software<br>
TAC support: <a href="http://www.cisco.com/tac" target="_blank">http://www.cisco.com/tac</a><br>
Copyright (c) 2002-2014, Cisco Systems, Inc. All rights reserved.<br>
The copyrights to certain works contained in this software are<br>
owned by other third parties and used and distributed under<br>
license. Certain components of this software are licensed under<br>
the GNU General Public License (GPL) version 2.0 or the GNU<br>
Lesser General Public License (LGPL) Version 2.1. A copy of each<br>
such license is available at<br>
<a href="http://www.opensource.org/licenses/gpl-2.0.php" target="_blank">http://www.opensource.org/licenses/gpl-2.0.php</a> and<br>
<a href="http://www.opensource.org/licenses/lgpl-2.1.php" target="_blank">http://www.opensource.org/licenses/lgpl-2.1.php</a><br>
rv-ibmbc1-fc2#<br>
rv-ibmbc1-fc2# terminal length 0<br>
rv-ibmbc1-fc2# terminal width 132<br>
rv-ibmbc1-fc2# terminal-length 0<br>
                       ^<br>
% Invalid command at '^' marker.<br>
rv-ibmbc1-fc2#  :show running-config<br>
               ^<br>
% Invalid command at '^' marker.<br>
rv-ibmbc1-fc2#exit<br>
Connection to rv-ibmbc1-fc2 closed.<br>
[user@host1 ~]$<br>
<br>
Any help you can provide is much appreciated.<br>
<br>
Thanks,<br>
John<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">_______________________________________________<br>
Rancid-discuss mailing list<br>
<a href="mailto:Rancid-discuss@shrubbery.net" target="_blank">Rancid-discuss@shrubbery.net</a><br>
<a href="http://www.shrubbery.net/mailman/listinfo/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo/rancid-discuss</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><span class="hoenzb"><span style="color:#888888">-- <o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><span style="color:#888888">Dan</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal">Dan<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>