相关阅读
1、使能信息中心
设备运行时,信息中心会通过信息的形式实时记录设备运行情况。只有使能了信息中心功能,系统才会向日志主机、控制台等方向输出系统信息。网络管理员可以存储和查阅输出信息为监控设备的运行情况和诊断网络故障提供依据。
[Huawei]info-center enable
Info: Information center is enabled.
2、重命名信息通道
为了方便记忆和使用,用户可以将各个通道重新命名。用户在命名通道时需注意各个不同的通道名称不可重复,而且最好将通道名称与实际的通道功能对应起来以免混淆。
缺省情况下,各信息通道的名称如下表:
表1 信息通道的缺省通道名 | |
通道编号 | 缺省通道名 |
0 | console |
1 | monitor |
2 | loghost |
3 | trapbuffer |
4 | logbuffer |
5 | snmpagent |
6 | channel6 |
7 | channel7 |
8 | channel8 |
9 | channel9 |
[Huawei]info-center channel ?
INTEGER<0-9> Information channel number
[Huawei]info-center channel 2 ?
name Rename information channel
[Huawei]info-center channel 2 name ?
STRING<1-30> Information channel name (only composed of letters or digits,and must start with a letter)
[Huawei]info-center channel 2 name loghost2
3、对指定的Log或Trap信息进行过滤
当用户不需要关注某些Log或Trap信息时,可以配置信息过滤功能来屏蔽此类信息的输出。配置生效后,信息中心对此类信息就不进行发送处理,信息中心的各个输出方向也都无法获得此信息。
1、配置以ID方式对日志进行过滤
[Huawei]info-center filter-id ?
INTEGER<0-4294967295> Specify the ID of the log to be filtered
bymodule-alias Specify a log by the module and alias
[Huawei]info-center filter-id 40391010
2、 配置通过模块名和助记符进行过滤
[Huawei]info-center filter-id bymodule-alias ?
6OVER4 6OVER4 module
AAA AAA module
ACL ACL module
ADDR ADDR module
ADP-IPSEC ADP-IPSEC module
ANTIATTACK ANTIATTACK module
APS APS module
ARP ARP module
ARPLINK ARPLINK module
ATM ATM module
BFD BFD module
BGP BGP module
BULKSTAT BULKSTAT module
CDM CDM module
CFM CFM module
……………………………………………………………….
WLAN WLAN module
[Huawei]info-center filter-id bymodule-alias CMD ?
CLKCHGREBOOTCANCELED Scheduled reboot will be canceled because [string]changed system clock.
CMD_PRI_REARRG The user chose [STRING] when deciding whether to rearrange the command level.
………………………………………………..
SUPER_CHANGE_SUCCESS OID [oid] Super change successful.
UTCCLOCKCHANGE OID [oid] The system UTC clock changed. (CurrentTime=[STRING])
[Huawei]info-center filter-id bymodule-alias CMD CMD_PRI_REARRG
4、配置输出的Log、Trap和Debug信息的时间戳
如果用户希望为了适应自身习惯或者本地时间而需要调整信息的时间格式和时间精度时,可以配置时间戳。
1、配置时间戳格式(如boot)
[Huawei]info-center timestamp ?
debugging Set the time stamp type of the debug information
log Set the time stamp type of the log information
trap Set the time stamp type of the alarm information
[Huawei]info-center timestamp log ?
boot Information time stamp of relative time type
date Information time stamp of date type
format-date Information time stamp of date another type
none None information time stamp
short-date Information time stamp of short date type: (MM:DD)
[Huawei]info-center timestamp log boot
2、配置时间戳精度
[Huawei]info-center timestamp log date ?
precision-time Information time stamp of precision time type
<cr>
[Huawei]info-center timestamp log date precision-time ?
millisecond Accurate to millisecond
second Accurate to second
tenth-second Accurate to 1/10 second
[Huawei]info-center timestamp log date precision-time millisecond
5、去使能本地日志信息计数功能
随着设备的长时间运行,可能会产生大量的Log信息。
如果用户希望记录到日志缓冲区、日志文件或者发送到控制台和终端的Log信息不携带流水号信息,可以配置去使能Log信息的计数功能。
如果用户希望记录到日志缓冲区、日志文件或者发送到控制台和终端的Log信息重新计数,可以先去使能Log信息的计数功能,然后再使能Log信息的计数功能。
如果用户为了查看是否所有的日志信息都记录到日志缓冲区、日志文件或者发送到控制台和终端,可以使能Log信息的计数功能,使生成的Log信息带有顺序递增的序列号。
如果Log信息发送到日志文件、控制台或者终端,那么日志信息在这些不同的输出方向上独立计数,且日志计数序列号为正向排序,即最早的日志计数序列号为0,越新的日志序列号越大。
如果Log信息发送到日志缓冲区,那么日志计数序列号为逆向排序,即最新的日志计数序列号为0,越老的日志序列号越大。
1、查看log日志缓存
<Huawei>display logbuffer
Logging buffer configuration and contents : enabled
Allowed max buffer size : 1024
Actual buffer size : 512
Channel number : 4 , Channel name : logbuffer
Dropped messages : 0
Overwritten messages : 0
Current messages : 1
Oct 6 2016 09:55:43-08:00 Huawei %%01GTL/4/STATECHANGED(l)[0]:License state cha
nged from Default to Default.
2、去使能Log信息的计数功能
[Huawei]info-center local log-counter disable
6、配置海量log日志抑制功能
设备运行过程中,当连续产生具有相同日志ID的大量日志时,对信息中心的处理造成冲击,会影响其他日志的记录,严重时可能对运行业务带来影响。
信息中心以单条日志为单位进行日志的流量监控,当监控周期内日志的流量持续超过阈值时,对该日志进行抑制,每秒内只处理阈值条日志,超过阈值的日志丢弃;当日志发送流量降低到阈值以下,经过5倍监控周期后,解除对日志的抑制。
1、设置信息中心每秒处理单条日志的阈值。
信息中心日志缺省采用统一阈值(30条每秒),但是个别日志根据其使用场景选取的缺省值会高于50条。但是用户可以通过手工配置所有日志的阈值。如果阈值设置过小可能导致一些日志丢失。如果阈值设置过大可能导致信息中心不能分离出海量日志。
[Huawei]info-center rate-limit ?
except Specify the log which that rate limit won't take effect on
global-threshold Value of threshold, the default is 400 per second
monitor-period Specify the monitor period (in seconds) for rate limit. The default is 3 seconds
threshold Specify the maximum number of a certain log that the
information center can process in one second. If the log
is not specified, the threshold takes effect on all logs.
The default is 30 per second
[Huawei]info-center rate-limit threshold ?
INTEGER<1-500> Value of the threshold, the default is 30 per second
[Huawei]info-center rate-limit threshold 30 ?
byinfoid Specify a log by the information ID # 指定日志ID
bymodule-alias Specify a log by the module and alias # 指定模块名称指定日志
<cr>
2、配置信息中心每秒处理日志总数
[Huawei]info-center rate-limit ?
except Specify the log which that rate limit won't take effect on
global-threshold Value of threshold, the default is 400 per second
monitor-period Specify the monitor period (in seconds) for rate limit. The default is 3 seconds
threshold Specify the maximum number of a certain log that the
information center can process in one second. If the log
is not specified, the threshold takes effect on all logs.
The default is 30 per second
[Huawei]info-center rate-limit global-threshold ?
INTEGER<100-1000> Specify the maximum number of logs that the information
center can process in one second. The default value is
400 per second
3、配置信息中心进行速率抑制的监控周期
[Huawei]info-center rate-limit monitor-period ?
INTEGER<1-60> Value of the threshold, the default is 3 per second
4、配置日志不受信息中心日志速率抑制。
当某日志拥有很好的机制保障不会发生海量日志时,可以使用此命令解除信息中心日志速率抑制对其可能造成的影响。使用该命令配置后,信息中心的日志速率抑制对其不再产生监控作用。
[Huawei]info-center rate-limit except ?
byinfoid Specify a log by the information ID
bymodule-alias Specify a log by the module and alias
[Huawei]info-center rate-limit except byinfoid ?
INTEGER<0-4294967295> Information ID
7、配置连续重复log日志的统计抑制功能
在系统中,日志的触发由各个业务模块的处理流程控制,触发的信息量也在业务模块的流程中控制,信息中心负责对接收到的信息进行处理。
但是如ARP、VRRP等业务模块在某些场景下会短时间产生大量重复日志,这时可以使能连续重复日志的统计抑制功能,避免信息中心受到冲击而影响其他日志的记录。
只有日志ID和全部参数完全相同,且中间无其它日志的两条日志,才可判定为连续重复日志。
[Huawei]info-center statistic-suppress enable
暂无评论内容