Customizing the show interfaces command (CLI)

You can create show commands displaying the information that you want to see in any order you want by using the custom option.

Syntax:

show interfaces custom [port-list] column-list

Select the information that you want to display. Supported columns are shown in the table below.

Table 4: Supported columns, what they display, and examples:

Parameter column

Displays

Examples

port

Port identifier

A2

type

Port type

100/1000T

status

Port status

up or down

speed

Connection speed and duplex

1000FDX

mode

Configured mode

auto, auto-100, 100FDX

mdi

MDI mode

auto, MDIX

flow

Flow control

on or off

name

Friendly port name

 

vlanid

The vlan id this port belongs to, or "tagged" if it belongs to more than one vlan

4tagged

enabled

port is or is not enabled

yes or nointrusion

intrusion

Intrusion alert status

no

bcast

Broadcast limit

0

The custom show interfaces command

switch(config)# show int custom 1-4 port name:4 type vlan intrusion speed enabled mdi

 Status and Counters - Custom Port Status

                                   Intrusion
  Port Name       Type       VLAN  Alert     Speed   Enabled MDI-mode
  ---- ---------- ---------- ----- --------- ------- ------- --------
  1    Acco       100/1000T  1     No        1000FDx Yes     Auto
  2    Huma       100/1000T  1     No        1000FDx Yes     Auto
  3    Deve       100/1000T  1     No        1000FDx Yes     Auto
  4    Lab1       100/1000T  1     No        1000FDx Yes     Auto

You can specify the column width by entering a colon after the column name, then indicating the number of characters to display. In the above example, the Name column displays only the first four characters of the name. All remaining characters are truncated.

NOTE:

Each field has a fixed minimum width to be displayed. If you specify a field width smaller than the minimum width, the information is displayed at the minimum width. For example, if the minimum width for the Name field is 4 characters and you specify Name:2, the Name field displays 4 characters.

You can enter parameters in any order. There is a limit of 80 characters per line; if you exceed this limit an error displays.