cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
335
Views
5
Helpful
3
Replies

Grabbing specific logs

danny9797
Level 1
Level 1

Hello all,

When issuing the sh log command, it usually gives me logs from june to present. It takes quite some time to go through them to reach the latest logs.

Is there a method or command which allows me to display the logs for just today or for the past week...

Thanks

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Dan

I believe that you may get pretty close to what you are looking for with the "show log | include" feature. The pipe include gives you the ability to match a character string. So if you were to enter

show log | include Aug 24

then it would show only records in the log that have Aug 24 in the log record. This presumes that you have configued your syslog to use timestamp datetime.

HTH

Rick

HTH

Rick

View solution in original post

3 Replies 3

Richard Burts
Hall of Fame
Hall of Fame

Dan

I believe that you may get pretty close to what you are looking for with the "show log | include" feature. The pipe include gives you the ability to match a character string. So if you were to enter

show log | include Aug 24

then it would show only records in the log that have Aug 24 in the log record. This presumes that you have configued your syslog to use timestamp datetime.

HTH

Rick

HTH

Rick

yes that worked great, thanks.

Dan

I am glad that my suggestion helped you. Thank you for using the rating system to indicate that your question was resolved (and thanks for the rating). It makes the forum more useful when people can read a question and can know that they will read an answer that resolved the question. I encourage you to continue your participation in the forum.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco