S e n d f e e d b a c k t o n x 5 0 0 0 - d o c f e e d b a c k @ c i s c o . c o m
2-13
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 2 Using the Command-Line Interface
Command Scripts
fc2/1 is down (SFP not present)
Hardware is Fibre Channel
Port WWN is 20:01:00:05:30:00:8e:1e
Admin port mode is auto, trunk mode is on
Port vsan is 1
Receive data field Size is 2112
Beacon is turned off
5 minutes input rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
5 minutes output rate 0 bits/sec, 0 bytes/sec, 0 frames/sec
1 frames input, 128 bytes
0 discards, 0 errors
0 CRC, 0 unknown class
0 too long, 0 too short
1 frames output, 128 bytes
0 discards, 0 errors
0 input OLS, 0 LRR, 0 NOS, 0 loop inits
0 output OLS, 0 LRR, 0 NOS, 0 loop inits
0 receive B2B credit remaining
0 transmit B2B credit remaining
The following example shows how you can pass CLI session variable as arguments to a child
run-script
command process:
switch#
show file bootflash:test1.vsh
show interface $(var1) $(var2)
switch#
run bootflash:test2.vsh var1="fc2/1" var2="brief"
`show interface $(var1) $(var2)`
-------------------------------------------------------------------------------
Interface
Vsan
Admin
Admin
Status
SFP
Oper
Oper
Port
Mode
Trunk
Mode
Speed
Channel
Mode
(Gbps)
-------------------------------------------------------------------------------
fc2/1 1 auto on sfpAbsent -- -- -- \
Setting the Delay Time
The
sleep
command delays an action by a specified number of seconds.
The syntax for this command is
sleep
seconds
.
switch#
sleep 30
You will see the switch prompt return after 30 seconds. This command is useful within scripts. For
example, if you create a command script called test-script.
switch#
show file bootflash:test-script
discover scsi-target remote
sleep 10
show scsi-target disk
switch#
run-script bootflash:test-script
When you execute the test-script command script, the switch software executes the
discover scsi-target
remote
command, and then waits for 10 seconds before executing the
show scsi-target disk
command.
Summary of Contents for N5010P-N2K-BE
Page 50: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 102: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 240: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 312: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 400: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 418: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 436: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...
Page 658: ...Se n d f e e d b a ck t o n x 5 0 0 0 d o c f e e d b a ck c i s c o c o m ...