User guide

Using the CLI Logging CLI Commands and Entry Results
OmniSwitch AOS Release 7 Switch Management Guide March 2015 page 5-7
Logging CLI Commands and Entry Results
The switch provides command logging via the command-log command. This feature allows users to
record the most recent commands entered via Telnet, Secure Shell, and console sessions. In addition to a
list of commands entered, the results of each command entry are recorded. Results include information
such as whether a command was executed successfully, or whether a syntax or configuration error
occurred.
Refer to the sections below for more information on configuring and using CLI command logging. For
detailed information related to command logging commands, refer to the OmniSwitch AOS Release 7 CLI
Reference Guide.
Enabling Command Logging
By default, command logging is disabled. To enable command logging on the switch, enter the following
command:
-> command-log enable
When command logging is enabled via the command-log enable syntax, a file called command.log is
automatically created in the switch’s flash directory. Once enabled, configuration commands entered on
the command line will be recorded to this file until command logging is disabled.
Note. The command.log file cannot be deleted while the command logging feature is enabled. Before
attempting to remove the file, be sure to disable command logging. To disable command logging, refer to
the information below.
Disabling Command Logging
To disable the command logging, simply enter the following command:
-> command-log disable
Disabling command logging does not automatically remove the command.log file from the flash direc-
tory. All commands logged before the command-log disable syntax was entered remains available for
viewing. For information on viewing logged commands, along with the command entry results, refer to
“Viewing Logged CLI Commands and Command Entry Results” on page 5-8.