02-26-2015 08:17 AM - edited 03-05-2019 12:53 AM
Hello,
I normally log to flash, so if the switch loses power I don't lose the logs, on version 12.x I normally use:
logging persistent url flash:syslogs filesize 32768 size 131072
But on this 15.x switch I can't get it to work, I've tried the above and made a new direcotry called LOGS, but it doesn't fill up:
logging file flash:/syslog 32768 31744 debugging
For the rest I add
Logging on
logging trap informational
logging console informational
logging monitor informational
Logging buffered 40960 debugging
Any ideas?
02-26-2015 09:26 AM
Not done this before but a couple of things -
1) as far as I understand it you need a file not a directory name
2) if you want to use a file in the syslog directory then you need to specify it eg.
logging file flash:/syslog/<filename> 32768 31744 debugging
assuming you have a directory called syslog in flash.
Jon
02-26-2015 11:02 AM
Thanks, I've added this:
logging file flash:/LOGS/logs 32768 31744 debugging
Will it just keep generate logs based on the max an min, seems to be a single file called logs there at the moment will stuff in it.
02-26-2015 11:09 AM
Yes, it will keep writing to that file with any new logging messages.
I'm not sure what it does when it reaches the max ie. does it start overwriting or does it just stop logging any new messages.
Do you know what happened on your other switches if the log file filled up ?
Jon
02-26-2015 11:10 AM
They create new ones when they hit the max size and do a sort of round robin so the flash never fills up.
Hopefully the flash won't will run out of space, what will happen?
02-26-2015 11:57 AM
They create new ones but what happens to the existing ones ie. if new ones are being created eventually I would have thought space would run out..
If the space runs out it simply won't be able to create new file as far as I know.
Jon
09-15-2022 09:54 AM
- Before logging messages are written to a file on the bootflash or harddisk, the Cisco 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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide