User-Defined Cli Persistent Variables - Cisco MDS 9124 - Fabric Switch Reference

Cisco mds 9000 family command reference - cisco mds san-os release 3.0(1) through 3.3(1a) (ol-16217-01, april 2008)
Hide thumbs Also See for Cisco MDS 9124 - Fabric Switch:
Table of Contents

Advertisement

Using CLI Variables
S e n d d o c u m e n t a t i o n c o m m e n t s t o m d s f e e d b a c k - d o c @ c i s c o . c o m
Use the show cli var command to display user-defined CLI session variable.
The following example displays user-defined CLI session variables.
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.29.33"
testinterface="fc 1/1"
Use the cli no var name command to remove user-defined CLI session variables.
The following example removes a user-defined CLI session variable.
switch# cli no var name testinterface

User-Defined CLI Persistent Variables

You can define CLI variables the persist across CLI sessions and switch reloads using the cli var name
command in configuration mode. These CLI variables are configured in the configuration mode and are
saved in the running configuration file.
The following example shows how to create a user-defined CLI persistent variable.
switch# config t
switch(config)# cli var name mgmtport mgmt 0
switch(config)# exit
switch#
You can reference a variable using the syntax $(variable).
The following example shows how to reference a user-defined CLI persistent variable.
switch# show interface $(mgmtport)
mgmt0 is up
Cisco MDS 9000 Family Command Reference
1-28
Port WWN is 20:01:00:0d:ec:0e:1d:00
Admin port mode is auto, trunk mode is on
snmp traps are enabled
Port mode is F, FCID is 0x01000b
Port vsan is 1
Speed is 2 Gbps
Transmit B2B Credit is 7
Receive B2B Credit is 16
Receive data field Size is 2112
Beacon is turned off
5 minutes input rate 256 bits/sec, 32 bytes/sec, 1 frames/sec
5 minutes output rate 256 bits/sec, 32 bytes/sec, 1 frames/sec
232692 frames input, 7447280 bytes
0 discards, 0 errors
0 CRC,
0 unknown class
0 too long, 0 too short
232691 frames output, 7448692 bytes
0 discards, 0 errors
0 input OLS, 0 LRR, 0 NOS, 0 loop inits
1 output OLS, 1 LRR, 0 NOS, 1 loop inits
16 receive B2B credit remaining
7 transmit B2B credit remaining
Hardware is FastEthernet
Address is 000e.38c6.2c6c
Internet address is 10.10.10.1/24
MTU 1500 bytes, BW 100 Mbps full Duplex
288996 packets input, 97746406 bytes
Chapter 1
CLI Overview
OL-16217-01, Cisco MDS SAN-OS Release 3.x

Advertisement

Table of Contents
loading

Table of Contents