Guest

Cisco IOS Software Releases 12.0 S

SYSLOG Writing to Flash

  • Viewing Options

  • PDF (229.2 KB)
  • Feedback
SYSLOG Writing to Flash

Table Of Contents

SYSLOG Writing to Flash

Contents

Restrictions for SYSLOG Writing to Flash

Information About SYSLOG Writing to Flash

System Logging Messages

ATA Flash Disks

How to Configure SYSLOG Writing to Flash

Writing Logging Messages to an ATA Disk

Copying Logging Messages to an External Disk

Configuration Examples for SYSLOG Writing to Flash

Writing Logging Messages to an ATA Disk: Example

Copying Logging Messages to an External Disk: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

logging persistent


SYSLOG Writing to Flash


The SYSLOG Writing to Flash feature enables system logging messages to be saved on the router's advanced technology attachment (ATA) Flash disk. Messages saved on the ATA drive persist even when the router is rebooted.

Release
Modification

12.0(26)S

This feature was introduced.


Feature History for the SYSLOG Writing to Flash Feature

Finding Support Information for Platforms and Cisco IOS Software Images

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.

Contents

Restrictions for SYSLOG Writing to Flash

Information About SYSLOG Writing to Flash

How to Configure SYSLOG Writing to Flash

Configuration Examples for SYSLOG Writing to Flash

Additional References

Command Reference

Restrictions for SYSLOG Writing to Flash

The Logging buffered Must Be Enabled

Before the SYSLOG Writing to Flash feature can be enabled with the logging persistent command, you must enable the logging of messages to an internal buffer with the logging buffered command. For additional information, refer to the "Writing Logging Messages to an ATA Disk" section, and to the "Related Documents" section.

Available ATA Disk Space Constrains the Size and Number of Stored Log Files

The amount of ATA disk space allocated to system logging messages constrains the number of logging files that can be stored. When the allocation threshold is passed, the oldest log file in the directory is deleted to make room for new system logging messages. To permanently store system logging messages, you must archive them to an external device. For more information, refer to the "Copying Logging Messages to an External Disk" section.

Information About SYSLOG Writing to Flash

The SYSLOG Writing to Flash feature adds a router's ATA disk as a storage destination for logging messages. When using this feature, be sure to understand the following concepts:

System Logging Messages

ATA Flash Disks

System Logging Messages

System logging messages include error and debug messages generated by application programming interfaces (APIs) on the router. Typically, logging messages are stored in a router's memory buffer; when the buffer is full, older messages are overwritten by new messages. All logging messages are erased from the memory buffer when the router reboots.

ATA Flash Disks

ATA Flash disks are PC cards included with some Cisco routers, which are used to provide nonvolatile data storage. The greater the capacity of the ATA Flash disk, the more data, such as logging messages, it can hold. Log messages written to an ATA Flash disk persist when the router reboots.

How to Configure SYSLOG Writing to Flash

This section contains the following procedures:

Writing Logging Messages to an ATA Disk (required)

Copying Logging Messages to an External Disk (optional)

Writing Logging Messages to an ATA Disk

To to enable the SYSLOG Writing to Flash feature and write logging messages to an ATA disk, perform the following steps:

SUMMARY STEPS

1. enable

2. configure terminal

3. logging buffered [buffer-size | severity-level]

4. logging persistent [url {disk0:/directory | disk1:/directory}] [size filesystem-size]
[
filesize logging-file-size]

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

Enables global configuration mode.

Step 3 

logging buffered [buffer-size | severity-level]

Example:

Router(config)#> logging buffered

Enable system message logging to a local buffer and limits messages logged to the buffer based on severity.

The optional buffer-size argument specified the size of the buffer from 4096 to 4,294,967,295 bytes. The default size varies by platform.

The optional severity-level argument limits the logging of messages to the buffer to a specified level.

Step 4 

logging persistent [url {disk0:/directory | disk1:/directory}] [size filesystem-size] [filesize logging-file-size]

Example:

Router(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384

Writes logging messages from the memory buffer to the specified directory on the router's ATA disk.

Before logging messages are written to a file on the ATA disk, the Cisco IOS software checks to see if there is sufficient disk space. If not, the oldest file of logging messages (by timestamp) is deleted, and the current file saved.

The filename format is log_month:day:year::time. For example: log_08:10:2003::07:42:14.

Copying Logging Messages to an External Disk

To copy logging messages from the ATA disk to an external disk, perform the following steps:

SUMMARY STEPS

1. enable

2. copy

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

copy

Example:

Router# copy disk0:/syslog ftp://myuser/mypass@192.21.1.129/syslog

Copies the specified file or directory on the ATA Flash disk via FTP to the specified URL.

Configuration Examples for SYSLOG Writing to Flash

This section contains the following configuration examples:

Writing Logging Messages to an ATA Disk: Example

Copying Logging Messages to an External Disk: Example

Writing Logging Messages to an ATA Disk: Example

The following example shows how to write up to 134217728 bytes (128 MB) of logging messages to the syslog directory of disk 0, specifying a file size of 16384 bytes:

Router(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384

Copying Logging Messages to an External Disk: Example

To copy logging messages from the router's ATA disk to an external disk, use the copy command:

Router# copy disk0:/syslog ftp://myuser/mypass@192.21.1.129/syslog

Additional References

The following sections provide references to SYSLOG Writing to Flash.

Related Documents

Related Topic
Document Title

copy command

"Router Memory Commands" chapter in the Cisco IOS Configuration Fundamentals Command Reference, Release 12.0

logging buffered command

"Troubleshooting Commands" chapter in the Cisco IOS Configuration Fundamentals Command Reference, Release 12.0


Standards

Standards
Title

No new or modified standards are supported by this feature and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified MIBs are supported by this feature and support for existing MIBs has not been modified 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

RFCs
Title

No new or modified RFCs are supported by this feature and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can logging in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents new commands. All other commands used with this feature are documented in the Cisco IOS Release 12.0 command reference publications.

logging persistent

logging persistent

To enable the storage of logging messages on the router's advanced technology attachment (ATA) disk, use the logging persistent command in global configuration mode. To disable logging message storage on the ATA disk, use the no form of this command.

logging persistent [url {disk0:/directory | disk1:/directory}] [size filesystem-size]
[filesize logging-file-size]

no logging persistent

Syntax Description

url

(Optional) Any supported local Cisco IOS file system location.

disk0:/directory

Directory on disk 0 where syslog messages are saved.

disk1:/directory

Directory on disk 1 where syslog messages are saved.

size filesystem-size

(Optional) Amount of disk space allocated to syslog messages in bytes.

Minimum value is 16384.

Maximum value is the total amount of available disk space.

Default value is 10% of total disk space.

filesize logging-file-size

(Optional) Size of individual logging files in bytes.

Minimum value is 8192.

Maximum is the total amount of available disk space.

Default value is 262144.


Defaults

url: disk0:/syslog

size filesystem-size: 10% of total space

filesize logging-file-size: 262144

Command Modes

Global configuration

Command History

Release
Modification

12.0(26)S

This command was introduced.


Usage Guidelines

The logging persistent command enables the storage of syslog data on a router's ATA Flash disk. Because the syslog data must be copied from the router's internal memory buffer, make sure to enable logging buffered prior to enabling logging persistent.


Note Any filtering of syslog messages written to the router's internal memory buffer results in filtering of syslog messages written to the router's ATA Flash disk.


Examples

The following example shows how to write up to 134217728 bytes (128 MB) of logging messages to the syslog directory of disk 0, with a file size of 16384 bytes:

Router(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384

Related Commands

Command
Description

logging buffered

Saves syslog messages in router memory.