Sh Logg Command

Unanswered Question
Mar 27th, 2009

Dear Freinds,

If Cisco devices(Switch & Routers)are not giving the latest logs after executing command "sh logg"(when i am excuting this command,then getting some un-proper logs that too for very old time,i.e. not recent log). PLease suggest how to enable the devices for provide latest logs for all interfaces i.e for fluctuations, down, console, clear counter and other necessary latest/recent logs as result for "Sh logg" command.

NOte:- Clock at devices are configured properly.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Richard Burts Fri, 03/27/2009 - 12:24


Perhaps there is something in your question that I am not understanding properly. When you do show logg on a router or switch it displays entries in the logging buffer, starting with the oldest messages. You may need to progress through the log using the space bar to advance to get to the recent entries.

If that is not the issue then perhaps you can clarify so that I understand the issue better.


Rick Tue, 03/31/2009 - 09:00

Hii Rick,

Log captured for "Sh Logg" command is pasted below for your reference:-

Cisco_Switch_4948#sh logg

Syslog logging: enabled (0 messages dropped, 1 messages rate-limited, 0 flushes,

0 overruns, xml disabled, filtering disabled)

Console logging: level debugging, 75 messages logged, xml disabled,

filtering disabled

Monitor logging: level debugging, 0 messages logged, xml disabled,

filtering disabled

Buffer logging: level debugging, 75 messages logged, xml disabled,

filtering disabled

Exception Logging: size (8192 bytes)

Count and timestamp logging messages: disabled

Trap logging: level informational, 79 message lines logged

Log Buffer (4096 bytes):

2w4d: %SYS-5-CONFIG_I: Configured from console by vty0 (


Here The log is showing for 2 weeks Old activity. No recent loggs.

Can u please suggest me which command do i need to execute for getting latest proper loggs.



Richard Burts Tue, 03/31/2009 - 14:33


Your log messages are using the router uptime to timestamp the logs. And that message was generated when the router had been up for 2 weeks and 4 days. And unless you have just done show version to see how long the router has been up, it is difficult to relate that timestamp to what time it really represents. I would suggest that you add this to your router configuration:

service timestamps log datetime localtime

Give that a try and let us know what happens.


Rick Wed, 04/01/2009 - 01:02

Hii Rick,

Yes you r right, Gr8..Thanks. Switch uptime is matching the timing reflecting in log.

uptime is 2 weeks, 5 days, 14 hours, 19 minutes.

Kindly share that what this suggested command will do "service timestamps log datetime localtime" just asking for gathering more info. As this Switch is in production with heavy traffic. hence before executing a command i need to the understand the purpose & scope of this command...please.



Richard Burts Wed, 04/01/2009 - 03:14


This command is a very low impact command and should not have any impact on processing by the switch. What the command does is to change the timestamp of log messages from using uptime (which is the default) to using date and time (which is more useful).




This Discussion