You can use the service timestamps command to create timestamps on the router’s log files.
Since version 11.3, the Cisco IOS has enabled certain timestamps by default, so most of us have this on.
However, there are additional timestamps options that you can enable as well as places where timestamps are probably off by default.
Here’s an example of turning on all timestamp options for logging and debugging:
service timestamps log datetime localtime msec show-timezone year
service timestamps debugging datetime localtime msec show-timezone year
You can use the service sequence-numbers command to insert sequence numbers into log files. This can be important when log entries are coming really quickly. In fact, they can come so quickly that they appear at the same time. Here’s an example of sequence numbers:
000377: *Mar 17 23:06:33.609: %SYS-5-CONFIG_I: Configured from console by console
(where the 000377 is the sequence number)
We hope this helps.
If you would like to help support the continued development of independent networking, broadband, Wi-Fi, VoIP, and packet analysis content, please consider joining our Patreon community where you will gain access to exclusive technical resources, downloadable labs and PCAPs, bonus course content, troubleshooting guides, and additional member-only material. Comments and technical discussion are always welcomed at our Patreon community or on our Discord server. You can also support our work by simply buying us a coffee — every contribution helps us continue creating practical, real-world network science education for professionals and enthusiasts alike.

