Contents

Logging to Local Nonvolatile Storage (ATA Disk)

The Logging to Local Nonvolatile Storage (ATA Disk) feature enables system logging messages to be saved on an advanced technology attachment (ATA) flash disk. Messages saved on an ATA drive persist after a device is rebooted.

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

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

Prerequisites for Logging to Local Nonvolatile Storage (ATA Disk)

The logging buffered Command Must Be Enabled

Before the Logging to Local Nonvolatile Storage (ATA Disk) 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, see the "Writing Logging Messages to an ATA Disk" and the "Related Documents" sections.

Restrictions for Logging to Local Nonvolatile Storage (ATA Disk)

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, see the “Copying Logging Messages to an External Disk” section.


Note


Logging to local nonvolatile storage can use up to 2 GB of storage space.


Information About Logging to Local Nonvolatile Storage (ATA Disk)

System Logging Messages

System logging messages include error and debug messages generated by application programming interfaces (APIs) on the device. Typically, logging messages are stored in a device’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 device reboots.

ATA Flash Disks

ATA flash disks are PC cards included with some Cisco devices, 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. Logging messages written to an ATA flash disk persist when the device reboots.

How to Configure Logging to Local Nonvolatile Storage (ATA Disk)

Writing Logging Messages to an ATA Disk

Perform this task to enable the Logging to Local Nonvolatile Storage (ATA Disk) feature and write logging messages to an ATA flash disk.

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] [batch batch-size]


DETAILED STEPS
     Command or ActionPurpose
    Step 1 enable


    Example:
    Device> enable
     

    Enables privileged EXEC mode.

    • Enter your password if prompted.
     
    Step 2 configure terminal


    Example:
    Device# configure terminal
     

    Enables global configuration mode.

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


    Example:
    Device(config)# logging buffered
     

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

    • The optional buffer-size argument specifies the size of the buffer. Range is from 4096 to 4294967295. The default size varies by platform.
    • The optional severity-level argument limits the logging of messages to the buffer to those no less severe than the specified level.
     
    Step 4 logging persistent [url disk0:/directory | disk1:/directory] [size filesystem-size] [filesize logging-file-size] [batch batch-size]


    Example:
    Device(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384 batch 5098
     

    Writes logging messages from the memory buffer to the specified directory on the device’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 is saved.
    • The filename format of log files is log_MM:DD:YYYY::hh:mm:ss (for example, log_06:10:2012::07:42:14).

    For Release 12.4(20)T and later releases, the filename format is changed to log_YYYYMMDD-hhmmss (for example, log_20080610-074214).

    This feature supports only one log file per second due to its filename format, which contains a timestamp suffix down to the seconds level.

     

    Copying Logging Messages to an External Disk

    Perform this task to copy logging messages from the ATA flash disk to an external disk.

    SUMMARY STEPS

      1.    enable

      2.    copy source-url destination-url


    DETAILED STEPS
       Command or ActionPurpose
      Step 1 enable


      Example:
      Device> enable
       

      Enables privileged EXEC mode.

      • Enter your password if prompted.
       
      Step 2 copy source-url destination-url


      Example:
      Device# copy disk0:/syslog ftp://myuser/mypass@192.168.1.129/syslog
       

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

       

      Configuration Examples for Logging to Local Nonvolatile Storage (ATA Disk)

      Example: Writing Logging Messages to an ATA Disk

      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:

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

      Example: Copying Logging Messages to an External Disk

      The following example shows how to copy logging messages from the device’s ATA flash disk to an external disk:

      Device# copy disk0:/syslog ftp://myuser/mypass@192.168.1.129/syslog
      

      Additional References

      Related Documents

      Related Topic

      Document Title

      copy command

      Cisco IOS Configuration Fundamentals Command Reference

      Network management commands (including logging commands): complete command syntax, defaults, command mode, command history, usage guidelines, and examples

      Cisco IOS Network Management Command Reference

      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

      Technical Assistance

      Description

      Link

      The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

      http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

      Feature Information for Logging to Local Nonvolatile Storage (ATA Disk)

      The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

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

      Table 1 Feature Information for Logging to Local Nonvolatile Storage (ATA Disk)

      Feature Name

      Releases

      Feature Information

      Logging to Local Nonvolatile Storage (ATA Disk)

      12.0(26)S 12.2(25)S 12.2(28)SB 12.2(33)SRB 12.4(15)T 12.2(33)SB 12.4(20)T

      The Logging to Local Nonvolatile Storage (ATA Disk) feature enables system logging messages to be saved on an advanced technology attachment (ATA) flash disk. Messages saved on an ATA drive persist after a device is rebooted.

      The following commands were introduced or modified: logging persistent, logging buffered.


      Logging to Local Nonvolatile Storage (ATA Disk)

      Logging to Local Nonvolatile Storage (ATA Disk)

      The Logging to Local Nonvolatile Storage (ATA Disk) feature enables system logging messages to be saved on an advanced technology attachment (ATA) flash disk. Messages saved on an ATA drive persist after a device is rebooted.

      Finding Feature Information

      Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

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

      Prerequisites for Logging to Local Nonvolatile Storage (ATA Disk)

      The logging buffered Command Must Be Enabled

      Before the Logging to Local Nonvolatile Storage (ATA Disk) 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, see the "Writing Logging Messages to an ATA Disk" and the "Related Documents" sections.

      Restrictions for Logging to Local Nonvolatile Storage (ATA Disk)

      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, see the “Copying Logging Messages to an External Disk” section.


      Note


      Logging to local nonvolatile storage can use up to 2 GB of storage space.


      Information About Logging to Local Nonvolatile Storage (ATA Disk)

      System Logging Messages

      System logging messages include error and debug messages generated by application programming interfaces (APIs) on the device. Typically, logging messages are stored in a device’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 device reboots.

      ATA Flash Disks

      ATA flash disks are PC cards included with some Cisco devices, 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. Logging messages written to an ATA flash disk persist when the device reboots.

      How to Configure Logging to Local Nonvolatile Storage (ATA Disk)

      Writing Logging Messages to an ATA Disk

      Perform this task to enable the Logging to Local Nonvolatile Storage (ATA Disk) feature and write logging messages to an ATA flash disk.

      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] [batch batch-size]


      DETAILED STEPS
         Command or ActionPurpose
        Step 1 enable


        Example:
        Device> enable
         

        Enables privileged EXEC mode.

        • Enter your password if prompted.
         
        Step 2 configure terminal


        Example:
        Device# configure terminal
         

        Enables global configuration mode.

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


        Example:
        Device(config)# logging buffered
         

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

        • The optional buffer-size argument specifies the size of the buffer. Range is from 4096 to 4294967295. The default size varies by platform.
        • The optional severity-level argument limits the logging of messages to the buffer to those no less severe than the specified level.
         
        Step 4 logging persistent [url disk0:/directory | disk1:/directory] [size filesystem-size] [filesize logging-file-size] [batch batch-size]


        Example:
        Device(config)# logging persistent url disk0:/syslog size 134217728 filesize 16384 batch 5098
         

        Writes logging messages from the memory buffer to the specified directory on the device’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 is saved.
        • The filename format of log files is log_MM:DD:YYYY::hh:mm:ss (for example, log_06:10:2012::07:42:14).

        For Release 12.4(20)T and later releases, the filename format is changed to log_YYYYMMDD-hhmmss (for example, log_20080610-074214).

        This feature supports only one log file per second due to its filename format, which contains a timestamp suffix down to the seconds level.

         

        Copying Logging Messages to an External Disk

        Perform this task to copy logging messages from the ATA flash disk to an external disk.

        SUMMARY STEPS

          1.    enable

          2.    copy source-url destination-url


        DETAILED STEPS
           Command or ActionPurpose
          Step 1 enable


          Example:
          Device> enable
           

          Enables privileged EXEC mode.

          • Enter your password if prompted.
           
          Step 2 copy source-url destination-url


          Example:
          Device# copy disk0:/syslog ftp://myuser/mypass@192.168.1.129/syslog
           

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

           

          Configuration Examples for Logging to Local Nonvolatile Storage (ATA Disk)

          Example: Writing Logging Messages to an ATA Disk

          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:

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

          Example: Copying Logging Messages to an External Disk

          The following example shows how to copy logging messages from the device’s ATA flash disk to an external disk:

          Device# copy disk0:/syslog ftp://myuser/mypass@192.168.1.129/syslog
          

          Additional References

          Related Documents

          Related Topic

          Document Title

          copy command

          Cisco IOS Configuration Fundamentals Command Reference

          Network management commands (including logging commands): complete command syntax, defaults, command mode, command history, usage guidelines, and examples

          Cisco IOS Network Management Command Reference

          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

          Technical Assistance

          Description

          Link

          The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

          http:/​/​www.cisco.com/​cisco/​web/​support/​index.html

          Feature Information for Logging to Local Nonvolatile Storage (ATA Disk)

          The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

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

          Table 1 Feature Information for Logging to Local Nonvolatile Storage (ATA Disk)

          Feature Name

          Releases

          Feature Information

          Logging to Local Nonvolatile Storage (ATA Disk)

          12.0(26)S 12.2(25)S 12.2(28)SB 12.2(33)SRB 12.4(15)T 12.2(33)SB 12.4(20)T

          The Logging to Local Nonvolatile Storage (ATA Disk) feature enables system logging messages to be saved on an advanced technology attachment (ATA) flash disk. Messages saved on an ATA drive persist after a device is rebooted.

          The following commands were introduced or modified: logging persistent, logging buffered.