<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
Okay, with the proper -d and -t flags it writes the files and from there can process some of the commands. But it seems like the .raw file isn't beeing written consistently. Different iterations return different results for 'write term'</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Once hlogin is fed a timeout it will login just fine. hrancid (which calls hlogin) seems to be missing a 'hit' on 'write term'.</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">Looking at the .raw file it seems like the section of code can't find the correct line to start, and/or the .raw file isn't grabbing the data fast enough or the switch is spitting
data out faster than expect can handle it. From 3 different .raw captures I'm getting 3 different results. Is there a way to synchronize so expect can grab what it needs to?<br>
<br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">.:: Running the command ::.</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"></p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<span class="highlight" id="0.7466336861738936" name="searchHitInReadingPane">rancid</span>@truck:~/bin$ hrancid -d x.y.121.146</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
executing hlogin -t 90 -c"show version;show flash;show system-information;show system information;show module;show stack;show tech transceivers;show config files;show config status;write term" x.y.121.146</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
PROMPT MATCH: HOSTNAME-121146[#>]</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show version</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowVersion: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show version</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show flash</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowFlash: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show flash</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show system-information</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowSystem: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show system-information</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show system information</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowSystem: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show system information</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show module</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowModule: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show module</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show stack</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowStack: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show stack</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show tech transceivers</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowTransceivers: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show tech transceivers</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show config files</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowConfigFiles: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show config files</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
HIT COMMAND:<span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show config status</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
In ShowConfigStatus: <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">HOSTNAME</span>-121146# show config status</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<span class="highlight" id="0.43913781835823507" name="searchHitInReadingPane">rancid</span>@truck:~/bin$ </div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
<br>
<div>Adm2201f-121146# show config status</div>
<div><br>
</div>
<div>Running configuration is same as the startup configuration.</div>
<div><br>
</div>
<div>.:: (1) ::.<br>
<div>HOSTNAME-121146# show config status</div>
<div><br>
</div>
<div>Running configuration is same as the startup configuration.</div>
<div><br>
</div>
<div><br>
</div>
<br>
</div>
<div>HOSTNAME-121146#timesync sntp </div>
<div>sntp unicast </div>
<div>logging x.y.201.199 </div>
<div>logging x.y.111.172 </div>
<div>snmp-server community "XXX" Operator </div>
<div>snmp-server community "YYY" Unrestricted </div>
<div>snmp-server host x.y.201.190 "XXX" Not-INFO </div>
<br>
.:: (2) ::.<br>
<div>HOSTNAME-121146# show config status</div>
<div><br>
</div>
<div>Running configuration is same as the startup configuration.</div>
<div><br>
</div>
<div><br>
</div>
<div>HOSTNAME-121146#sntp unicast </div>
<div>logging x.y.201.199 </div>
<div>logging x.y.111.172 </div>
<div><br>
</div>
<br>
.:: (3) ::.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<div>HOSTNAME-121146#module 6 type J8765B </div>
<div>module 7 type J8765B </div>
<div>interface A24 </div>
<div> name "To_XYZ-121142_port_A12" </div>
<div>exit</div>
<div>interface B1 </div>
<div> name "SUPERSECRET" </div>
<div>exit</div>
<div>interface B3 </div>
<div> name "SUPERSECRET" </div>
<div>exit</div>
<div>ip default-gateway x.y.0.1 </div>
<div>sntp server x.y.100.10 </div>
<div>timesync sntp </div>
<div>sntp unicast </div>
<div>logging x.y.201.199 </div>
<div>logging x.y.111.172 </div>
<div><br>
</div>
</div>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">.:: Write Term in hrancid ::.</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;"></p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
# This routine processes a "write term"</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
sub WriteTerm {</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
print STDERR " In WriteTerm: $_" if ($debug);</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
while (<INPUT>) {</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
tr/\015//d;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
if (/$prompt\s*(exit|logout)\s*$/i) {</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
$clean_run=1;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
last;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
}</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
last if(/^$prompt/);</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
return(-1) if (/command authorization failed/i);</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
# the pager can not be disabled per-session</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
s/^<-+ More -+>\s*//;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
s/^$/;/;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
# skip the crap</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
/^running configuration:/i && next;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
# filter out any RCS/CVS tags to avoid confusing local CVS storage</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
s/\$(Revision|Id):/ $1:/;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
/^; (\S+) configuration editor;/i &&</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
ProcessHistory("COMMENTS","keysort","A0",";Chassis type: $1\n") &&</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
ProcessHistory("","","",";\n;Running config file:\n$_") &&</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
next;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<br>
</div>
(... truncated to try to avoid spamming people further ...)<br>
<br>
</div>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div style="font-family:Tahoma; font-size:13px">
<div>
<div>
<p style="font-family:Tahoma; font-size:13px"></p>
<p style="font-family:Tahoma; font-size:13px"><br>
</p>
<p style="font-family:Tahoma; font-size:13px"><br>
</p>
<p>Robert Remsik</p>
<p>ACNS</p>
<p>Desk Phone: 970 491 7120</p>
<p>Robert.Remsik@colostate.edu</p>
<p style="font-family:Tahoma; font-size:13px"></p>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Doug Hughes <doug.hughes@keystonenap.com><br>
<b>Sent:</b> Tuesday, October 18, 2016 10:01 AM<br>
<b>To:</b> Remsik,Robert; rancid-discuss@shrubbery.net<br>
<b>Subject:</b> Re: [rancid] Rancid not backing up some HP switches but can login to them</font>
<div> </div>
</div>
<div>
<p>Ok, that makes sense, and I looked through the expect on the second test and it looks reasonable.</p>
<p>What happens if you do:</p>
<p><span style="font-family:Calibri,sans-serif; font-size:14.6667px"><span class="TextRun SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="NormalTextRun
SCX155634744" style="margin:0px; padding:0px; background-color:inherit"></span></span><span class="TextRun
SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="NormalTextRun SCX155634744" style="margin:0px; padding:0px; background-color:inherit"><br>
</span></span></span></p>
<br>
<from rancid home dir> <br>
bin/rancid -t hp -d -<span style="font-family:Calibri,sans-serif; font-size:14.6667px"><span class="TextRun SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="NormalTextRun SCX155634744" style="margin:0px; padding:0px; background-color:inherit">f
/opt/rancid-3.4.99/.</span></span><span class="TextRun SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="SpellingError
SCX155634744" style="margin:0px; padding:0px; border-bottom:1px solid transparent; background-color:inherit">cloginrc</span></span><span class="TextRun SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="NormalTextRun
SCX155634744" style="margin:0px; padding:0px; background-color:inherit"> </span><span class="NormalTextRun
SCX155634744" style="margin:0px; padding:0px; background-color:inherit">x.y</span><span class="NormalTextRun
SCX155634744" style="margin:0px; padding:0px; background-color:inherit">.121.146<br>
<br>
</span></span></span></div>
<div><span style="font-family:Calibri,sans-serif; font-size:14.6667px"><span class="TextRun SCX155634744" lang="EN-US" style="margin:0px; padding:0px; font-size:11pt; font-family:Calibri,sans-serif; line-height:19px"><span class="NormalTextRun
SCX155634744" style="margin:0px; padding:0px; background-color:inherit">(...
truncating rest of message due to size limitations ...)</span></span></span></div>
</div>
</div>
</body>
</html>