How to disable console logging
Q:
无法
telnet
的交换机,通过
PC
连到交换机的
console
口,看到不断的显示日志,与
log
server
同步的日志信息,导致无法配置任何命令,交换机显示“
low on memory
”
.
相同案例:
Large amount of logging output (most often produced in a debugging process) sent
to a router's console can significantly increase the router's CPU load and even stop the box from
forwarding packets (high-end routers with distributed forwarding architecture are obviously an
exception, but even they can lose routing adjacencies). The reason is very simple - console
interrupt is one of the highest-priority interrupts on the router (otherwise you wouldn't be able
to get a response to the BREAK key on a hung box).
Update January 9th 2007:
The router does not check if a user is logged into the console port or a device (for example, a
terminal) is attached to it; if console logging is enabled, messages are always sent to the console
port (
causing CPU load
).
A
:
console
口不断显示日志,说明有可能是
console
口的
debug
命令被打开了,用
no
debug all
无法关闭,重启交换机运行几分钟之后,交换机就处于死机状态了,无法远程连
接了,必须试用
no logging console
命令来关闭。然后
show logging
查看
console logging
:
disable
。正因为不断显示日志,占用了大量的内存,才导致的内存低。
To stop the console logging, use the
no logging console
global configuration command (highly
recommended for routers that are not usually accessed through the console port) or you might
want to limit the amount of messages sent to the console with the logging console level
configuration command (for example, logging console notifications).
或者在
console
口的配置上面加一个
line con 0
logging synchronous