ANNOUNCEMENT - The community will be down for maintenace this Thursday August 13 from 12:00 AM PT to 02:00 AM PT. As a precaution save your work.
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
187
Views
0
Helpful
2
Replies
Highlighted
Beginner

Documentation for syslog logging persistent

I want to write syslogs to flash. But The only document I found online is:

 

https://www.cisco.com/c/en/us/support/docs/voice/telephony-signaling/212102-Configure-Persistent-Logging-on-Cisco-IO.html

 

Which doesn't say much about what options are available and what it does.

 

(config)#logging persistent ?

  batch      Set batch size for writing to persistent storage

  filesize   Set size of individual log files

  immediate  Write log entry to storage immediately (no buffering).

  notify     Notify when show logging [persistent] is activated.

  protected  Eliminates manipulation on logging-persistent files.

  size       Set disk space for writing log messages

  threshold  Set threshold for logging persistent

  url        URL to store logging messages

  <cr>

 

Specifically, I am not sure what batch and threshold are used. Also, if I reload, the unwritten logs in buffer are gone. Is there a way to flush the logs manually?

2 REPLIES 2
Highlighted
Hall of Fame Master

Re: Documentation for syslog logging persistent

Hello @pingduck ,

the document provides examples and explanations of almost all parameters.

 

The most important is threshold that establish the disk quota you can use for log files

When exceeding quota the oldest log file will be deleted to leave space to the newest log file.

 

The network device flash disk is not intended for this kind of use.

 

It would be better to have an external syslog server  to a server that may be co-located if you have concerns about connectiivty to a branch site (i.e. you know this branch site connectivity is not stable).

 

If you have ever examined a show tech of a Cisco device you will see that messages are written to the local buffer and sent to external syslog before going down unless a power outage happens and there is no UPS protection.

 

Be also aware that the document refers to IOS, the current network devices run IOS XE or NX-OS or IOS XR.

 

Hope to help

Giuseppe

 

Highlighted
Beginner

Re: Documentation for syslog logging persistent

I have to disagree with you that the document is comprehensive. Parameters like "protected", "immediate", "notify", "alert", even "batch" aren't explained at all. That is more than 2/3 of the available parameters. Not to mention this is the only document I found. I can't even find the logging persistent command in CLI reference!

 

The "size" and "threshold" parameters are also not clear. Through other means I figured out threshold is a percentage. But what does the "threshold" applies to? Is it to the buffer in RAM? Or threshold of total size? Or threshold to batch size? The document says:

 

"When the allocation threshold is exceeded, the oldest log file in the directory is deleted to make room for new system logging messages"

 

I don't think that refers the threshold parameter. As it just have to remove 1 oldest log when the limit is reached.

 

I am using it on a Classic IOS router. But the same CLI is available on IOS-XE as well.