Your browser failed to load CSS style sheets. Your browser or web proxy might not support elliptic-curve TLS

Building network automation solutions

6 week online course

Start now!
back to overview

Remove timestamps from syslog messages

The ability to replace router uptime with date and time in the logging messages with the service timestamps log datetime command was present in IOS for a long time, but I was always annoyed at timestamps when collecting syslog messages for demonstration purposes. The command to turn them off has also been available "forever", but was too obvious for me to try out ... the no service timestamps log command.

4 comments:

  1. Hello Ivan,

    How can I print only e.g. the latest 10 messages from the "show logging" output?

    Thanks in advance.

    ReplyDelete
    Replies
    1. Sometimes it takes 8 years to reply... ;) You could either limit the logging buffer to some ridiculously small value or write a Tcl script (I published a few examples on this blog) that would execute "show logging" and only display the last few entries.

      Delete
  2. sudo tail -f /var/log/messages

    ReplyDelete
    Replies
    1. Yeah, that totally works on Cisco IOS ;) Unfortunately IOS is not running Linux.

      Delete

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

Sidebar