Guest

Cisco IOS Software Releases 12.2 SR

Configuration Logger Persistency

  • Viewing Options

  • PDF (519.6 KB)
  • Feedback
Configuration Logger Persistency

Table Of Contents

Configuration Logger Persistency

Contents

Prerequisites for Configuration Logger Persistency

Information About Configuration Logger Persistency

Use of Configuration Logger Persistency to Save Configuration Files

Persisted Commands

How to Configure the Configuration Logger Persistency Feature

Enabling the Configuration Logger Persistency Feature

Verifying and Troubleshooting the Configuration Logger Persistency Feature

Configuration Examples for the Configuration Logger Persistency Feature

Configuration Logger Persistency configuration on a Cisco 7200 series router: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

archive log config persistent save

clear archive log config

(config-archive-log-cfg) logging persistent

debug archive log config persistent

logging persistent reload

show archive log config

Feature Information for Configuration Logger Persistency

Glossary


Configuration Logger Persistency


First Published: June 19, 2006
Last Updated: August 6, 2007

The Configuration Logger Persistency feature increases the operational robustness of Cisco IOS configuration and provisioning actions by implementing a "quick-save" functionality. When the Configuration Logger Persistency feature is configured, Cisco IOS software saves just the commands entered since the last startup-config file was generated, rather than saving the entire startup configuration.

Finding Feature Information in This Module

Your Cisco IOS software release may not support all of the features documented in this module. To reach links to specific feature documentation in this module and to see a list of the releases in which each feature is supported, use the "Feature Information for Configuration Logger Persistency" section.

Finding Support Information for Platforms and Cisco IOS and Catalyst OS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS and Catalyst OS software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.

Contents

Prerequisites for Configuration Logger Persistency

Information About Configuration Logger Persistency

How to Configure the Configuration Logger Persistency Feature

Configuration Examples for the Configuration Logger Persistency Feature

Additional References

Command Reference

Feature Information for Configuration Logger Persistency

Prerequisites for Configuration Logger Persistency

To enable the Configuration Logger Persistency feature, you must have disk0: configured and an external flash card inserted on the router.

To achieve optimum results from the Configuration Logger Persistency feature, you must have Cisco IOS Release 12.2(33)SRA, Release 12.4(11)T, or Release 12.2(33)SXH installed on your system.

Information About Configuration Logger Persistency

To understand and use the Configuration Logger Persistency feature, you should be familiar with the following concepts:

Use of Configuration Logger Persistency to Save Configuration Files

Persisted Commands

Use of Configuration Logger Persistency to Save Configuration Files

Cisco IOS software uses the startup-config file to save router configuration commands across reloads. This single file contains all the commands that need to be applied when the router reboots. The startup-config file gets updated every time a write memory command or copy url startup-config command is entered. As the size of the running-config file grows, the time to save the startup-config file to the NVRAM file system increases as well. Startup-config files can be 1 MB and larger. For files of this size, making a single-line change to the startup-config file requires that the entire startup-config file is saved again even though most of the configuration has not changed.

The Configuration Logger Persistency feature implements a "quick-save" functionality. The aim is to provide a "configuration save" mechanism where the time to save changes from the startup-config file is proportional to the size of the incremental changes (with respect to the startup-config file) that need to be saved.

The Cisco IOS configuration logger logs all changes that are manually entered at the command-line prompt. This feature also notifies the registered clients when changes to the log occur. The contents of the configuration log are stored in the run-time memory—the contents of the log are not persisted after reboots.

The Configuration Logger Persistency feature provides a mechanism to persist the configuration commands entered by users across reloads. Only the commands entered at the command-line interface (CLI) (that is, the commands entered in configuration mode) are persisted across reload. This feature uses the Cisco IOS secure file system to persist the configuration commands that are generated.


Note The Cisco IOS configuration logger is different from the system message logging (syslog) facility. Syslog is a general logging facility for tracking system messages. The configuration logger tracks information about configuration commands entered at the CLI.


Persisted Commands

The persisted commands from the Cisco IOS configuration logger are used as an extension to the startup configuration. These saved commands provide a quick-save capability. Rather than saving the entire startup-config file, Cisco IOS software saves just the commands entered since the last startup-config file was generated.

Only the logged commands are persisted. The following additional data from the configuration logger are not persisted:

User who logged the command

IP address from which the user logged in

Session and log indexes for the logged command

Time when the command was entered

Pre- and post-NVGEN output associated with the entered command

Parser return code output for the entered command

The persisted commands' primary purpose is for use as a quick-save extension to the startup-config file. The additional information associated with a configuration command is not useful for quick-save purposes. If you need the additional information to be persisted across reboots (for auditing purposes), complete the following steps:

1. Enable configuration logger notification to syslog

2. Enable the syslog persistence feature

Alternatively, Cisco Networking Services, CiscoView, or other Network Management systems that manage Cisco IOS devices to keep track of configuration changes in an off-the-box storage solution can be used.

By default, upon reload, the persisted commands are appended to the startup-config file. These commands are applied only when you explicitly configure this behavior using a CLI configuration command.

How to Configure the Configuration Logger Persistency Feature

This section provides information about the following:

Enabling the Configuration Logger Persistency Feature (required)

Verifying and Troubleshooting the Configuration Logger Persistency Feature (optional)

Enabling the Configuration Logger Persistency Feature

The Configuration Logger Persistency feature implements a quick-save mechanism so that the time to save changes from the startup configuration is proportional to the size of the incremental changes (with respect to the startup configuration) that need to be saved. The persisted commands from the Cisco IOS configuration logger will be used as an extension to the startup configuration. The saved commands, which are used as an extension to the startup configuration, provide a quick-save ability. Rather than saving the entire startup-config file, Cisco IOS software saves just the commands entered since the last startup-config file was generated.

To enable the Configuration Logger Persistency feature, perform the following task.

SUMMARY STEPS

1. enable

2. configure terminal

3. archive

4. log config

5. logging persistent {auto | manual}

6. logging persistent reload

7. logging size entries

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

archive

Example:

Router(config)# archive

Enters archive configuration mode.

Step 4 

log config

Example:

Router(config-archive)# log config

Enters archive configuration-log configuration mode.

Step 5 

logging persistent {auto | manual}

Example:

Router(config-archive-log-cfg)# logging persistent auto

Enables the Configuration Logging Persistent feature:

The auto keyword specifies that each configuration command will be saved automatically to the Cisco IOS secure file system.

The manual keyword specifies that you can save the configuration commands to the Cisco IOS secure file system on-demand. To do this, you must use the archive log config persistent save command.

Note To enable the logging persistent auto command, you must have disk0: configured and an external flash card inserted on the router.

Step 6 

logging persistent reload

Example:

Router(config-archive-log-cfg)# logging persistent reload

Sequentially applies the configuration commands saved in the configuration logger database (since the last write memory command) to the running-config file after a reload.

Step 7 

logging size entries

Example:

Router(config-archive-log-cfg)# logging size 10

Specifies the maximum number of entries retained in the configuration log.

Valid values range from 1 to 1000.

The default value is 100 entries.

Verifying and Troubleshooting the Configuration Logger Persistency Feature

Three privileged EXEC commands can be used to verify, archive, and clear the contents of the configuration log. For troubleshooting purposes, the command in Step 4 turns on debugging.

SUMMARY STEPS

1. show archive log config persistent

2. clear archive log config persistent

3. archive log config persistent save

4. debug archive log config persistent

DETAILED STEPS


Step 1 show archive log config persistent

This command displays the persisted commands in the configuration log. The commands appear in a configlet format. The following is sample output from this command:

Router# show archive log config persistent

!Configuration logger persistentarchive 
 log config 
 logging persistent auto 
 logging persistent reload 
archive 
 log config 
logging size 10
logging console 
interface loop 101 
 ip address 10.1.1.1 255.255.255.0
 ip address 10.2.2.2 255.255.255.0
 no shutdown 

Step 2 clear archive log config persistent

This command clears the configuration logging persistent database entries. Only the entries in the configuration logging database file are deleted. The file itself is not deleted because it will be used to log new entries. After this command is entered, a message is returned to indicate that the archive log is cleared:

Router# clear archive log config persistent 

Purged the config log persist database entries successfully 
Router# 

Step 3 archive log config persistent save

This command saves the configuration log to the Cisco IOS secure file system. For this command to work, the archive log config persistent save command must be configured.

Step 4 debug archive log config persistent

This command turns on the debugging function. A message is returned to indicate that debugging is turned on.

Router# debug archive log config persistent 

debug archive log config persistent debugging is on

Configuration Examples for the Configuration Logger Persistency Feature

This section provides a sample configuration of the Configuration Logger Persistency feature on a Cisco 7200 series router. In this example, each configuration command is saved automatically to the Cisco IOS secure file system, configuration commands saved in the configuration logger database (since the last write memory command) are applied sequentially to the running-config file, and the maximum number of entries retained in the configuration log is set to 10:

Configuration Logger Persistency configuration on a Cisco 7200 series router: Example

Configuration Logger Persistency configuration on a Cisco 7200 series router: Example

Router> enable
Router# configure terminal

Enter configuration commands, one per line. End with CNTL/Z. 

Router(config)# archive
Router(config-archive)# log config
Router(config-archive-log-config)# logging persistent auto

configuration log persistency feature enabled. Building configuration... [OK] 

Router(config-archive-log-config)# logging persistent reload
Router(config-archive-log-config)# logging size 10
Router(config-archive-log-config)# archive log config persistent save
Router(config-archive-log-config)# end
Router#

Additional References

The following sections provide references related to the Configuration Logger Persistency feature.

Related Documents

Related Topic
Document Title

Comprehensive command-reference information

Cisco IOS Configuration Fundamentals Command Reference


Standards

Standard
Title

No new or modified standards are supported by this feature.


MIBs

MIB
MIBs Link

No new or modified MIBs are supported by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFC
Title

No new or modified RFCs are supported by this feature.


Technical Assistance

Description
Link

The Cisco Technical Support & Documentation website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/techsupport


Command Reference

This section documents only commands that are new or modified.

archive log config persistent save

clear archive log config

(config-archive-log-cfg) logging persistent

debug archive log config persistent

logging persistent reload

show archive log config

archive log config persistent save

To save the persisted commands in the configuration log to the Cisco IOS secure file system, use the archive log config persistent save command in virtually any configuration mode.

archive log config persistent save

Syntax Description

This command has no arguments or keywords.

Command Default

If this command is not entered, the persisted configuration commands in the archive log are not saved to the Cisco IOS secure file system.

Command Modes

Configuration change logger configuration mode in archive configuration mode is common for this command, but the command can be used in virtually any configuration mode.

Command History

Release
Modification

12.2(33)SRA

This command was introduced.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

This command can be entered at any time, regardless of what mode the router is in. If the router is in the persistent periodic mode, the persistent timer is restarted.

Examples

The following example saves the persisted commands in the archive log to the Cisco IOS secure file system:

Router(config-archive-log-cfg)# archive log config persistent save

Related Commands

Command
Description

log config

Enters configuration change logger configuration mode.

logging enable

Enables the logging of configuration changes.

logging persistent

Enables the configuration logging persistent feature.


clear archive log config

To purge the configuration logging database entries, use the clear archive log config command in privileged EXEC mode.

clear archive log config [force | persistent]

Syntax Description

force

(Optional) Eliminates the confirm step before the contents of the archive log are cleared.

persistent

(Optional) Purges the configuration logging persistent-command database entries.


Command Default

If this command is not used, the database entries accumulate in the archive log.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(33)SRA

This command was introduced.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

When the clear archive log config command is entered, only the entries in the configuration logging database file are deleted. The file itself is not deleted; it will be used in the future to log new entries as they occur.

Examples

The following example clears the database entries that have been saved to the config log without asking you to confirm the action before the entries are cleared:

Router# clear archive log config force

Related Commands

Command
Description

show archive log config all persistent

Displays the persisted commands in configlet format.


(config-archive-log-cfg) logging persistent

To enable the configuration logging persistent feature and select how the configuration commands are to be saved to the Cisco IOS secure file system, use the logging persistent command the log config submode of archive configuration mode. To disable this capability, use the no form of this command.

logging persistent {auto | manual}

no logging persistent {auto | manual}

Syntax Description

auto

Specifies that each configuration command will be saved automatically to the Cisco IOS secure file system.

manual

Specifies that each configuration command must be saved manually to the Cisco IOS secure file system.


Command Default

The configuration commands are not saved to the Cisco IOS secure file system.

Command Modes

(config-archive-log-cfg)
Archive configuration mode, log config (configuration-change logger) submode.

Command History

Release
Modification

12.0(26)S

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

When you use the manual keyword, you must save each configuration command manually to the Cisco IOS secure file system. To do this, you must use the archive log config persistent save command.

To enable the logging persistent auto command, you must have disk0: configured and an external flash card inserted on the router.

Examples

The following example automatically saves the configuration commands to the Cisco IOS secure file system:

Router(config)# archive 
Router(config-archive)# log config 
Router(config-archive-log-cfg)# logging enable 
Router(config-archive-log-cfg)# logging persistent auto 

Related Commands

Command
Description

logging persistent reload

Sequentially applies configuration commands in the configuration logger database to the running-config file after a reload.

archive log config persistent save

Saves the persisted commands in the configuration log to the Cisco IOS secure file system.


debug archive log config persistent

To turn on debugging of configuration logging persistent events and display the results, use the debug archive log config persistent command in privileged EXEC mode. To disable the debugging and display of the archive events, use the no form of this command.

debug archive log config persistent

no debug archive log config persistent

Syntax Description

This command has no arguments or keywords.

Command Default

If this command is not entered, there is no debugging or display of the configuration logging persistent events in the archive.

Command Modes

Privileged EXEC

Command History

Release
Modification

12.2(33)SRA

This command was introduced.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

The configuration logger feature must be enabled in order for the debug capability to work.

Examples

The following example turns on the debugging feature and displays the configuration logging persistent events:

Router# debug archive config log persistent
Router# archive log config persistent save
Configuration logging persistent save triggered.
Saving the config log to disk0:IOS-Config-Logger-database'.
Command `interface eth0' saved
Command `ip address 10.1.1.1 255.255.255.0' saved
Command `no shut' saved
Router#

Related Commands

Command
Description

archive log config persistent save

Saves the persisted commands in the configuration log to the Cisco IOS secure file system.


logging persistent reload

To sequentially apply the configuration commands saved in the configuration logger database (since the last write memory command) to the running-config file after a reload, use the logging persistent reload command in configuration change logger configuration mode in archive configuration mode. To disable this capability, use the no form of this command.

logging persistent reload

no logging persistent reload

Syntax Description

This command has no arguments or keywords.

Command Default

The configuration commands saved in the configuration logger database are not applied to the running-config file.

Command Modes

Configuration change logger configuration mode in archive configuration mode

Command History

Release
Modification

12.2(33)SRA

This command was introduced.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

Use the logging persistent reload command when you want changed configuration commands to take effect on the next reload of the router.

Examples

The following example applies the configuration commands in the configuration logger database to the running-config file after the next reload:

Router(config-archive-log-cfg)# logging persistent reload

Related Commands

Command
Description

logging persistent

Enables the configuration logging persistent feature.


show archive log config

To display entries from the configuration log, use the show archive log config command in privileged EXEC mode.

show archive log config {all | record-number [end-number] | user username [session session-number] record-number [end-number] | statistics} [provisioning] [contenttype {plaintext | xml}] [persistent]

Syntax Description

all

Displays all configuration log entries.

record-number [end-number]

Displays the log entry by record number. If you specify a record number for the optional end-number argument, all log entries with record numbers between the values entered for the record-number and end-number arguments are displayed. Valid values for the record-number and end-number arguments range from 1 to 2147483647.

user username

Displays log entries attributed to a particular user.

session session-number

(Optional) Displays log entries attributed to a particular session. Valid values for the session-number argument range from 1 to 1000.

statistics

Displays memory usage information for the configuration log.

provisioning

(Optional) Displays configuration log file information as it would appear in a configuration file, rather than in tabular format.

contenttype

(Optional) Specifies the format for the display of configuration change results.

plaintext

Specifies that the configuration change results will be formatted as plain text. This keyword appears only if the contenttype keyword has been entered.

xml

Specifies that the configuration change results will be in eXtensible Markup Language (XML) format. This keyword appears only if the contenttype keyword has been entered.

persistent

(Optional) Displays the persistent configuration changes in a configlet format.


Command Modes

Privileged EXEC

Command History

Release
Modification

12.3(4)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.

12.2(27)SBC

This command was integrated into Cisco IOS Release 12.2(27)SBC.

12.2(33)SRA

The contenttype, plaintext, xml, and persistent keywords were added.

12.4(11)T

This command was integrated into Cisco IOS Release 12.4(11)T.

12.2(33)SXH

This command was integrated into Cisco IOS Release 12.2(33)SXH.


Usage Guidelines

If you do not specify the all keyword, you must specify a record number with the record-number argument. You can optionally specify an end record number with the end-number argument to display a range of records. If you use the end-number argument to specify a record number that does not exist, all records after the starting record number with a record number lower than that specified with the end-number argument are displayed.

Specifying the provisioning keyword results in the display appearing as it would in a configuration file, rather than in tabular format. This output includes commands used to change configuration modes and logged configuration commands. This output can be used to set up another router if desired.

Examples

The following is sample output from the show archive log config command, which displays configuration log entry numbers 1 and 2:

Router# show archive log config 1 2


idx   sess   user@line        Logged command
 1     1     user1@console    logging enable
 2     1     user1@console    logging size 200

Table 1 describes the significant fields shown in the display.

Table 1 show archive log config Field Descriptions 

Field
Description

idx

The record number of the configuration log entry.

sess

The session number associated with the configuration log entry.

user@line

The username of the user who executed the command that generated the configuration log entry.

Logged command

The command that was executed.


The following example results in the display of all configuration log files as they would appear in a configuration file rather than in tabular format. In addition to displaying logged commands, the example shows the commands used to change configuration modes that are required to correctly apply the logged commands.

Router# show archive log config all provisioning

archive
 log config
 logging enable
 logging size 200

The following example results in the display of memory usage statistics for the configuration log:

Router# show archive log config statistics

Config Log Session Info:
 Number of sessions being tracked: 1
 Memory being held: 3910 bytes
 Total memory allocated for session tracking: 3910 bytes
 Total memory freed from session tracking: 0 bytes

Config Log log-queue Info:
 Number of entries in the log-queue: 3
 Memory being held in the log-queue: 671 bytes
 Total memory allocated for log entries: 671 bytes
 Total memory freed from log entries:: 0 bytes

The output is self-explanatory.

The following example shows the contents of the archive log in XML format:

Router# show archive log config all contenttype xml

<?xml version="1.0" encoding="UTF-8"?>
<configLoggerMsg version="1.0">
	<configChanged>
		<changeInfo>
			<user>jdoe</user>
			<async>
				<port>con_0</port>
			</async>
			<when>
				<absoluteTime>2003-04-23T20:25:19.847Z</absoluteTime>
			</when>
		</changeInfo>
		<logComment>begin test test1</logComment>
	</configChanged>
	<configChanged>
		<changeInfo>
			<user>jdoe</user>
			<async>
				<port>con_0</port>
			</async>
			<when>
				<absoluteTime>2003-04-23T20:27:19.847Z</absoluteTime>
			</when>
		</changeInfo>
		<changeItem>
			<context/>
			<enteredCommand>
				<cli>interface e0</cli>
			</enteredCommand>
			<prcResultType>
				<prcSuccess>
					<change>PRC_CHANGE</change>
				</prcSuccess>
			</prcResultType>
			<oldConfigState>
				<cli></cli>
			</oldConfigState>
			<newConfigState>
				<cli>interface e0</cli>
			</newConfigState>
		</changeItem>
		</configChanged>
		<configChanged>
			<changeInfo>
				<user>jdoe</user>
				<async>
					<port>con_0</port>
				</async>
				<when>
						<absoluteTime>2003-04-23T20:28:19.847Z</absoluteTime>
					</when>
				</changeInfo>
				<changeItem>
					<context><cli>interface e0</cli></context>
					<enteredCommand>
						<cli>ip address 10.1.1.1 255.255.255.0</cli>
					</enteredCommand>
					<prcResultType>
						<prcSuccess>
							<change>PRC_CHANGE</change>
						</prcSuccess>
						</prcResultType>
						<oldConfigState/>
						<newConfigState>
							<cli>ip address 10.1.1.1 255.255.255.0</cli>
						</newConfigState>
					</changeItem>
	</configChanged>
	<configChanged>
		<changeInfo>
			<user>jdoe</user>
			<async>
				<port>con_0</port>
			</async>
			<when>
				<absoluteTime>2003-04-23T20:29:19.847Z</absoluteTime>
			</when>
		</changeInfo>
		<logComment>end test test1</logComment>
	</configChanged>
</configLoggerMsg>

Feature Information for Configuration Logger Persistency

Table 2 lists the release history for this feature.

Cisco IOS software images are specific to a Cisco IOS software release, a feature set, and a platform. Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.


Note Table 2 lists only the Cisco IOS software release that introduced support for a given feature in a given Cisco IOS software release train. Unless noted otherwise, subsequent releases of that Cisco IOS software release train also support that feature.


Table 2 Feature Information for Configuration Logger Persistency  

Feature Name
Releases
Feature Information

Configuration Logger Persistency

12.2(33)SRA
12.4(11)T
12.2(33)SXH

The Configuration Logger Persistency feature increases the operational robustness of Cisco IOS configuration and provisioning actions by implementing a "quick-save" functionality. Effective with Cisco IOS Release 12.2(33)SRA, Release 12.4(11)T, and Release 12.2(33)SXH, Cisco IOS software saves just the commands entered since the last startup-config file was generated, rather than saving the entire startup configuration.


Glossary

API—application programming interface.

CAF—command action function.

CDP—Cisco Discovery Protocol.

CSB—Command Status Block.

HA—high-availability architecture.

MIB—Management Information Base.

NAF—NVGEN action function.

NVGEN—nonvolatile generation.

NVRAM—nonvolatile Random Access Memory.

parse chain—A sequence of C language macros defining the syntax of a Cisco IOS command.

RP—Route Processor.

SNMP—Simple Network Management Protocol.

XML—eXtensible Markup Language.


Note See Internetworking Terms and Acronyms for terms not included in this glossary.