how to see contents of sh log ??????again

Unanswered Question
Jan 14th, 2009

Hi all,

i have switch

Cisco Internetwork Operating System Software

IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA1, RELEASE SOFTWARE (fc1)

Copyright (c) 1986-2004 by cisco Systems, Inc.

Compiled Mon 12-Jul-04 08:18 by madison

Image text-base: 0x80010000, data-base: 0x8055C000

i did the command clear logging to clean the logs after that when i try to do sh log it shows

sh log

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

Console logging: level debugging, 49 messages logged

Monitor logging: level debugging, 0 messages logged

Buffer logging: level debugging, 49 messages logged

Exception Logging: size (4096 bytes)

File logging: disabled

Trap logging: level debugging, 53 message lines logged

Logging to, 53 message lines logged

Log Buffer (65000 bytes):

how can i see the contents of sh log again?

many thanks

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Richard Burts Wed, 01/14/2009 - 10:33


when you enter the command clear log then the switch clears its local logging buffer. When that buffer is cleared then you can no longer see the (previous) content on the switch.

I see from the output that you are logging to a syslog server at 10.370.103. Depending on how the syslog server is configured and what its retention policies are, then you should be able to see you log messages from the switch where they are stored on the syslog server.



Nicholas Matthews Wed, 01/14/2009 - 14:15

The logging buffer by default varies from platform to platform, as does the logging level associated with it.

If you would like to log to your syslog and to your buffer concurrently, you can do that.

You could add the command 'logging buffered 1000000 debugging'. This would add 1 MB of a logging buffer at the highest level. There's a good chance right now that the logging buffer is set to only log errors and lower rather than debugging.



mahesh18 Wed, 01/14/2009 - 21:40


thanks for reply if i use the command

'logging buffered 1000000 debugging'

would this start debugging

ON on switch,will it put load on cpu?

also if i go to config mode and come bACK

and do sh log will that show that i went to

config mode by vty?


Richard Burts Thu, 01/15/2009 - 06:04


If Nick had read carefully in your original post he would have seen this line:

Buffer logging: level debugging, 49 messages logged

which clearly shows that your logging buffer is already operating at level debugging.

To answer your other question, no, setting the logging level to debugging will not start a debugging process and will not cause any extra load on the CPU. All that it does is to enable writing messages to the logging buffer and to control the severity level of messages that will be accepted in the logging buffer. And if you go into config mode and exit from config mode then it should put a line into the logging buffer showing that.



Nicholas Matthews Fri, 01/16/2009 - 18:03

Hi Mahesh,

Logging buffered only allows for the router to use some RAM to put debugs. It's like opening a cardboard box. You're not putting things in it, but you can. And this is a 1 MB cardboard box. Logging to the buffer creates almost no CPU utilization. I've done 'debug all' on routers with this before (albeit not much traffic on them) and the CPU utilization was below 10%.

Yes, going to config mode and exiting is an easy way of testing logging.




This Discussion