cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
758
Views
10
Helpful
7
Replies

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

mahesh18
Level 6
Level 6

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 10.3.70.103, 53 message lines logged

Log Buffer (65000 bytes):

how can i see the contents of sh log again?

many thanks

7 Replies 7

Richard Burts
Hall of Fame
Hall of Fame

Mahesh

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.

HTH

Rick

HTH

Rick

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.

hth,

nick

hi,

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?

thanks

Mahesh

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.

HTH

Rick

HTH

Rick

Yes, but still very common :)

-nick

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.

hth,

nick

Hi

thanks for great reply

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card