01-14-2009 10:17 AM - edited 03-06-2019 03:26 AM
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
01-14-2009 10:33 AM
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
01-14-2009 02:15 PM
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
01-14-2009 09:40 PM
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
01-15-2009 06:04 AM
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
01-16-2009 06:00 PM
Yes, but still very common :)
-nick
01-16-2009 06:03 PM
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
01-16-2009 08:25 PM
Hi
thanks for great reply
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide