[rancid] terminal width on Cisco ASA

Per-Olof Olsson peo at chalmers.se
Fri Sep 9 09:47:35 UTC 2011


Not running any ASA but IOS and nexus switches.

Have done some tests to extend width to max, by set width
it multiple times in clogin script.

Just now running clogin using width 500 (nexus max 512) or
"no wrap" for IOS switches supporting "terminal width 0".

If you not set width in scripts you will get
80 when running from cron ("default vt100") or
current window width from where you run command by hand.

In later versions of clogin width set to 80

Diff from my running version of clogin.in (rancid 2.3.6)
------------------------------------------------------
 > diff -c clogin.in.ORG clogin.in

*** clogin.in.ORG       Wed Oct  6 22:31:24 2010
--- clogin.in   Wed Jan 19 12:18:57 2011
***************
*** 622,627 ****
--- 622,629 ----
             set command "set logging session disable;$command"
         } else {
             send "terminal length 0\r"
+ # More ugly code to turn of line wrap /Peo
+ set command "terminal width 0;$command"
         }
         # match cisco config mode prompts too, such as router(config-if)#,
         # but catalyst does not change in this fashion.
***************
*** 921,927 ****
         } else {
             send "terminal length 0\r"
             expect -re $prompt  {}
!           send "terminal width 80\r"
         }
         expect -re $prompt      {}
         source $sfile
--- 923,934 ----
         } else {
             send "terminal length 0\r"
             expect -re $prompt  {}
! #         send "terminal width 80\r"
! # Set long lines for NEXUS
! # and no line wrap on IOS /Peo
!           send "set width 500\r"
!           expect -re $prompt  {}
!           send "set width 0\r"
         }
         expect -re $prompt      {}
         source $sfile
-----------------------------------

P C skrev 2011-09-08 18:26:
> How is the terminal width communicated to the Cisco security appliance
> by rancid-run when kicked off via crontab?  I am getting output in my
> alerts like this, almost like it's cutting off at ~60-70 characters or
> so.  When viewing through a shell via SSH, the output is the width of
> the window without issue and is not truncated.
>
> Is this some sort of variable I can set so the output does not get
> kicked to the next line like this?
>
> Or perhaps is this happening after the SSH session, and during the
> e-mail/CVS diff process?
>
> I have also considered terminal width xxx Cisco ASA side, but this is
> a permanent configuration command (config) mode and not a per-session
> exec command, so it's probably better just to send the right width to
> it in the first place via the SSH/terminal negotiation, however this
> may be done.
>
> + access-list myaclname extended permit ip host 10.100.100.100
> + object-group MY_OBJECT log warnings interval 10
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


/Peo
----------------------------------------------------------
Per-Olof Olsson               Email: peo at chalmers.se
Chalmers tekniska högskola    IT-service
Hörsalsvägen 5                412 96 Göteborg
Tel: 031/772 6738  Fax: 031/772 8680
----------------------------------------------------------


More information about the Rancid-discuss mailing list