C Commands

callhome

To configure the Cisco Smart Call Home service and enter the callhome configuration mode, use the callhome command.

callhome

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Global configuration mode

Command History

Release

Modification

This command was introduced.

Usage Guidelines

You must configure the e-mail, phone, and street address information for Call Home. You can optionally configure the contract ID, customer ID, site ID, and switch priority information.

Examples

This example shows how to enter callhome configuration mode:


switch(config)# callhome 
switch(config-callhome)# 

callhome send diagnostic

To send a specified Call Home test message to all configured destinations, use the callhome send diagnostic command.

callhome send diagnostic

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Callhome configuration mode

Command History

Release

Modification

This command was introduced.

Usage Guidelines

You can generate a test message to test your Call Home communications using the callhome send diagnostic command.

Examples

This example shows how to configure Call Home to send test messages to all configured destinations:


switch(config-callhome)# callhome send diagnostic
 
switch(config-callhome)# 

callhome test

To send a Call Home test message to all configured destinations, use the callhome test command.

callhome test [inventory]

Syntax Description

inventory

(Optional) Specifies that a Call Home inventory message be sent for testing the Call Home configuration.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

This command was introduced.

Examples

This example shows how to send a Call Home test message to all configured destinations:


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

This example shows how to send a Call Home inventory message to all configured destinations:


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

clear flow exporter

To clear the statistics for a Flexible NetFlow flow exporter, use the clear flow exporter command.

clear flow exporter {name exporter-name | exporter-name}

Syntax Description

name

Specifies the name of a flow exporter.

exporter-name

Name of an existing flow exporter.

Command Default

None

Command Modes

Any command mode

Command History

Release

Modification

7.0(0)N1(1)

This command was introduced.

Usage Guidelines

You must have already enabled traffic monitoring with Flexible NetFlow using an exporter before you can use the clear flow exporter command.

This command does not require a license.

Examples

This example clears the statistics for the flow exporter named NFC-DC-PHOENIX:


switch# clear flow exporter name 
NFC-DC-PHOENIX
switch#

clear logging logfile

To clears the contents of the log file, use the clear logging logfile command.

clear logging logfile

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to clear the logging logfile:


switch# clear logging logfile 
switch# 

clear logging nvram

To clear the NVRAM logs, use the clear logging nvram command.

clear logging nvram

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to clear the NVRAM logs:


switch# clear logging nvram
 

clear logging onboard

To clear the onboard failure logging (OBFL) entries in the persistent log, use the clear logging onboard command.

clear logging onboard [environmental-history] [exception-log] [obfl-log] [stack-trace]

Syntax Description

environmental-history

(Optional) Clears the OBFL environmental history.

exception-log

(Optional) Clears the OBFL exception log entries.

obfl-log

(Optional) Clears the OBFL (boot-uptime/device-version/obfl-history).

stack-trace

(Optional) Clears the OBFL stack trace entries.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to clear the OBFL environmental history entries:


switch# clear logging onboard environmental-history

This example shows how to clear the OBFL exception-log entries:


switch# clear logging onboard exception-log

This example shows how to clear the OBFL (boot-uptime/device-version/obfl-history) entries:


switch# clear logging onboard obfl-log

This example shows how to clear the OBFL stack trace entries:


switch# clear logging onboard stack-trace
 

clear logging session

To clear the current logging session, use the clear logging session command.

clear logging session

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to clear the current logging session:


switch# clear logging session
 

clear ntp session

To clear the Network Time Protocol (NTP) session, use the clear ntp session command.

clear ntp session

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to discard the NTP Cisco Fabric Services (CFS) distribution session in progress:


switch# clear ntp session
 

clear ntp statistics

To clear the Network Time Protocol (NTP) session, use the clear ntp statistics command.

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

Syntax Description

all-peers

Clears all peer transaction statistics.

io

Clears I/O statistics.

local

Clears local statistics.

memory

Clears memory statistics.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to discard the NTP I/O statistics:


switch# clear ntp statistics io
 

collect flow

To configure the flow sampler ID number as a nonkey field and collect their values for a Flexible NetFlow flow record, use the collect flow command. To disable the use of the flow direction or the flow sampler ID number as a nonkey field for a Flexible NetFlow flow record, use the no form of this command.

collect flow sampler id

no collect flow sampler id

Syntax Description

sampler id

Configures the flow sampler ID as a nonkey field and collects the ID of the sampler that is assigned to the flow monitor.

Command Default

This command is not enabled by default.

Command Modes

Flow record configuration

Command History

Release

Modification

7.0(0)N1(1)

This command was introduced.

Usage Guidelines

The Flexible NetFlow commands that start with collect are used to configure nonkey fields for the flow monitor record and to enable capturing the values in the fields for the flow created with the record. The values in nonkey fields are added to flows to provide additional information about the traffic in the flows. A change in the value of a nonkey field does not create a new flow. In most cases, the values for nonkey fields are taken from only the first packet in the flow.

Use the collect flow sampler id command to collect the ID of the flow sampler that is used to monitor the flow. Use this command when more than one flow sampler is being used with different sampling rates. The option sampler-table command exports option records with mappings of the flow sampler ID to the sampling rate so that the collector can calculate the scaled counters for each flow.

This command does not require a license.

Examples

This example shows how to configure an ID of the flow sampler that is assigned to the flow as a nonkey field and collects the ID of the flow sampler:


switch(config)# flow record FLOW-RECORD-1
switch(config-flow-record)# collect flow sampler id

commit (Call Home)

To commit Call Home configuration changes and distribute the changes to call Cisco Fabric Services (CFS)-enabled devices, use the commit command.

commit

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Call home configuration mode

Command History

Release

Modification

This command was introduced.

Examples

This example shows how to commit CFS Call Home configuration changes:


switch(config-callhome)# commit 
switch(config-callhome)# 

commit (session)

To commit the current configuration session, use the commit command.

commit

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Session configuration mode

Command History

Release

Modification

6.0(2)N1(1)

This command was introduced.

Examples

This example shows how to commit the current session:


switch(config-s)# commit
 
switch(config-s)# 

configure maintenance profile

To enter a maintenance profile configuration session to create a custom maintenance mode profile or a custom normal mode profile, use the configure maintenance profile command. To delete the existing maintenance mode profile or normal mode profile, use the no form of this command. Starting with Cisco NX-OS Release 7.3(0)N1(1), we recommend not using the configure profile [maintenance-mode | normal-mode ] type admin command and we strongly recommend using the configure maintenance profile [maintenance-mode | normal-mode ] command.

configure maintenance profile [maintenance-mode | normal-mode]

no configure maintenance profile [maintenance-mode | normal-mode]

Syntax Description

maintenance-mode

Enters the maintenance profile configuration session for a maintenance mode profile.

normal-mode

Enters the maintenance profile configuration session for a normal mode profile.

Command Default

None

Command Modes

Privileged EXEC (#)

Global configuration mode (config)

Command History

Release

Modification

7.3(0)N1(1)

This command was introduced.

Usage Guidelines

This command does not require a license.

Examples

This example shows how to enter a maintenance profile configuration session for a maintenance mode profile:


switch# configure maintenance profile maintenance-mode
Please configure 'system mode maintenance always-use-custom-profile' if you want to use
custom profile always for maintenance mode.
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-mm-profile)#

This example shows how to enter a maintenance profile configuration session for a normal mode profile:


switch# configure maintenance profile normal-mode
Please configure 'system mode maintenance always-use-custom-profile' if you want to use
custom profile always for maintenance mode.
Enter configuration commands, one per line. End with CNTL/Z.
switch(config-mm-profile)#

This example shows how to delete a maintenance profile:


switch# no configure maintenance profile maintenance-mode
Maintenance mode profile maintenance-mode successfully deleted
Enter configuration commands, one per line. End with CNTL/Z.
Exit maintenance profile mode.

contract-id (Call Home)

To configure the optional contract number for the customer, use the contract-id command. To remove a contract number, use the no form of this command.

contract-id contract-number

no contract-id

Syntax Description

contract-number

Contract number. The contract number can be up to 255 alphanumeric characters in free format.

Command Default

None

Command Modes

Call home configuration mode

Command History

Release

Modification

This command was introduced.

Usage Guidelines

You can configure the customer identification information that Cisco Smart Call Home should use. The service agreement includes the customer identification information, such as the customer ID, contract ID, and site ID.

Examples

This example shows how to configure the contract number for the customer:


switch(config-callhome)# contract-id 12095134-1706
 
switch(config-callhome)# 

customer-id (Call Home)

To configure the optional unique identification number for the customer, use the customer-id command. To remove a customer number, use the no form of this command.

customer-id customer-no

no customer-id

Syntax Description

customer-no

Customer number, as specified in the service agreement. The customer number can be up to 255 alphanumeric characters in free format.

Command Default

None

Command Modes

Callhome configuration mode

Command History

Release

Modification

This command was introduced.

Usage Guidelines

You can configure the customer identification information that Cisco Smart Call Home should use. The service agreement includes the customer identification information, such as the customer ID, contract ID, and site ID.

Examples

This example shows how to configure a customer number:


switch(config-callhome)# customer-id AXC-1203
 
switch(config-callhome)#