System Defined Variables; Job Name - 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

Chapter 1
CLI Overview
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 persistent variable.
The following example displays user-defined CLI persistent variables.
switch# show cli variables
VSH Variable List
-----------------
TIMESTAMP="2005-10-24-21.37.13"
mgmtport="mgmt 0"
Use the no cli var name command in configuration mode to remove user-defined CLI persistent
variables.
The following example removes a user-defined CLI persistent variable.
switch# config t
switch(config)# no cli var name mgmtport

System Defined Variables

Cisco MDS SAN-OS supports one predefined variable: TIMESTAMP. This variable refers to the time of
execution of the command in the format YYYY-MM-DD-HH.MM.SS.
The TIMESTAMP variable name is case sensitive. All letters must be uppercase.
Note
The following example uses $(TIMESTAMP) when periodically gathering statistics into files using the
command scheduler.
switch# config t l
switch(config)# scheduler enable
switch(config)# scheduler logfile size 16
switch(config)# scheduler job name j1
switch(config-job)# show interface mgmt0 | include mgmt > file
switch(config-job)# copy volatile:file bootflash:file.$(TIMESTAMP)
switch(config-job)# end
switch(config)#
The following example uses $(TIMESTAMP) when redirecting show command output to a file.
switch# show running-config > rcfg.$(TIMESTAMP)
Preparing to copy....done
switch# dir volatile:
Usage for volatile://sup-local
8192 bytes used
20963328 bytes free
20971520 bytes total
OL-16217-01, Cisco MDS SAN-OS Release 3.x
0 multicast frames, 0 compressed
0 input errors, 0 frame, 0 overrun 0 fifo
9089 packets output, 1234786 bytes, 0 underruns
0 output errors, 0 collisions, 0 fifo
0 carrier errors
7231
Oct 03 20:20:42 2005
rcfg.2005-10-03-20.20.42
Cisco MDS 9000 Family Command Reference
Using CLI Variables
1-29

Advertisement

Table of Contents
loading

Table of Contents