29.04.2019 Views

OS6860(E)_AOS_8.1.1.R01_Switch_Management_Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using the CLI<br />

Logging CLI Commands and Entry Results<br />

respond by printing the number four command at the prompt. Using the history list of commands above,<br />

the following would display:<br />

-> !4<br />

-> show ip interface<br />

Logging CLI Commands and Entry Results<br />

The switch provides command logging via the command-log command. This feature allows users to<br />

record the most recent commands entered via Telnet, Secure Shell, and console sessions. In addition to a<br />

list of commands entered, the results of each command entry are recorded. Results include information<br />

such as whether a command was executed successfully, or whether a syntax or configuration error<br />

occurred.<br />

Refer to the sections below for more information on configuring and using CLI command logging. For<br />

detailed information related to command logging commands, refer to the Omni<strong>Switch</strong> <strong>AOS</strong> Release 8 CLI<br />

Reference <strong>Guide</strong>.<br />

Enabling Command Logging<br />

By default, command logging is disabled. To enable command logging on the switch, enter the following<br />

command:<br />

-> command-log enable<br />

When command logging is enabled via the command-log enable syntax, a file called command.log is<br />

automatically created in the switch’s flash directory. Once enabled, configuration commands entered on<br />

the command line will be recorded to this file until command logging is disabled.<br />

Note. The command.log file cannot be deleted while the command logging feature is enabled. Before<br />

attempting to remove the file, be sure to disable command logging. To disable command logging, refer to<br />

the information below.<br />

Disabling Command Logging<br />

To disable the command logging, simply enter the following command:<br />

-> command-log disable<br />

Disabling command logging does not automatically remove the command.log file from the flash directory.<br />

All commands logged before the command-log disable syntax was entered remains available for<br />

viewing. For information on viewing logged commands, along with the command entry results, refer to<br />

“Viewing Logged CLI Commands and Command Entry Results” on page 4-8.<br />

Omni<strong>Switch</strong> <strong>AOS</strong> Release 8 <strong>Switch</strong> <strong>Management</strong> <strong>Guide</strong> May 2014 page 4-7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!