[rancid] terminal width on Cisco ASA

john heasley heas at shrubbery.net
Fri Sep 9 15:53:14 UTC 2011


Fri, Sep 09, 2011 at 11:47:35AM +0200, Per-Olof Olsson:
> 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.

crons vary; you might get the device's default.

> In later versions of clogin width set to 80

i changed that to 132 for clogin [-s|-c], but this was to stop a few
show commands from oscillating, particularly show vlan.  but, i've not
seen the device wrap other lines as thread is implying for nexus and
ASA, of which I have none.  is this perhaps driven by some other variable
on these devices, such as terminal type?  ie: particular types have or
lack some capability.  500 seems like it would not be strictly portable.

> ! #         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
   ^ due to the + on the second line; i think its occuring at the device.
the truncation is odd though; i'd guess that its doing that annoying "line
shifting" (or lack of a term) that IOS does to prevent lines from wrapping.
we'd have to look at expect debug output to know if thats the case.

if term size can only be communicated via telnet/ssh/rsh, then it has to
be set on the pty.


More information about the Rancid-discuss mailing list