[rancid] Trouble grabbing configs from a Foundry FesX

Scott Baker bakers at canbytel.com
Thu Jul 3 15:29:25 UTC 2014


On 07/02/2014 06:03 PM, heasley wrote:
> Couldn't tell you - debug it.  flogin -d ...., see where it's waiting and
> why.  I do not know of a way to include timestamps in that debugging o/p,
> so you'd have to tell us where its waiting.  or possibly good enough
>
> flogin -d ... 2>&1 | while read ln; do echo -n `date +%s`; echo " $ln"; done
>

Good call, didn't think about doing that. I ended up using ts from
moreutils to get the same effect. Looks like flogin uses
"skip-page-display" and clogin uses "terminal length 0".
Skip-page-display takes 4 seconds to run. The majority of the slowness
in flogin appears to be the actual login process. Flogin is taking 20
seconds just to get to the enable prompt. Clogin is taking one second. I
haven't even started to look at why clogin/ssh works, but flogin/ssh
doesn't, which is how this whole thing started.

rancid at green(~)
:time /usr/libexec/rancid/flogin -c "show run" foundry-needy.domain.com
2>&1 | ts              
Jul 03 08:23:11 foundry-needy.domain.com
Jul 03 08:23:11 spawn telnet foundry-needy.domain.com
Jul 03 08:23:11 Trying 10.3.1.251...
Jul 03 08:23:11 Connected to foundry-needy.domain.com.
Jul 03 08:23:11 Escape character is '^]'.
Jul 03 08:23:11
Jul 03 08:23:11 User Access Verification
Jul 03 08:23:11
Jul 03 08:23:15 Please Enter Password:
Jul 03 08:23:15
Jul 03 08:23:15 User login successful.
Jul 03 08:23:15
Jul 03 08:23:22 BR-telnet at FESX-Needy>enable
Jul 03 08:23:31 Password:
Jul 03 08:23:31 BR-telnet at FESX-Needy#
Jul 03 08:23:43 BR-telnet at FESX-Needy#skip-page-display
Jul 03 08:23:43 Disable page display mode
Jul 03 08:23:47 BR-telnet at FESX-Needy#show run
Jul 03 08:23:47 Current configuration:
Jul 03 08:23:47 !

[Snipped]

Jul 03 08:23:47 !
Jul 03 08:23:47 end
Jul 03 08:23:47
Jul 03 08:23:49 BR-telnet at FESX-Needy#exit
Jul 03 08:23:53 BR-telnet at FESX-Needy>exit
Jul 03 08:23:53 Connection closed by foreign host.

real    0m42.563s
user    0m0.048s
sys     0m0.031s

----------------------------------------------------------------------

rancid at green(~)
:time /usr/libexec/rancid/clogin -c "show run" foundry-needy.domain.com
2>&1 | ts
Jul 03 08:24:37 foundry-needy.domain.com
Jul 03 08:24:37 spawn telnet foundry-needy.domain.com
Jul 03 08:24:37 Trying 10.3.1.251...
Jul 03 08:24:37 Connected to foundry-needy.domain.com.
Jul 03 08:24:37 Escape character is '^]'.
Jul 03 08:24:37
Jul 03 08:24:37 User Access Verification
Jul 03 08:24:37
Jul 03 08:24:38 Please Enter Password:
Jul 03 08:24:38
Jul 03 08:24:38 User login successful.
Jul 03 08:24:38
Jul 03 08:24:38 BR-telnet at FESX-Needy>enable
Jul 03 08:24:38 Password:
Jul 03 08:24:38 BR-telnet at FESX-Needy#
Jul 03 08:24:38 BR-telnet at FESX-Needy#terminal length 0
Jul 03 08:24:38 Invalid input -> length 0
Jul 03 08:24:38 Type ? for a list
Jul 03 08:24:38 BR-telnet at FESX-Needy#show run
Jul 03 08:24:39 Current configuration:

[Snipped]

Jul 03 08:24:39 end
Jul 03 08:24:39
Jul 03 08:24:40 BR-telnet at FESX-Needy#exit
Jul 03 08:24:42 BR-telnet at FESX-Needy>exit
Jul 03 08:24:42 Connection closed by foreign host.

real    0m5.713s
user    0m0.061s
sys     0m0.023s

-- 
Scott Baker - Canby Telcom 
Senior System Administrator - RHCE



More information about the Rancid-discuss mailing list