Logging to flash disk

Cisco IOS release 12.4(15)T brought (among a plethora of voice features) the logging to non-volatile storage, a nice-sounding name for the ability to write syslog messages into files on your flash memory (or an embedded disk, if you have one). To configure it, use the logging persistent [url directory] [size filesystem-size] [filesize logging-file-size] global configuration command:

  • The directory argument specifies where you want the files to be stored (for example, flash:/logging).
  • The filesystem-size specifies the maximum disk space the logging files can consume (once you exceed the limit, the oldest file is deleted)
  • The logging-file-size parameter specifies the maximum size of each file (once the file grows too large, a new file is created).

Note: You can store the log files on the router's flash memory if it appears as a disk file system (check with the show file systems command). Wouldn't it be great if this feature would also work on USB drives ...

4 comments:

  1. Apparently, persistent logging to USB is not working because it's a FAT/VFAT/NTFS filesystem and these don't allow the ":" character used in the log filenames... Let's try to have this changed...

    ReplyDelete
  2. The “:” character is not a problem, as the flash card is also FAT-formatted (otherwise, it would not be a disk filesystem). The limitations on character usage are imposed by Windows, not by the file format itself. From my perspective, it looks like the router simple doesn't want to use usbflash file system (likewise it doesn't want to use USB drive to serve HTML files from).

    ReplyDelete
  3. Any info on write cycles for Cisco flash memory, both built-in and CF?
    If someone is considering flash for logging this is important parameter.

    ReplyDelete
  4. no persistent logging on 3750s except only for configuration archive commands / logs?

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.