C Commands

callhome

To configure the Call Home function, use the callhome command.

callhome

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled.

Command Modes


Configuration mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

The Call Home configuration commands are available in the (config-callhome) submode.

A Call Home message is used to contact a support person or organization in case an urgent alarm is raised.

Once you have configured the contact information, you must enable the Call Home function. The enable command is required for the Call Home function to start operating. When you disable the Call Home function, all input events are ignored.


Note


Even if Call Home is disabled, basic information for each Call Home event is sent to syslog.

The user-def-cmd command allows you to define a command whose outputs should be attached to the Call Home message being sent. Only show commands can be specified and they must be associated with an alert group. Five commands can be specified per alert group. Invalid commands are rejected.


Note


Customized show commands are only supported for full text and XML alert groups. Short text alert groups (short-txt-destination) do not support customized show commands because they only allow 128 bytes of text.

To assign show commands to be executed when an alert is sent, you must associate the commands with the alert group. When an alert is sent, Call Home associates the alert group with an alert type and attaches the output of the show commands to the alert message.


Note


Make sure the destination profiles for the non-Cisco-TAC alert group, with a predefined show command, and the Cisco-TAC alert group are not the same.

The following example assigns contact information:


switch# config terminal
config terminal
switch# snmp-server contact personname@companyname.com 
switch(config)# callhome
switch(config-callhome)# email-contact username@company.com
switch(config-callhome)# phone-contact +1-800-123-4567
switch(config-callhome)# streetaddress 1234 Picaboo Street, Any city, Any state, 12345
switch(config-callhome)# switch-priority 0
switch(config-callhome)# customer-id Customer1234 
switch(config-callhome)# site-id Site1ManhattanNY
switch(config-callhome)# contract-id Company1234 

The following example configures a user-defined show command for an alert-group license:


switch(config-callhome)# alert-group license user-def-cmd "show license usage"

Note


The show command must be enclosed in double quotes.

The following example removes a user-defined show command for an alert-group license:


switch(config-callhome)# no alert-group license user-def-cmd "show license usage"

callhome mft-put

To copy the file from the bootflash directory to a secure remote support service, use the callhome mft-put command.

callhome mft-put filename

Syntax Description

filename

The name of the file to be transferred to a secure remote support service.

Command Default

None

Command Modes


User EXEC (#)
Privileged EXEC (#)

Command History

Release

Modification

NX-OS 7.3(1)DY(1)

This command was introduced.

Usage Guidelines

The callhome mft-put command is used to transfer files such as syslogs, output of the show tech-support command, and so on, to a secure remote support service.

Examples

The following example shows how to copy a file bootflash to a secure remote support service:


switch# callhome mft-put zone_sdb.log
Trying to copy file using mft-put to remote location
Successfully sent file using mft-put

 

callhome test

To simulate a Call Home message generation, use the callhome test command.

callhome test [inventory]

Syntax Description

inventory

(Optional) Sends a dummy Call Home inventory.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

You can simulate a message generation by entering a callhome test command.

Examples

The following example sends a test message to the configured destinations:


switch# callhome test
trying to send test callhome message
successfully sent test callhome message

The following example sends a test inventory message to the configured destinations:


switch# callhome test inventory
trying to send test callhome message
successfully sent test callhome message

callhome test-keepalive

To check for the connectivity between Call Home and a secure remote support service, use the callhome test-keepalive command.

callhome test-keepalive

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


User EXEC (#)
Privileged EXEC (#)

Command History

Release

Modification

NX-OS 7.3(1)DY(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to initiate a keepalive message communication with a secure remote support service:


switch# callhome test-keepalive
Initiating callhome test-keepalive

cd

To change the default directory or file system, use the cd command.

cd {directory | bootflash : [directory] | slot0 : [directory] | volatile : [directory]}

Syntax Description

directory

(Optional) Name of the directory on the file system.

bootflash:

URI or alias of the bootflash or file system.

slot0:

URI or alias of the slot0 file system.

volatile:

URI or alias of the volatile file system.

Command Default

The initial default file system is flash:. For platforms that do not have a physical device named flash:, the keyword flash: is aliased to the default flash device.

If you do not specify a directory on a file system, the default is the root directory on that file system.

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

For all EXEC commands that have an optional file system argument, the system uses the file system specified by the cd command when you omit the optional file system argument. For example, the dir command, which displays a list of files on a file system, contains an optional file system argument. When you omit this argument, the system lists the files on the file system specified by the cd command.

Examples

The following example sets the default file system to the flash memory card inserted in slot 0:


switch# pwd
 
bootflash:/
switch# cd slot0:
 
switch# pwd 
slot0:/

cdp

To globally configure the Cisco Discovery Protocol parameters, use the cdp command. Use the no form of this command to revert to factory defaults.

cdp { enable | advertise { v1 | v2 } | holdtime holdtime-seconds | timer timer-seconds }

no cdp { enable | advertise | holdtime holdtime-seconds | timer timer-seconds }

Syntax Description

enable

Enables CDP globally on all interfaces on the switch.

advertise

Specifies the EXEC command to be executed.

v1

Specifies CDP version 1.

v2

Specifies CDP version 2.

holdtime

Sets the hold time advertised in CDP packets.

holdtime-seconds

The holdtime in seconds. The default is 180 seconds and the valid range is from 10 to 255 seconds.

timer

Sets the refresh time interval.

timer-seconds

The time interval in seconds. The default is 60 seconds and the valid range is from 5 to 255 seconds.

Command Default

CDP is enabled.

The hold time default interval is 180 seconds.

The refresh time interval is 60 seconds.

Command Modes


Configuration mode

Command History

Release

Modification

1.1(1)

This command was introduced.

Usage Guidelines

Use the cdp enable command to enable the Cisco Discovery Protocol (CDP) feature at the switch level or at the interface level. Use the no form of this command to disable this feature. When the interface link is established, CDP is enabled by default

CDP version 1 (v1) and version 2 (v2) are supported in Cisco MDS 9000 Family switches. CDP packets with any other version number are silently discarded when received.

Examples

The following example disables the CDP protocol on the switch. When CDP is disabled on an interface, one packet is sent to clear out the switch state with each of the receiving devices:


switch(config)# 
no cdp enable
Operation in progress. Please check global parameters
switch(config-console)# 	

The following example enables (default) the CDP protocol on the switch. When CDP is enabled on an interface, one packet is sent immediately. Subsequent packets are sent at the configured refresh time.


switch(config)# cdp enable
Operation in progress. Please check global parameters
switch(config)# 

The following example configures the Gigabit Ethernet interface 8/8 and disables the CDP protocol on this interface. When CDP is disabled on an interface, one packet is sent to clear out the switch state with each of the receiving devices.


switch(config)# 
interface gigbitethernet 8/8
switch(config-if)# 
no cdp enable
Operation in progress. Please check interface parameters
switch(config-console)# 	

The following example enables (default) the CDP protocol on the selected interface. When CDP is enabled on this interface, one packet is sent immediately. Subsequent packets are sent at the configured refresh time.


switch(config-if)# 
cdp enable
Operation in progress. Please check interface parameters
switch(config)# 

The following example globally configures the refresh time interval for the CDP protocol in seconds. The default is 60 seconds and the valid range is from 5 to 255 seconds.


switch# 
config terminal
switch(config)# 
cdp timer 100
switch(config)# 	

The following example globally configures the hold time advertised in CDP packet in seconds. The default is 180 seconds and the valid range is from 10 to 255 seconds.


switch# 
config terminal
switch(config)# 
cdp holdtime 200
switch(config)# 	

The following example globally configures the CDP version. The default is version 2 (v2). The valid options are v1 and v2.


switch# config terminal
switch(config)# cdp advertise v1
switch(config)# 

cfs distribute

To enable or disable Cisco Fabric Services (CFS) distribution on the switch, use the cfs distribute command in configuration mode. To disable this feature, use the no form of the command.

cfs distribute

no cfs distribute

Syntax Description

This command has no other arguments or keywords.

Command Default

CFS distribution is enabled.

Command Modes


Configuration mode

Command History

Release

Modification

2.1(1a)

This command was introduced.

Usage Guidelines

By default CFS is in the distribute mode. In the distribute mode, fabric wide distribution is enabled. Applications can distribute data/configuration to all CFS-capable switches in the fabric where the application exists. This is the normal mode of operation.

If CFS distribution is disabled, using the no cfs distribute command causes the following to occur:

  • CFS and the applications using CFS on the switch are isolated from the rest of the fabric even though there is physical connectivity.
  • All CFS operations are restricted to the isolated switch.
  • All the CFS commands continue to work similar to the case of a physically isolated switch.
  • Other CFS operations (for example, lock, commit, and abort) initiated at other switches do not have any effect at the isolated switch.
  • CFS distribution is disabled over both Fibre Channel and IP.

Examples

The following example shows how to disable CFS distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# no cfs distribute

The following example shows how to reenable CFS distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cfs distribute

cfs ipv4 distribute

To enable Cisco Fabric Services (CFS) distribution over IPv4 for applications that want to use this feature, use the cfs ipv4 distribute command in configuration mode. To disable this feature, use the no form of the command.

cfs ipv4 distribute

no cfs ipv4 distribute

Syntax Description

This command has no arguments or keywords.

Command Default

CFS distribution is enabled.

CFS over IP is disabled.

Command Modes


Configuration mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

All CFS over IP enabled switches with similar multicast addresses form one CFS over IP fabric. CFS protocol specific distributions, such as the keep-alive mechanism for detecting network topology changes, use the IP multicast address to send and receive information.

Observe the following guidelines when using this command:

  • If a switch is reachable over both IP and Fibre Channel, application data will be distributed over Fibre Channel.
  • You can select either an IPv4 or IPv6 distribution when CFS is enabled over IP.
  • Both IPv4 and IPv6 distribution cannot be enabled on the same switch.
  • A switch that operate IPv4 distribution enabled cannot detect a switch that IPv6 distribution enabled. The switches behave as if they are in two different fabrics even though they are connected to each other.

Examples

The following example shows how to disable CFS IPv4 distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# no cfs ipv4 distribute
This will prevent CFS from distributing over IPv4 network.
Are you sure? (y/n)  [n] 

The following example shows how to reenable CFS IPv4 distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cfs ipv4 distribute

cfs ipv4 mcast-address

To configure an IPv4 multicast address for Cisco Fabric Services (CFS) distribution over IPv4, use the cfs ipv4 mcast-address command in configuration mode. To disable this feature, use the no form of the command.

cfs ipv4 mcast-address ipv4-address

no cfs ipv4 mcast-address ipv4-address

Syntax Description

ipv4-address

Specifies an IPv4 multicast address for CFS distribution over IPv4. The range of valid IPv4 addresses is 239.255.0.0 through 239.255.255.255, and 239.192.0.0 through 239.251.251.251.

Command Default

Multicast address: 239.255.70.83.

Command Modes


Configuration mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

Before using this command, enable CFS distribution over IPv4 using the cfs ipv4 distribute command.

All CFS over IP enabled switches with similar multicast addresses form one CFS over IP fabric. CFS protocol specific distributions, such as the keepalive mechanism for detecting network topology changes, use the IP multicast address to send and receive information.


Note


CFS distributions for application data use directed unicast.

You can configure a value for a CFS over IP multicast address. The default IPv4 multicast address is 239.255.70.83.

Examples

The following example shows how to configure an IP multicast address for CFS over IPv4:


switch# config t
switch(config)# cfs ipv4 mcast-address 239.255.1.1
Distribution over this IP type will be affected
Change multicast address for CFS-IP ?
Are you sure? (y/n) [n] y

The following example shows how to revert to the default IPv4 multicast address for CFS distribution over IPv4. The default IPv4 multicast address for CFS is 239.255.70.83:


switch(config)# no cfs ipv4 mcast-address 10.1.10.100
Distribution over this IP type will be affected
Change multicast address for CFS-IP ?
Are you sure? (y/n) [n] y

cfs ipv6 distribute

To enable Cisco Fabric Services (CFS) distribution over IPv6 for applications that want to use this feature, use the cfs ipv6 distribute command in configuration mode. To disable this feature, use the no form of the command.

cfs ipv6 distribute

no cfs ipv6 distribute

Syntax Description

This command has no arguments or keywords.

Command Default

CFS distribution is enabled.

CFS over IP is disabled.

Command Modes


Configuration mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

All CFS over IP enabled switches with similar multicast addresses form one CFS over IP fabric. CFS protocol specific distributions, such as the keepalive mechanism for detecting network topology changes, use the IP multicast address to send and receive information.

Observe the following guidelines when using this command:

  • If a switch is reachable over both IP and Fibre Channel, application data will be distributed over Fibre Channel.
  • You can select either an IPv4 or IPv6 distribution when CFS is enabled over IP.
  • Both IPv4 and IPv6 distribution cannot be enabled on the same switch.
  • A switch that operate IPv4 distribution enabled cannot detect a switch that IPv6 distribution enabled. The switches behave as if they are in two different fabrics even though they are connected to each other.

Examples

The following example shows how to disable CFS IPv6 distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# no cfs ipv6 distribute
This will prevent CFS from distributing over IPv6 network.
Are you sure? (y/n)  [n] 

The following example shows how to reenable CFS IPv6 distribution:


switch# config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cfs ipv6 distribute

cfs ipv6 mcast-address

To configure an IPv6 multicast address for Cisco Fabric Services (CFS) distribution over IPv6, use the cfs ipv6 mcast-address command in configuration mode. To disable this feature, use the no form of the command.

cfs ipv6 mcast-address ipv6-address

no cfs ipv6 mcast-address ipv6-address

Syntax Description

ipv6-address

An IPv6 multicast address or CFS distribution over IPv6. The IPv6 Admin scope range is [ff15::/16, ff18::/16].

Command Default

Multicast address: ff15::efff:4653.

Command Modes


Configuration mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

Before using this command, enable CFS distribution over IPv6 using the cfs ipv6 distribute command.

All CFS over IP enabled switches with similar multicast addresses form one CFS over IP fabric. CFS protocol specific distributions, such as the keepalive mechanism for detecting network topology changes, use the IP multicast address to send and receive information.


Note


CFS distributions for application data use directed unicast.

You can configure a CFS over IP multicast address value for IPv6. The default IPv6 multicast address is ff15::efff:4653. Examples of the IPv6 Admin scope range are ff15::0000:0000 to ff15::ffff:ffff and ff18::0000:0000 to ff18::ffff:ffff.

Examples

The following example shows how to configure an IP multicast address for CFS over IPv6:


switch# config t
switch(config)# cfs ipv6 mcast-address 
ff13::e244:4754
Distribution over this IP type will be affected
Change multicast address for CFS-IP ?
Are you sure? (y/n) [n] y

The following example shows how to revert to the default IPv6 multicast address for CFS distribution over IPv6. The default IPv6 multicast address for CFS is ff13:7743:4653.


switch(config)# no cfs ipv6 
ff13::e244:4754
Distribution over this IP type will be affected
Change multicast address for CFS-IP ?
Are you sure? (y/n) [n] y

cfs region

To create a region that restricts the scope of application distribution to the selected switches, use the cfs region command in the configuration mode. To disable this feature, use the no form of this command.

cfs region region-id

no cfs region region-id

Syntax Description

region-id

Assigns an application to a region. A total of 200 regions are supported.

Command Default

None.

Configuration mode

Command History

Release

Modification

3.2(1)

This command was introduced.

Usage Guidelines

An application can only be a part of one region on a given switch. By creating the region ID and assigning it to an application, the application distribution is restricted to switches with a similar region ID.

Cisco Fabric Services (CFS) regions provide the ability to create distribution islands within the application scope. Currently, the regions are supported only for physical scope applications. In the absence of any region configuration, the application will be a part of the default region. The default region is region ID 0. This command provides backward compatibility with the earlier release where regions were not supported. If applications are assigned to a region, the configuration check will prevent the downgrade. Fabric Manager supports CFS regions.

Examples

The following example shows how to create a region ID:


switch# config
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# cfs region 1

The following example shows how to assign an application to a region:


switch# cfs region 1
switch# config
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cfs region 1
switch(config-cfs-region)# ntp

Note


The applications assigned to a region have to be registered with CFS.

The following example shows how to remove an application assigned to a region:


switch# cfs region 1
switch# config
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cfs region 1
switch(config-cfs-region)# no ntp

The following example shows how to remove all the applications from a region:


switch(config)# no cfs region 1
WARNING: All applications in the region wiil be  moved to default region.
Are you sure? (y/n)  [n] y

cfs static-peers

To enable static peers interface, use the cfs static-peers command. To disable this feature, use the no form of the command.

cfs static-peers

no cfs static-peers

Syntax Description

This command has no arguments or keywords.

Command Default

Enabled.

Command Modes


Configuration mode

Command History

Release

Modification

4.1(1b)

This command was introduced.

Usage Guidelines

This command enables the static peers with status and all the peers in the physical fabric.


Note


The no cfs static-peers displays a warning string, and changes the entire fabric from static to dynamic.

Examples

The following example shows how to enable static peers interface:


Switch(config)# cfs static-peers
Warning: This mode will stop dynamic discovery and relay only on these peers.
Do you want to continue?(y/n) [n] y
Switch(config-cfs-static)#ip address 209.165.200.226
Switch(config-cfs-static)#ip address 209.165.200.227
Switch(config-cfs-static)#exit
Switch(config)#

channel mode active

To enable channel mode on a PortChannel interface, use the channel mode active command. To disable this feature, use the no form of the command.

channel mode active

no channel mode

Syntax Description

This command has no other arguments or keywords.

Command Default

Enabled.

Command Modes


Interface configuration submode.

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

This command determines the protocol operate for all the member ports in the channel group associated with the port channel interface.

Examples

The following example shows how to disable channel mode on a PortChannel interface:


switch# config terminal
switch(config)# interface port-channel 10
switch(config-if)# no channel mode active

channel-group

To add a port to a PortChannel group, use the channel-group command. To remove a port, use the no form of the command.

channel-group port-channel number force

no channel-group port-channel number force

Syntax Description

port-channel number

The PortChannel number. The range is 1 to 256.

force

Specifies the PortChannel to add a port, without compatibility check of port parameters, port mode and port speed.

Command Default

None

Command Modes


Interface configuration mode

Command History

Release

Modification

NX-OS 4.1(3)

Deleted auto keyword from the syntax description.

3.0(1)

This command was introduced.

Usage Guidelines

When ports are added to a PortChannel, manager checks for incompatibility in the port mode and port speed. If the ports are being added to the PortChannel, do not have compatible parameters, the ports will not be added to the PortChannel. The force option bypasses, the port parameter compatibility check, and adds the port to a PortChannel. It also forces the individual member interfaces to inherit the port parameters configured on the PortChannel itself. If you configure switchport speed 4000 on the PortChannel then the member inerface is forced to that setting.

force option is used to override the port's parameters. The auto mode support is not available after Release 4.x. To convert auto PortChannel to active mode PortChannel, use the port-channel persistent command. This command needs to be run on both sides of the auto Port Channel.

Examples

The following example shows how to add a port to the PortChannel:


switch# config terminal
switch(config)# interface fc 1/1
switch(config-if)# channel-group 2 force
fc1/1 added to port-channel 2 and disabled
please do the same operation on the switch at the other end of the port-channel,
then do "no shutdown" at both end to bring them up
switch(config-if)# 

cimserver

To configure the Common Information Models (CIM) parameters, use the cimserver command. Use the no form of this command to revert to factory defaults.

cimserver {certificate {bootflash: filename | slot0 : filename | volatile: filename} | clearcertificate filename | enable | enablehttp | enablehttps}

no cimserver {certificate {bootflash : filename | slot0 : filename | volatile : filename} | clearcertificate filename | enable | enablehttp | enablehttps}

Syntax Description

certificate

Installs the Secure Socket Layer (SSL) certificate

bootflash:

Specifies the location for internal bootflash memory.

filename

The name of the license file with a .pem extension.

slot0: filename

Specifies the location for the CompactFlash memory or PCMCIA card.

volatile: filename

Specifies the location for the volatile file system.

clearcertificate filename

Clears a previously installed SSL certificate.

enable

Enables and starts the CIM server.

enablehttp

Enables the HTTP (non-secure) protocol for the CIM server (default).

enablehttps

Enables the HTTPS (secure) protocol for the CIM server.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

1.3(1)

This command was introduced.

5.2(1)

This command was deprecated.

Usage Guidelines

A CIM client is required to access the CIM server. The client can be any client that supports CIM.

Examples

The following example installs a Secure Socket Layer (SSL) certificate specified in the file named with a .pem extension:


switch# 
config terminal
switch(config)# cimserver certificateName bootflash:simserver.pem

The following example clears the specified SSL certificate:


switch(config)#
 
cimserver clearCertificateName bootflash:simserver.pem

cimserver clearcertificate

To clear the cimserver certificate, use the cimsever clearcertificate command in configuration mode.

cimserver clearcertificate

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

5.2(1)

This command was deprecated.

Usage Guidelines

You need not specify the certificate name.

Examples

The following example shows how to clear the cimserver certificate:


switch# config
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cimserver clearcertificate

cimserver loglevel

To configure the cimserver log level filter, use the cimsever loglevel command in configuration mode.

cimserver loglevel filter value

Syntax Description

filter value

1–Specifies the cimserver log filter levels. The range is 1 to 5.

2–Sets the current value for the log level property to trace.

3–Sets the current value for the log level property to information.

4–Sets the current value for the log level property to warning.

5–Sets the current value for the log level property to severe.

6–Sets the current value for the log level property to fatal.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

5.2(1)

This command was deprecated.

Usage Guidelines

None

Examples

The following example displays the cimserver log level:


switch# config
Enter configuration commands, one per line.  End with CNTL/Z.
switch(config)# cimserver loglevel 2
Current value for the property logLevel is set to "INFORMATION" in CIMServer.

class

To select a QoS policy map class for configuration, use the class command in QoS policy map configuration submode. To disable this feature, use the no form of the command.

class class-map-name

no class class-map-name

Syntax Description

class-map-name

The QoS policy class map to configure.

Command Default

Disabled

Command Modes


QoS policy map configuration submode

Command History

Release

Modification

1.3(1)

This command was introduced.

Usage Guidelines

Before you can configure a QoS policy map class you must complete the following:

  • Enable the QoS data traffic feature using the qos enable command.
  • Configure a QoS class map using the qos class-map command.
  • Configure a QoS policy map using the qos policy-map command.

After you configure the QoS policy map class, you can configure the Differentiated Services Code Point (DSCP) and priority for frames matching this class map.

Examples

The following example shows how to select a QoS policy map class to configure:


switch# config terminal 
switch(config)# qos enable 
switch(config)# qos class-map class-map1
switch(config)# qos policy-map policyMap1
switch(config-pmap)# class class-map1

clear accounting log

To clear the accounting log, use the clear accounting log command.

clear accounting log

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears the accounting log:


switch# clear accounting session

clear arp-cache

To clear the ARP cache table entries, use the clear arp-cache command in EXEC mode.

clear arp-cache

Syntax Description

This command has no arguments or keywords.

Command Default

The ARP table is empty by default.

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Examples

The following example shows how to clear the arp-cache table entries:


switch# clear arp-cache

clear asic-cnt

To clear ASCI counters, use the clear asic-cnt command in EXEC mode.

clear asic-cnt {all | device-id | list-all-devices}

Syntax Description

all

Clears the counter for all device types.

device-id

Clears the counter for device type device ID.

list-all-devices

Lists all device types.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

NX-OS 4.1(3)

This command was introduced.

Examples

The following example shows how to clear all counters on the module:


switch(config)# attach module 4
Attaching to module 4 ...
To exit type 'exit', to abort type '$.'
Last login: Mon Jan  5 13:04:02 2009 from 127.1.1.8 on pts/0
Linux lc04 2.6.10_mvl401-pc_target #1 Tue Dec 16 22:58:32 PST 2008 ppc GNU/Linux
module-4# clear asic-cnt all
Cleared counters for asic type id = 63, name = 'Stratosphere'
Cleared counters for asic type id = 46, name = 'transceiver'
Cleared counters for asic type id = 57, name = 'Skyline-asic'
Cleared counters for asic type id = 60, name = 'Skyline-ni'
Cleared counters for asic type id = 59, name = 'Skyline-xbar'
Cleared counters for asic type id = 58, name = 'Skyline-fwd'
Cleared counters for asic type id = 52, name = 'Tuscany-asic'
Cleared counters for asic type id = 54, name = 'Tuscany-xbar'
Cleared counters for asic type id = 55, name = 'Tuscany-que'
Cleared counters for asic type id = 53, name = 'Tuscany-fwd'
Cleared counters for asic type id = 73, name = 'Fwd-spi-group'
Cleared counters for asic type id = 74, name = 'Fwd-parser'
Cleared counters for asic type id = 10, name = 'eobc'
Cleared counters for asic type id = 1, name = 'X-Bus IO'
Cleared counters for asic type id = 25, name = 'Power Mngmnt Epld'
module-4#

The following example shows how to clear the specific counter:


module-4# clear asic-cnt device-id 1
Clearing counters for devId = 1, name = 'X-Bus IO'
module-4#

The following example shows how to list all device IDs:


module-4# clear asic-cnt list-all-devices
           Asic Name  |        Device ID
        Stratosphere  |               63
         transceiver  |               46
        Skyline-asic  |               57
          Skyline-ni  |               60
        Skyline-xbar  |               59
         Skyline-fwd  |               58
        Tuscany-asic  |               52
        Tuscany-xbar  |               54
         Tuscany-que  |               55
         Tuscany-fwd  |               53
       Fwd-spi-group  |               73
          Fwd-parser  |               74
                eobc  |               10
            X-Bus IO  |                1
   Power Mngmnt Epld  |               25
module-4#

clear callhome session

To clear Call Home Cisco Fabric Services (CFS) session configuration and locks, use the clear callhome session command.

clear callhome session

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the Call Home session configuration and locks:


switch# clear callhome session

clear cdp

To delete global or interface-specific CDP configurations, use the clear cdp command.

clear cdp {counters | table} [interface {gigabitethernet slot/port | mgmt 0}]

Syntax Description

counters

Enables CDP on globally or on a per-interface basis.

table

Specifies the EXEC command to be executed.

interface

(Optional) Displays CDP parameters for an interface.

gigabitethernet

Specifies the Gigabit Ethernet interface.

slot / port

Specifies the slot number and port number separated by a slash (/ ).

mgmt 0

Specifies the Ethernet management interface.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

1.1(1)

This command was introduced.

Usage Guidelines

You can use this command for a specified interface or for all interfaces (management and Gigabit Ethernet interfaces).

Examples

The following example clears CDP traffic counters for all interfaces:


switch# clear cdp counters
switch#

The following example clears CDP entries for the specified Gigabit Ethernet interface:


switch# clear cdp table interface gigabitethernet 4/1
switch#

clear cores

To clear all core dumps for the switch, use the clear cores command in EXEC mode.

clear cores

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

The system software keeps the last few cores per service and per slot and clears all other cores present on the active supervisor module.

Examples

The following example shows how to clear all core dumps for the switch:


switch# clear cores

clear counters (EXEC mode)

To clear the interface counters, use the clear counters command in EXEC mode.

clear counters {all | interface {fc | mgmt | port-channel | sup-fc | vsan} number}

Syntax Description

all

Clears all interface counters.

interface

Clears interface counters for the specified interface.

number

The number of the slot or interface being cleared.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

The following table lists the number ranges interface types:

Keyword

Interface Type

Number

fc

Fibre Channel

1– 2 or 1– 9 (slot)

gigabitethernet

Gigabit Ethernet

1– 2 or 1– 9 (slot)

mgmt

Management

0–0 (management interface)

port-channel

PortChannel

1–128 (PortChannel)

sup-fc

Inband

0–0 (Inband interface)

vsan

VSAN

1– 4093 (VSAN ID)

This command clears counters displayed in the show interface command output.

Examples

The following example shows how to clear counters for a VSAN interface:


switch# clear counters interface vsan 13

clear counters (SAN extension N port configuration mode)

To clear SAN extension tuner N port counters, use the clear counters command.

clear counters

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


SAN extension N port configuration submode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear SAN extension tuner N port counters:


switch# san-ext-tuner
switch(san-ext)# nWWN 10:00:00:00:00:00:00:00
switch(san-ext)# nport pwwn 12:00:00:00:00:00:00:56 vsan 13 interface gigabitethernet 1/2
switch(san-ext-nport)# clear counters

clear counters interface

To clear the aggregate counters for the interface, use the clear counters interface command.

clear counters interface interface snmp

Syntax Description

interface

Specifies the interface.

snmp

Clears SNMP interface counters.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

6.2(1)

Added the snmp option to the syntax description.

Usage Guidelines

This command clears counter displayed in the show interface command output.

Examples

The following example shows how to clear the aggregate counters for the interface:


switch(config)# clear counters interface e2/1 snmp
switch(config)#

clear counters interface all

To clear all interface counters, use the clear counters interface all command.

clear counters interface all snmp

Syntax Description

snmp

Clears SNMP interface counters.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

6.2(1)

Added the snmp option to the syntax description.

Usage Guidelines

This command clears counter displayed in the show interface command output.

Examples

The following example shows how to clear all SNMP interface counters:


switch(config)# clear counters interface all snmp
switch(config)#

clear crypto ike domain ipsec sa

To clear the IKE tunnels for IPsec, use the clear crypto ike domain ipsec sa command.

clear crypto ike domain ipsec sa [tunnel-id]

Syntax Description

tunnel-id

(Optional) The tunnel ID. The range is 1 to 2147483647.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

To use this command, the IKE protocol must be enabled using the crypto ike enable command.

If the tunnel ID is not specified, all IKE tunnels are cleared.


Note


The crypto ikes feature is not supported on the Cisco MDS 9148 and Cisco MDS 9148S, and Cisco MDS 9396S Switches.

Examples

The following example shows how to clear all IKE tunnels:


switch# clear crypto ike domain ipsec sa

clear crypto sa domain ipsec

To clear the security associations for IPsec, use the clear crypto sa domain ipsec command.

clear crypto sa domain ipsec interface gigabitethernet slot / port {inbound | outbound} sa sa-index

Syntax Description

interface gigabitethernet slot /port

Specifies the Gigabit Ethernet interface.

inbound

Specifies clearing inbound associations.

outbound

Specifies clearing output associations.

sa sa-index

Specifies the security association index. The range is 1 to 2147483647.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

To clear security associations, IPsec must be enabled using the crypto ipsec enable command. After clearing the security associations for IPsec, ensure that you wait for at least 10 seconds before you run the system switchover command.

Examples

The following example shows how to clear a security association for an interface:


switch# clear crypto sa domain ipsec interface gigabitethernet 1/2 inbound sa 1

clear debug-logfile

To delete the debug log file, use the clear debug-logfile command in EXEC mode.

clear debug-logfile filename

Syntax Description

filename

The name (restricted to 80 characters) of the log file to be cleared. The maximum size of the log file is 1024 bytes.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Examples

The following example shows how to clear the debug logfile:


switch# clear debug-logfile debuglog

clear device-alias

To clear device alias information, use the clear device-alias command.

clear device-alias {database | session | statistics}

Syntax Description

database

Clears the device alias database.

session

Clears session information.

statistics

Clears device alias statistics.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear the device alias session:


switch# clear device-alias session

clear dpvm

To clear Dynamic Port VSAN Membership (DPVM) information, use the clear dpvm command.

clear dpvm {auto-learn [pwwn pwwn-id] | session}

Syntax Description

auto-learn

Clears automatically learned (autolearn) DPVM entries.

pwwn pwwn-id

(Optional) Specifies the pWWN ID. The format is hh : hh : hh : hh : hh : hh : hh : hh , where h is a hexadecimal number.

session

Clears the DPVM session and locks.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

To use this command, DVPM must be enabled using the dpvm enable command.

Examples

The following example shows how to clear a single autolearned entry:


switch# clear dpvm auto-learn pwwn 21:00:00:20:37:9c:48:e5

The following example shows how to clear all autolearn entries:


switch# clear dpvm auto-learn

The following example shows how to clear a session:


switch# clear dpvm session

clear dpvm merge statistics

To clear the DPVM merge statistics, use the clear dpvm merge statistics command.

clear dpvm merge statistics

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

NX-OS 4.1(1b)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear the DPVM merge statistics:


switch#(config)# clear dpvm merge statistics
switch#(config)#

clear fabric-binding statistics

To clear fabric binding statistics in a FICON enabled VSAN, use the clear fabric-binding statistics command in EXEC mode.

clear fabric-binding statistics vsan vsan-id

Syntax Description

vsan vsan-id

Specifies the FICON-enabled VSAN. The ID of the VSAN is from 1 to 4093.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.1(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears existing fabric binding statistics in VSAN 1:


switch# clear
 fabric-binding statistics vsan 1

clear fcanalyzer

To clear the entire list of configured hosts for remote capture, use the clear fcanalyzer command in EXEC mode.

clear fcanalyzer

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

This command clears only the list of configured hosts. Existing connections are not terminated.

Examples

The following example shows how to clear the entire list of configured hosts for remote capture:


switch# clear fcanalyzer

clear fcflow stats

To clear Fibre Channel flow statistics, use the clear fcflow stats command in EXEC mode.

clear fcflow stats [aggregated] module module-number index flow-number

Syntax Description

aggregated

(Optional) Clears the Fibre Channel flow aggregated statistics.

module

Clears the statistics for a specified module.

module-number

Specifies the module number.

index

Clears the Fibre Channel flow counters for a specified flow index.

flow-number

Specifies the flow index number.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.0(2)

This command was introduced.

Examples

The following example shows how to clear aggregated Fibre Channel flow statistics for flow index 1 of module 2:


switch(config)# clear fcflow stats aggregated module 2 index 1

clear fcns statistics

To clear the name server statistics, use the clear fcns statistics command in EXEC mode.

clear fcns statistics vsan vsan-id

Syntax Description

vsan vsan-id

Clears FCS statistics for a specified VSAN ranging from 1 to 4093.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.0(3)

This command was introduced.

Examples

The following example shows how to clear the name server statistics:


switch# show fcns statistics
Name server statistics for vsan 1
===================================
registration requests received = 0
deregistration requests received = 0
queries received = 23
queries sent = 27
reject responses sent = 23
RSCNs received = 0
RSCNs sent = 0
switch# clear fcns statistics vsan 1
switch# show fcns statistics
Name server statistics for vsan 1
===================================
registration requests received = 0
deregistration requests received = 0
queries received = 0
queries sent = 0
reject responses sent = 0
RSCNs received = 0
RSCNs sent = 0
switch#

clear fc-redirect config

To delete a FC-Redirect configuration on a switch, use the clear fc-redirect config command.

clear fc-redirect config vt vt-pwwn [local-switch-only]

Syntax Description

vt vt-pwwn

Specify the VT pWWN for the configuration to be deleted.

local-switch-only

(Optional) The configuration is deleted locally only.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.2(1)

This command was introduced.

Usage Guidelines

This command is used as a last option if deleting the configuration through the application is not possible.

This command will delete any configuration (including active configurations) on FC-Redirect created by applications such as SME/DMM that may lead to data loss. When you enter this command, the host server communicates to the storage array directly by passing the individual Intelligent Service Applications causing data corruption. Use this command as a last option to clear any leftover configuration that cannot be deleted from the application (DMM/SME). Use this command while decommissioning the switch.

Examples

The following example clears the FC-Redirect configuration on the switch:


switch# clear fc-redirect config vt 2f:ea:00:05:30:00:71:64 
Deleting a configuration MAY result in DATA CORRUPTION.
Do you want to continue? (y/n) [n] y

clear fc-redirect decommission-switch

To remove all existing FC-Redirect configurations and disable any further FC-Redirect configurations on a switch, use the clear fc-redirect decommission-switch command.

clear fc-redirect decommission-switch

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.2(1)

This command was introduced.

Usage Guidelines

This command is used after write erase. The command is also used to move a switch from a fabric with FC-Redirect configurations to another fabric. After using this command, disconnect the switch from the fabric and reboot the switch before using it in another fabric.

Examples

The following example shows how to decommission FC-Redirect on a switch:


switch# clear fc-redirect decommission-switch
This Command removes any FC-Redirect configuration and disables
FC-Redirect on this switch. Its usage is generally recommended in
the following cases:
   1) After 'write erase' 
   2) When removing the switch from the fabric.
If NOT for the above, Decommissioning a switch MAY result in
DATA CORRUPTION.
 
Do you want to continue? (Yes/No) [No] Yes
 
Please check the following before proceeding further:
   1) Hosts / targets connected locally are NOT involved in any
      FC-Redirect configuration.
   2) No application running on this switch created an FC-Redirect
      Configuration
   Please use the command 'show fc-redirect active-configs' to check
   these.
 
Do you want to continue? (Yes/No) [No] Yes
switch#

clear fcs statistics

To clear the fabric configuration server statistics, use the clear fcs statistics command in EXEC mode.

clear fcs statistics vsan vsan-id

Syntax Description

vsan vsan-id

FCS statistics are to be cleared for a specified VSAN ranging from 1 to 4093.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Examples

The following example shows how to clear the fabric configuration server statistics for VSAN 10:


switch# clear fcs statistics vsan 10

clear fctimer session

To clear fctimer Cisco Fabric Services (CFS) session configuration and locks, use the clear fctimer session command.

clear fctimer session

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear fctimer session:


switch# clear fctimer session

clear ficon

Use the clear ficon command in EXEC mode to clear the FICON information for the specified VSAN.

clear ficon vsan vsan-id [allegiance | timestamp]

Syntax Description

vsan vsan-id

Specifies the FICON-enabled VSAN. The ID of the VSAN is from 1 to 4093.

allegiance

(Optional) Clears the FICON device allegiance.

timestamp

(Optional) Clears the FICON VSAN specific timestamp.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.3(1)

This command was introduced.

Usage Guidelines

The clear ficon vsan vsan-id allegiance command terminates the currently executing session.

Examples

The following example clears the current device allegiance for VSAN 1:


switch# clear ficon vsan 1 allegiance

The following example clears the VSAN clock for VSAN 20:


switch# clear ficon vsan 20 timestamp

clear fspf counters

To clear the Fabric Shortest Path First statistics, use the clear fspf counters command in EXEC mode.

clear fspf counters vsan vsan-id [interface type]

Syntax Description

vsan

Indicates that the counters are to be cleared for a VSAN.

vsan-id

The ID of the VSAN is from 1 to 4093.

interface type

(Optional). The counters are to be cleared for an interface. The interface types are fc for Fibre Channel, and port-channel for PortChannel.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

If the interface is not specified, then all of the counters of a VSAN are cleared. If the interface is specified, then the counters of the specific interface are cleared.

Examples

The following example clears the FSPF t statistics on VSAN 1:


switch# clear fspf counters vsan 1

The following example clears FSPF statistics specific to the Fibre Channel interface in VSAN 1, Slot 9 Port 32:


switch#  clear fspf counters vsan 1 interface fc 9/32

clear install failure-reason

To remove the upgrade failure reason log created during in-service software upgrades (ISSUs) on the Cisco MDS 9124 Fabric Switch, use the clear install failure-reason command.


Caution


If you remove the upgrade failure reason log, then you will not have any information to help you debug in the event of an ISSU failure.


clear install failure-reason

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.1(1)

This command was introduced.

Usage Guidelines

This command is supported only on the Cisco MDS 9124 Fabric Switch.

Examples

The following example removes all upgrade failure reason logs on a Cisco MDS 9124 Fabric Switch:


switch# clear install failure-reason

clear ip access-list counters

To clear IP access list counters, use the clear ip access-list counters command in EXEC mode.

clear ip access-list counters list-name

Syntax Description

list-name

Specifies the IP access list name (maximum 64 characters).

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.1(1)

This command was introduced.

Examples

The following example clears the counters for an IP access list:


switch# clear ip access-list counters adminlist

clear ips arp

To clear ARP caches, use the clear ips arp command in EXEC mode.

clear ips arp {address ip-address | interface gigabitethernet module-number}

Syntax Description

address

Clears fcflow aggregated statistics.

ip-address

Enters the peer IP address.

interface gigabitethernet

Specifies the Gigabit Ethernet interface.

module-number

Specifies the slot and port of the Gigabit Ethernet interface.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.1(1)

This command was introduced.

Examples

The ARP cache can be cleared in two ways: clearing just one entry or clearing all entries in the ARP cache.

The following example clears one ARP cache entry:


switch# clear ips arp address 10.2.2.2 interface gigabitethernet 8/7 
arp clear successful

The following example clears all ARP cache entries:


switch# clear ips arp interface gigabitethernet 8/7
arp clear successful

clear ips stats

To clear IP storage statistics, use the clear ips stats command in EXEC mode.

clear ips stats {all [interface gigabitethernet slot/port] | buffer interface gigabitethernet slot/port | dma-bridge interface gigabitethernet slot/port | icmp interface gigabitethernet slot/port | ip interface gigabitethernet slot/port | ipv6 traffic interface gigabitethernet slot/port | mac interface gigabitethernet slot/port | tcp interface gigabitethernet slot/port}

Syntax Description

all

Clears all IPS statistics.

interface gigabitethernet

(Optional) Clears the Gigabit Ethernet interface.

slot/port

Specifies the slot and port numbers.

buffer

Clears IP storage buffer information.

dma-bridge

Clears direct memory access (DMA) statistics.

icmp

Clears ICMP statistics.

ip

Clears IP statistics.

ipv6

Clears IPv6 statistics.

mac

Clears Ethernet MAC statistics.

tcp

Clears TCP statistics.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Examples

The following example clears all IPS statistics on the specified interface:


switch# clear ips all interface gigabitethernet 8/7
switch#

clear ips stats fabric interface

To clear the statistics for a given iSCSI or FCIP interface on a Cisco MDS 9000 18/4-Port Multi Service Module IPS linecard, use the clear ips stats fabric interface command.

clear ips stats fabric interface [iscsi slot/port | fcip N]

Syntax Description

iscsi slot/port

(Optional) Clears Data Path Processor (DPP) fabric statistics for the iSCSI interface.

fcip N

(Optional) Clears DPP fabric statistics for the FCIP interface.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.2(1)

This command was introduced.

Usage Guidelines

None.

Examples

The following example clears the statistics for a given iSCSI or FCIP interface:


switch# clear ips stats fabric interface fcip ?
<1-255>  Fcip interface number
switch# clear ips stats fabric interface fcip 1
switch#
switch# clear ips stats fabric interface iscsi 1/1
switch#

clear ipv6 access-list

To clear IPv6 access control list statistics, use the clear ipv6 access-list command.

clear ipv6 access-list [list-name]

Syntax Description

access-list

Displays a summary of access control lists (ACLs).

list-name

(Optional) Specifies the name of the ACL. The maximum size is 64.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.1(0)

This command was introduced.

Usage Guidelines

You can use the clear ipv6 access-list command to clear IPv6-ACL statistics.

Examples

The following example displays information about an IPv6-ACL:


switch# clear ipv6 access-list testlist
switch#

clear ipv6 neighbors

To clear the IPv6 neighbor cache table, use the clear ipv6 neighbors command.

clear ipv6 neighbors

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.1(0)

This command was introduced.

Usage Guidelines

None.

Examples

The following example flushes the IPv6 neighbor cache table:


switch# clear ipv6 neighbors
switch#

clear islb session

To clear a pending iSLB configuration, use the clear islb session command.

clear islb session

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

You can use the clear islb session command to clear a pending iSLB configuration. This command can be executed from any switch by a user with admin privileges.

Examples

The following example clears a pending iSLB configuration:


switch# clear
 islb session

clear ivr fcdomain database

To clear the IVR fcdomain database, use the clear ivr fcdomain database command in EXEC mode.

clear ivr fcdomain database

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.1(2)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears all IVR fcdomain database information:


switch# clear ivr fcdomain database

clear ivr service-group database

To clear an inter-VSAN routing (IVR) service group database, use the clear ivr service-group database command.

clear ivr service-group database

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears the ivr service-group database:


switch# clear ivr service-group database

clear ivr zone database

To clear the Inter-VSAN Routing (IVR) zone database, use the clear ivr zone database command in EXEC mode.

clear ivr zone database

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.3(1)

This command was introduced.

Examples

The following example clears all configured IVR information:


switch# clear ivr zone database 

clear license

To uninstall a license, use the clear license command in EXEC mode.

clear license filename

Syntax Description

filename

Specifies the license file to be uninstalled.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.3(2)

This command was introduced.

Examples

The following example clears a specific license:


switch# clear license Ficon.lic 
Clearing license Ficon.lic:
SERVER this_host ANY
VENDOR cisco
# An example fcports license
INCREMENT SAN_EXTN_OVER_IP cisco 1.000 permanent 1 HOSTID=VDH=ABCD \
        NOTICE=<LicFileID>san_extn2.lic</LicFileID><LicLineID>1</LicLineID> \
        SIGN=67CB2A8CCAC2
 
Do you want to continue? (y/n) y
Clearing license ..done
switch# 

clear line

To clear VTY sessions, use the clear line command in EXEC mode.

clear line vty-name

Syntax Description

vty-name

Specifies the VTY name (maximum 64 characters).

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

1.2(1)

This command was introduced.

Examples

The following example clears one ARP cache entry:


switch# clear line Aux
arp clear successful

clear logging

To delete the syslog information, use the clear logging command in EXEC mode.

clear logging { dropcount | logfile | nvram | onboard information [ module slot ] | session }

Syntax Description

logfile

Clears log file messages.

nvram

Clears NVRAM logs.

onboard information

Clears onboard failure logging (OBFL) information. The types of information include boot-uptime , cpu-hog , device-version , endtime , environmental-history , error-stats , exception-log , interrupt-stats , mem-leak , miscellaneous-error , module , obfl-history , obfl-log , rxwait , register-log , stack-trace , starttime , status , system-health , txwait , and so on.

module slot

(Optional) Clears OBFL information for a specified module.

session

Clears a logging session.

Command Default

None

Command Modes


EXEC

Command History

Release

Modification

3.0(1)

Added the onboard , module and session options.

1.0(2)

This command was introduced.

Examples

The following example shows how to clear the debug log file:


switch# clear logging logfile

The following example shows how to clear the onboard system health log file:


switch# clear logging onboard system-health
!!!WARNING! This will clear the selected logging buffer!!
Do you want to continue? (y/n)  [n]

clear ntp

To clear Network Time Protocol (NTP) information, use the clear ntp command in EXEC mode.

clear ntp {session | statistics {all-peers | io | local | memory}}

Syntax Description

session

Clears NTP CFS session configuration and locks.

statistics

Clears NTP statistics.

all-peers

Clears I/O statistics for all peers.

io

Clears I/O statistics for I/O devices.

local

Clears I/O statistics for local devices.

memory

Clears I/O statistics for memory.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear NTP statistics for all peers:


switch# clear ntp statistics all-peers

The following example shows how to clear NTP statistics for I/O devices:


switch# clear ntp statistics io

The following example shows how to clear NTP statistics for local devices:


switch# clear ntp statistics local

The following example shows how to clear NTP statistics for memory:


switch# clear ntp statistics memory

clear port-security

To clear the port security information on the switch, use the clear port-security command in EXEC mode.

(explicit id )

Syntax Description

database

Clears the port security active configuration database.

auto-learn

Clears the auto-learn entries for a specified interface or VSAN.

interface fc slot/port

Clears entries for a specified interface.

port-channel port

Clears entries for a specified PortChannel. The range is 1 to 128.

session

Clears the port security CFS configuration session and locks.

statistics

Clears the port security counters.

vsan vsan-id

Clears entries for a specified VSAN ID. The range is 1 to 4093.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.2(1)

This command was introduced.

2.0(x)

Added the session option.

Usage Guidelines

The active database is read-only and clear port-security database command can be used when resolving conflicts.

Examples

The following example clears all existing statistics from the port security database for a specified VSAN:


switch# clear port-security statistics vsan 1

The following example clears learnt entries in the active database for a specified interface within a VSAN:


switch# clear port-security database auto-learn interface fc1/1 vsan 1

The following example clears learnt entries in the active database up to for the entire VSAN:


switch# clear port-security database auto-learn vsan 1

clear processes log

To clear the log files on the switch, use the clear processes log command in EXEC mode.

clear processes log {all | pid pid-number}

Syntax Description

all

Deletes all of the log files.

pid

Deletes the log files of a specific process.

pid-number

Specifies the process ID, which must be from 0 to 2147483647.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear all of the log files on the switch :


switch# clear processes log all

clear qos statistics

To clear the quality of services statistics counters, use the clear qos statistics command in EXEC mode.

clear qos statistics

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear the quality of service counters:


switch# clear qos statistics

clear radius-server statistics

To clear radius server statistics, use the clear radius-server statistics command.

clear radius-server statistics name

Syntax Description

name

Specifies the RADIUS name or IP address.

Command Default

None

Command Modes


Configuration mode

Command History

Release

Modification

NX-OS 4.2(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the statistics sent or received from the specified server:


switch(config)# clear radius-server statistics 10.64.65.57
switch(config)#

clear radius session

To clear RADIUS Cisco Fabric Services (CFS) session configuration and locks, use the clear radius session command.

clear radius session

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None.

Examples

The following example shows how to clear RADIUS session:


switch# clear radius session

clear rlir

To clear the Registered Link Incident Report (RLIR), use the clear rlir command in EXEC mode.

clear rlir {history | recent {interface fc slot-port | portnumber port-number} | statistics vsan vsan-id}


Note


On a Cisco Fabric Switch for HP c-Class BladeSystem and on a Cisco Fabric Switch for IBM BladeCenter, the syntax differs as follows:interface bay port | ext port .

Syntax Description

history

Clears RLIR link incident history.

recent

Clears recent link incidents.

interface fc slot/port

Clears entries for a specified interface.

bay port | ext port

Clears entries for a specified interface on a Cisco Fabric Switch for HP c-Class BladeSystem and on a Cisco Fabric Switch for IBM BladeCenter.

portnumber port-number

Displays the port number for the link incidents.

statistics

Clears RLIR statistics.

vsan vsan-id

Specifies the VSAN ID for which the RLIR statistics are to be cleared.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.3(1)

This command was introduced.

3.1(2)

Added the interface bay | ext option.

Usage Guidelines

None.

Examples

The following example clears all existing statistics for a specified VSAN:


switch# clear rlir statistics vsan 1

The following example clears the link incident history:


switch# clear rlir history 

The following example clears recent RLIR information for a specified interface:


switch# clear rlir recent interface fc 1/2

The following example clears recent RLIR information for a specified port number:


switch# clear rlir recent portnumber 16

clear rmon alarms

To clear all the 32-bit remote monitoring (RMON) alarms from the running configuration, use the clear rmon alarms command.

clear rmon alarms

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

Usage Guidelines

You must save the changes to startup configuration to make them permanent.

Examples

The following example clears all 32-bit RMON alarms from the running configuration:


switch# clear rmon alarms
switch#

clear rmon all-alarms

To clear all the 32-bit and 64-bit RMON alarms from the running configuration, use the clear rmon all-alarms command.

clear rmon all-alarms

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

Usage Guidelines

You must save the changes to startup configuration to make them permanent.

Examples

The following example clears all the 32-bit and 64-bit RMON alarms from the running configuration:


switch# clear rmon all-alarms
switch#

clear rmon hcalarms

To clear all the 64-bit RMON alarms from the running configuration, use the clear rmon hcalarms command.

clear rmon hcalarms

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

Usage Guidelines

You must save the changes to startup configuration to make them permanent.

Examples

The following example clears all the 64-bit RMON alarms from the running configuration:


switch# clear rmon hcalarms
switch#

clear rmon log

To clear all entries from RMON log on the switch, use the clear rmon log command.

clear rmon log

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears all entries from RMON log on the switch:


switch# clear rmon log
switch#

clear role session

To clear authentication role Cisco Fabric Services (CFS) session configuration and locks, use the clear role session command.

clear role session

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear authentication role CFS session:


switch# clear role session

clear rscn session vsan

To clear a Registered State Change Notification (RSCN) session for a specified VSAN, use the clear rscn session vsan command.

clear rscn session vsan vsan-id

Syntax Description

vsan-id

Specifies a VSAN where the RSCN session should be cleared. The ID of the VSAN is from 1 to 4093.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example clears an RSCN session on VSAN 1:


switch# clear rscn session vsan 1

clear rscn statistics

To clear the registered state change notification RSCN statistics for a specified VSAN, use the clear rscn statistics command in EXEC mode.

clear rscn statistics vsan vsan-id

Syntax Description

vsan

The RSCN statistics are to be cleared for a VSAN.

vsan-id

The ID for the VSAN for which you want to clear RSCN statistics.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear RSCN statistics for VSAN 1:


switch# clear rscn statistics 1

clear santap module

To clear SANTap information, use the clear santap module command.

clear santap module slot-number {avt avt-pwwn [lun avt-lun] | itl target-pwwn host-pwwn | session session-id}

Syntax Description

slot-number

Specifies the Storage Services Module (SSM) module number. The range is 1 through 13.

avt avt-pwwn

Removes the appliance virtual target (AVT) pWWN. The format is hh:hh:hh:hh:hh:hh:hh:hh .

lun avt-lun

(Optional) Removes the appliance virtual target (AVT) LUN. The format is 0xhhhh [:hhhh [:hhhh [:hhhh ]]].

itl target-pwwn host-pwwn

Removes the SANTap Initiator Target LUN (ITL) triplet. The format of the target-pwwn and the host-pwwn is hh:hh:hh:hh:hh:hh:hh:hh .

session session-id

Removes a session. The range for session ID is 0 through 2147483647.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.0(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to remove a SANTap session:


switch# clear santap module 13 session 2020

clear scheduler logfile

To clear the command scheduler logfile, use the clear scheduler logfile command.

clear scheduler logfile

Syntax Description

This command has no other arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(x)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the command scheduler logfile:


switch# clear scheduler logfile

clear screen

To clear the terminal screen, use the clear screen command in EXEC mode.

clear screen

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.0(2)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the terminal screen:


switch# clear screen

clear scsi-flow statistics

To clear the SCSI flow statistics counters, use the clear scsi-flow statistics command.

clear scsi-flow statistics flow-id flow-id

Syntax Description

flow-id flow-id

Configures the SCSI flow identification number.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

2.0(2)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the SCSI flow statistics counters for SCSI flow ID 3:


switch# clear sc
screen     scsi-flow  
switch# clear scsi-flow ?
  statistics  Clear statistics counters
switch# clear scsi-flow statistics ?
  flow-id  Clear statistics for particular flow
switch# clear scsi-flow statistics flow-id ?
  <1-65535>  Enter the index of the SCSI flow
switch# clear scsi-flow statistics flow-id 3 ?
  <cr>  Carriage Return
switch# clear scsi-flow statistics flow-id 3

clear sdv

To clear specified SAN device virtualization parameters, use the clear sdv command in EXEC mode.

clear sdv {database vsan vsan-id | session vsan vsan-id | statistics vsan vsan-id}

Syntax Description

database

Clears the SDV database.

vsan vsan-id

Specifies the number of the VSAN. The range is 1 to 4093.

session

Clears the SDV session.

statistics

Clears the SDV statistics.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.1(2)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear SDV statistics:


switch# clear sdv statistics vsan 2

clear snmp hostconfig

To clear all SNMP hosts from the running configuration, use the clear snmp hostconfig command.

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.3(1a)

This command was introduced.

Usage Guidelines

You must save the changes to startup configuration to make them permanent:

Examples

The following example clears the SNMP host list.


switch# clear snmp hostconfig
switch#

clear ssh hosts

To clear trusted SSH hosts, use the clear ssh hosts command in EXEC mode.

clear ssh hosts

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

1.2(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear reset-reason information from NVRAM and volatile storage:


switch# clear ssh hosts

clear ssm-nvram santap module

To clear the SANTap configuration for a specific slot stored on the supervisor flash, use the clear ssm-nvram santap module command in the configuration mode.

clear ssm-nvram santap module slot

Syntax Description

slot

Displays SANTap configuration for a module in the specified slot.

Command Default

None

Command Modes


EXEC mode

Command History

Release

Modification

3.2(1)

This command was introduced.

Usage Guidelines

None

Examples

The following example shows how to clear the SANTap configuration for a slot 2:


switch# clear ssm-nvram santap module 2

clear system reset-reason

To clear the reset-reason information stored in NVRAM and volatile persistent storage, use the clear system reset-reason command in EXEC mode.

clear system reset-reason