Grabbing specific logs

Answered Question
Aug 24th, 2007
User Badges:

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

Correct Answer by Richard Burts about 9 years 9 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Richard Burts Fri, 08/24/2007 - 06:19
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

Richard Burts Fri, 08/24/2007 - 06:37
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

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

Actions

This Discussion