cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2109
Views
10
Helpful
5
Replies

Cisco APIC command equivalent to Cisco IOS `sh term | i Len`?

fc00::/7
Level 1
Level 1

In Cisco IOS, the command to view current terminal length is `s ter | i Le` or `show terminal | include Length`

Cisco_IOS#s ter | i Le
Length: 44 lines, Width: 157 columns
Cisco_IOS#

Unfortunately, there is no such command in APIC. Please let me know the equivalent command in Cisco APIC.

APIC# show terminal | include Length
Error: Invalid argument 'include Length '. Please check syntax in command reference guide
APIC#
APIC# show terminal
Error: Invalid argument 'terminal '. Please check syntax in command reference guide
APIC#
APIC# show t
tacacs-server techsupport tenant troubleshoot
APIC# 
1 Accepted Solution

Accepted Solutions

RedNectar
VIP
VIP

Hi @fc00::/7,

 

I know you asked me befoer, but didn't get a chance to look at it again until today when I observed this thread.

The command you are looking for is env (it's actually a bash command, so won't even show if you try ?)

Best used with grep or egrep and requires a bit of double interpretation

Example:

 

apic1# env | grep PAGER
_PAGER_LEN=0
apic1# term len 20
apic1# env | grep PAGER
_PAGER_LEN=20
_NO_PAGER=no
apic1# term len 0
apic1# env | grep PAGER
_PAGER_LEN=0
_NO_PAGER=yes

 

As you can see in the example, the default _PAGER_LEN is 0 - but this does not mean 0 or even infinity, it only applies AFTER you've set the pager length, in which case the _NO_PAGER environmental variable gets set to yes, and the value of the current page length can be determined.

As default, the system uses the unix utility less - as can be seen if you issue the env command from a bash prompt:

apic1# bash
admin@apic1:~> env | grep PAGER
PAGER=less
_PAGER_LEN=0
admin@apic1:~>

I hope this helps


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem


RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

View solution in original post

5 Replies 5

PatrickH1
Level 1
Level 1

Hi fc00::/7,

 

because APIC is based on Linux use "sh run | grep Le" or "sh run | egrep Le" instead of "sh run | include Le"

 

Don't forget to mark answers as correct if it solves your problem :)

Kind Regards

Patrick

Thanks Patrick but I did not see any "Length/length" word in the sh run

APIC# sh run | grep Le
        description 'Server Legacy 01'
        description 'Server Legacy 02'
        description 'Server Legacy 03'
APIC#

Hi fc00::/7,

that is correct becaus this is a APIC and "show terminal" is not available.
But what you can do is: terminal length 0 -> followed by your command

What you want to achieve with your mentioned output?

Kind Regards

Patrick

I just want to see existing terminal length on Cisco APIC. If you look at my first post, I provided an example of IOS as I would like to know the same setting on Cisco APIC. 

Length: 44 lines, Width: 157 columns

 I read about it somewhere, but I just forgot the command on APIC.

RedNectar
VIP
VIP

Hi @fc00::/7,

 

I know you asked me befoer, but didn't get a chance to look at it again until today when I observed this thread.

The command you are looking for is env (it's actually a bash command, so won't even show if you try ?)

Best used with grep or egrep and requires a bit of double interpretation

Example:

 

apic1# env | grep PAGER
_PAGER_LEN=0
apic1# term len 20
apic1# env | grep PAGER
_PAGER_LEN=20
_NO_PAGER=no
apic1# term len 0
apic1# env | grep PAGER
_PAGER_LEN=0
_NO_PAGER=yes

 

As you can see in the example, the default _PAGER_LEN is 0 - but this does not mean 0 or even infinity, it only applies AFTER you've set the pager length, in which case the _NO_PAGER environmental variable gets set to yes, and the value of the current page length can be determined.

As default, the system uses the unix utility less - as can be seen if you issue the env command from a bash prompt:

apic1# bash
admin@apic1:~> env | grep PAGER
PAGER=less
_PAGER_LEN=0
admin@apic1:~>

I hope this helps


Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem


RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Save 25% on Day-2 Operations Add-On License