登录站点

用户名

密码

如何关闭Cisco2960交换机的系统消息日志提示!

热8已有 45 次阅读  2010-09-12 11:19   标签:  日志  交换机  系统  提示 

      大家通过console口或telnet方式配置Cisco产品时经常会遇到在输入命令时突然出现系统提示信息或状态信息,将我们输入的命令字符一分为二,字符淹没在这些信息中。有时如果系统有问题或我们打开过多的debug会导至我们根本无法正常输入命令。笔记以前也经常遇过这种情况,最近在读Cisco 2960交换机配置手册时找到了相关的处理方法,如下文:

1.     Cisco文档中关于系统消息日志的说明。 (摘自配置文档,英文描述的很清楚也比较简单,没翻译)

Understanding System Message Logging

By default, a switch sends the output from system messages and debug privileged EXEC commands to a logging process. The logging process controls the distribution of logging messages to various destinations, such as the logging buffer, terminal lines, or a UNIX syslog server, depending on your configuration. The process also sends messages to the console.

When the logging process is disabled, messages are sent only to the console. The messages are sent as they are generated, so message and debug output are interspersed with prompts or output from other commands. Messages appear on the console after the process that generated them has finished.

You can set the severity level of the messages to control the type of messages displayed on the consoles and each of the destinations. You can time-stamp log messages or set the syslog source address to enhance real-time debugging and management. For information on possible messages, see the system message guide for this release.

You can access logged system messages by using the switch command-line interface (CLI) or by saving them to a properly configured syslog server. The switch software saves syslog messages in an internal buffer.

You can remotely monitor system messages by viewing the logs on a syslog server or by accessing the switch through Telnet or through the console port.

2.     关闭Consolo口系统信息日志

  2960#conf t       #输入全局配置模式#

  Enter configuration commands, one per line. End with CNTL/Z.

  2960(config)#line console 0    #进入consolo 0接口#

2960(config-line)# no logging synchronous     #关闭非请求的同步信息日志#

2960#write     #保存配置#

3.     关闭telnet终端连接端口的系统信息日志

  2960#conf t       #输入全局配置模式#

  Enter configuration commands, one per line. End with CNTL/Z.

  2960(config)#line vty 0 15    #进入virtual terminal虚拟终端接口#

       2960(config-line)# no logging synchronous     #关闭非请求的同步信息日志#

2960#write     #保存配置#

我们也可使用以下命令完全关闭consolo口下的所有输出信息。

  2960#conf t       #输入全局配置模式#

  Enter configuration commands, one per line. End with CNTL/Z.

2960(config)#no logging consolo    #关闭consolo口系统消息日志输出#

如果想重新启用系统消息日志输出,在全局配置模式下输入logging on即可。

以下是交换机系统消息日志的默认配置供参考!

Table 27-2 Default System Message Logging Configuration 

Feature

Default Setting

System message logging to the console

Enabled.

Console severity

Debugging (and numerically lower levels; see Table 27-3).

Logging file configuration

No filename specified.

Logging buffer size

4096 bytes.

Logging history size

1 message.

Time stamps

Disabled.

Synchronous logging

Disabled.

Logging server

Disabled.

Syslog server IP address

None configured.

Configuration change logger

Disabled

Server facility

Local7 (see Table 27-4).

Server severity

Informational (and numerically lower levels; see Table 27-3).

参考文档:

《Catalyst 2960 Switch Software Configuration Guide, Rel. 12.2(37)SE》 -- Configuring System Message Logging

 

 

 

分享 举报

发表评论 评论 (2 个评论)

  • greatgu 2010-09-12 12:15
    当年考ccie 的第一件事就是敲入no logging console
  • dxmood 2010-09-14 10:53
    有没有让插拔网线的端口up和down信息记录在log中,然后发送到Log server.
涂鸦板