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.
    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.
  2. sudo tail -f /var/log/messages
    Replies
    1. Yeah, that totally works on Cisco IOS ;) Unfortunately IOS is not running Linux.
Add comment
Sidebar