5000 Series Layer 2/3 Managed Data Center Switch CLI Reference Guide
11
Executing Show Commands
Any mode (Global Config, VLAN Config, etc.) can be used to issue all show commands. These
commands are used to obtain information about the system and its feature-specific configuration, status,
and statistics.
CLI Output Filtering
In many cases, CLI show commands will cause a considerable amount of content to be displayed to the
user. Such large amounts of content can be confusing and cumbersome to parse through to locate the
desired information. However, by using the CLI Output Filtering feature, the user can, when executing CLI
show display commands, optionally specify arguments in order
to filter the CLI output so that only the
desired information is displayed. The displayed information will thus be simplified, making it easier for the
user to find the desired information.
The primary functions of the CLI Output Filtering feature are as follows:
•
Pagination Control
o
For all
show
CLI commands, supports the enabling/disabling of paginated output. When
disabled, the requested output is displayed in its entirety. When enabled, the requested
output is displayed in a page-by-page manner such that the display does not scroll
beyond the end of the screen until the user presses a key to continue. The options --
More-- or (q)uit are displayed at the end of each page.
o
If pagination is enabled, pressing the return key will advance the display by a single line,
pressing q or Q will cause the pagination to stop, and pressing any other key will advance
the display by a whole page. No other configuring of these keys is possible.
Note:
Although pagination is already supported by some D-LINK OS
show
commands, its
implementation is unique per command rather than being generic to all commands.
•
Output Filtering
o
“Grep”-like control used to modify the displayed output to show only the user-desired
content.
Filter the displayed output to include only those lines containing a specified string
match.
Filter the displayed output to omit only those lines containing a specified string
match.
Filter the displayed output to include only those lines including and following a
specified string match.
Filter the displayed output to include only a specified section of the content (e.g.,
“interface 0/1”) using a configurable end-of-section delimiter.
String matching should be case insensitive.
When enable, pagination also applies to filtered output.
Example
The following provides some examples of the extensions made to the CLI show.
show running-show config ?
<cr> Press enter to execute the command.
| Output filter options.
<scriptname> Script file name for writing active configuration.
all Show all the running configuration on the switch.
interface Display the running config for specified interface on
the switch.