No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Command Reference

S1720, S2700, S5700, and S6720 V200R011C10

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Information Center Configuration Commands

Information Center Configuration Commands

Command Support

Commands provided in this section and all the parameters in the commands are supported by all switch models by default, unless otherwise specified. For details, see specific commands.

display buffer

Function

The display buffer command displays the statistics about logs cached in the buffer.

Format

display buffer [ feature-name [ buffer-name ] ]

Parameters

Parameter Description Value
feature-name Name of the buffer dedicated to caching logs of a specific feature -
buffer-name Name of the buffer -

Views

All views

Default Level

3: Management level

Usage Guidelines

On the device, service modules generate logs and control the log volumes. The information center processes the received logs.

When the number of logs that are generated within a specified period (T) exceeds the threshold, the service module, with the buffer mechanism, saves extra logs to the buffer and does not send them to the information center.

You can run the display buffer command to view the statistics about log information in the buffer.

Example

# View the statistics about logs cached in the buffer on the service module L2IF.

<HUAWEI> display buffer L2IF
Feature name : L2IF                                                                                                                 
Buffer number : 1                                                                                                                   
Buffer name : CALLBACKFAIL                                                                                                          
  Buffer ID                    : 35                                                                                                 
  Max length of message        : 256                                                                                                
  Max number of message        : 5                                                                                                  
  Time threshold(s)            : 3600                                                                                               
  Store lastest message number : 0                                                                                                  
  Total receive number         : 76                                                                                                 
  Total process number         : 5                                                                                                  
  Max rate record              : 0 / 3600(s)                                                                                        
  Max rate timestamp           : 0-00-00 00:00:00
Table 3-36  Description of the display buffer command output

Item

Description

Feature name

Feature name

Buffer number

Buffer number

Buffer name

Buffer name

Buffer ID

Buffer ID

Max length of message

Max length of message

Max number of message

Max number of message

Time threshold(s)

Time threshold

Store lastest message number

Number of messages saved to non-volatile memory

Total receive number

Total receive number

Total process number

Total process number

Max rate record

Max rate record

Max rate timestamp

Max rate timestamp

display channel

Function

The display channel command displays the channel configuration.

Format

display channel [ channel-number | channel-name ]

Parameters

Parameter Description Value
channel-number

Specifies the number of a channel.

The value is an integer than ranges from 0 to 9. That is, the system has 10 channels. Channels 0 to 5 have default names and the six channels map to six different output directions.

Table 3-37 shows the relationship between channels and output directions.

channel-name

Specifies the name of a channel.

The value is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.
Table 3-37  Relationship between channel and output directions

Channel Number

Default Channel Name

Output Direction

Description

0

console

console

Console that can receive logs, traps, and debugging messages.

1

monitor

monitor

VTY terminal that can receive logs, traps, and debugging messages, which facilitates remote maintenance.

2

loghost

loghost

Log host that can receive . By default, information is saved on the log host in file format for easy reference.

3

trapbuffer

trapbuffer

Trap buffer that can receive traps.

4

logbuffer

logbuffer

Log buffer that can receive logs.

5

snmpagent

snmpagent

SNMP agent that can receive traps.

6

channel6

Unspecified

Reserved. You can specify to which destination this channel can output information.

7

channel7

Unspecified

Reserved. You can specify to which destination this channel can output information.

8

channel8

Unspecified

Reserved. You can specify to which destination this channel can output information.

9

channel9

Unspecified

Reserved. You can specify to which destination this channel can output information.

Views

All views

Default Level

3: Management level

Usage Guidelines

The display channel command displays the channel configuration.

When using this command, note the following points:

  • When channel-number or channel-name is specified, the display channel command displays the specified channel that information passes through and information severity.
  • When channel-number or channel-name is not specified, the display channel command displays all the channels that information passes through and information severity.

Example

# Display the configuration of channel 0.

<HUAWEI> display channel 0
channel number:0, channel name:console                                          
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      warning       Y      debugging     Y      debugging    

# Display the configuration of all channels.

<HUAWEI> display channel
channel number:0, channel name:console                                          
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      warning       Y      debugging     Y      debugging    
                                                                                
channel number:1, channel name:monitor                                          
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      warning       Y      debugging     Y      debugging    
                                                                                
channel number:2, channel name:loghost                                          
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      informational Y      debugging     N      debugging    
                                                                                
channel number:3, channel name:trapbuffer                                       
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  N      informational Y      debugging     N      debugging    
                                                                                
channel number:4, channel name:logbuffer                                        
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      warning       N      debugging     N      debugging    
                                                                                
channel number:5, channel name:snmpagent                                        
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  N      debugging     Y      debugging     N      debugging    
                                                                                
channel number:6, channel name:channel6                                         
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      debugging     Y      debugging     N      debugging    
                                                                                
channel number:7, channel name:channel7                                         
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      debugging     Y      debugging     N      debugging    
                                                                                
channel number:8, channel name:channel8                                         
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      debugging     Y      debugging     N      debugging    
                                                                                
channel number:9, channel name:channel9                                         
MODU_ID  NAME     ENABLE LOG_LEVEL     ENABLE TRAP_LEVEL    ENABLE DEBUG_LEVEL  
ffff0000 default  Y      debugging     Y      debugging     N      debugging    
Table 3-38  Description of the display channel command output

Item

Description

channel number

Channel number, which ranges from 0 to 9.

channel name

Channel name. Table 3-37 lists default channel names.

To set the channel name, run the info-center channel name command.

MODU_ID

Module ID. The default value is ffff0000.

NAME

Module name. The default value is default.

To set the module name, run the info-center source channel command.

ENABLE

Whether logs/traps/debugging messages are allowed to pass through a channel:
  • Y
  • N

To specify the channel, run the info-center source channel command.

LOG_LEVEL/TRAP_LEVEL/DEBUG_LEVEL

Lowest severity of output logs/traps/debugging messages. The following severities are listed in descending order of priority:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

To set the lowest severity of output logs, run the info-center source channel command.

display debugging

Function

The display debugging command displays debugging messages allowed to be sent by the device.

Format

display debugging [ interface interface-type interface-number ] [ module-name ]

display debugging interface all

display debugging slot slot-id vcpu vcpu

NOTE:

Only the S5720HI supports the vcpu vcpu parameter.

Parameters

Parameter Description Value
interface interface-type interface-number Specifies the interface type and number. -
all Display debugging information on all interfaces. -
module-name Displays debugging messages sent by a specified module such as the DHCP module. If this parameter is not specified, all debugging messages allowed to be sent are displayed. Enumerated type. The value depends on the registered module.
slot slot-id Specifies a slot ID. The value is an integer, and the value range depends on the device configuration.
vcpu vcpu Specifies the virtual CPU number. Specify the vcpu parameter based on the hardware configuration.

Views

All views

Default Level

3: Management level

Usage Guidelines

Usage Scenario

Using the display debugging command, you can display the enabled debugging. If no parameters are specified, the display debugging command displays global debugging information.

Debugging affects device performance. The display debugging command displays debugging messages allowed to be sent by the Switch.

Prerequisites

By default, sending debugging messages is prohibited. The debugging of a specified module has been enabled.

Example

# Display debugging messages allowed to be sent by the Switch.

<HUAWEI> debugging acl4 all
<HUAWEI> display debugging
ACL4 event debugging switch is on                                               
ACL4 packet debugging switch is on
Table 3-39  Description of the display debugging command output

Item

Description

ACL4 event debugging switch is on

Event debugging is enabled for the ACL4 module.

ACL4 packet debugging switch is on

Packet debugging is enabled for the ACL4 module.

display info-center

Function

The display info-center command displays the output configuration of the information center.

Format

display info-center

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

You can run the display info-center command to display all information recorded in the information center.

When a module is specified, you can view all information about the module recorded in the information center.

Example

# Display output configuration of the information center.

<HUAWEI> display info-center
Information Center:enabled                                                      
Log host:                                                                       
        10.1.1.1, channel number 2, channel name loghost,                       
language English , host facility local7                                         
Console:                                                                        
        channel number : 0, channel name : console                              
Monitor:                                                                        
        channel number : 1, channel name : monitor                              
SNMP Agent:                                                                     
        channel number : 5, channel name : snmpagent                            
Log buffer:                                                                     
        enabled,max buffer size 1024, current buffer size 512,                  
current messages 512, channel number : 4, channel name : logbuffer              
dropped messages 0, overwritten messages 53                                     
Trap buffer:                                                                    
        enabled,max buffer size 1024, current buffer size 256,                  
current messages 256, channel number:3, channel name:trapbuffer                 
dropped messages 0, overwritten messages 6229                                   
Information timestamp setting:                                                  
        log - date, trap - date, debug - date millisecond                       
                                                                                
 Sent messages = 270090, Received messages = 281030                             
                                                                                
 IO Reg messages = 2 IO Sent messages = 10940                                   
Table 3-40  Description of the display info-center command output

Item

Description

Information Center

Information center status:
  • enabled
  • disabled

To enable the information center, run the info-center enable command.

Log host

Log host configuration.

10.1.1.1

Log host IP address.

To set the log host IP address, run the info-center loghost command.

channel number

Number of a channel used to output information.

To set the number of a channel used to output information, run the info-center channel command.

channel name

Name of a channel used to output information.

To set the name of a channel used to output information, run the info-center channel name command.

language

Language mode in which information is output to a log host.

To set the language mode in which information is output to a log host, run the info-center loghost command.

host facility

Logging tool.

To configure the logging tool, run the info-center loghost command.

Console

Console configuration.

Monitor

Remote terminal configuration.

SNMP Agent

SNMP agent configuration.

Log buffer

Log buffer configuration.

enabled

Whether the Switch is enabled to send logs/traps to the log/trap buffer.

  • enabled
  • disabled

To enable the Switch to send logs/traps to the log/trap buffer, run the info-center logbuffer or info-center trapbuffer command.

max buffer size

Maximum number of logs/traps in the log/trap buffer.

current buffer size

Maximum number of logs/traps in the current log/trap buffer.

To set the maximum number of logs/traps in the current log/trap buffer, run the info-center logbuffer size or info-center trapbuffer size command.

current messages

Number of messages recorded in the log/trap buffer.

dropped messages

Number of messages discarded by the log/trap buffer.

overwritten messages

Number of overwritten messages in the log/trap buffer.

Trap buffer

Trap buffer configuration.

Information timestamp setting

Timestamp format of logs, traps, and debugging messages:
  • boot: indicates that the timestamp is expressed in the format of relative time, a period of time since system start.
  • date: indicates the current system date and time. It is expressed in mm dd yyyy hh:mm:ss format.
  • short-date: indicates the short date. This timestamp differs from date is that the year is not displayed.
  • format-date: indicates that the timestamp is expressed in YYYY-MM-DD hh:mm:ss format.
  • none: indicates that the output information does not contain the timestamp.

To configure the timestamp format, run the info-center timestamp command.

Sent messages

Number of sent messages output by information center modules.

Received messages

Number of messages sent to information center modules.

IO Reg messages

Number of receive messages by switch.

IO Sent messages

Number of sent messages by switch.

display info-center filter-id

Function

The display info-center filter-id command displays information filtered by the information center.

Format

display info-center filter-id [ id | bymodule-alias modname alias ]

Parameters

Parameter Description Value
id Displays filtered information with the specified ID.

The value is in hexadecimal notation and is a string of 8 digits. The value can contain 0-9, a-f, and A-F.

bymodule-alias modname alias Displays filtered information with the specified module name and mnemonic symbol.
  • modname: specifies the module name.
  • alias specifies the mnemonic symbol.

Enumerated type. Set the value according to the device configuration.

Views

All views

Default Level

3: Management level

Usage Guidelines

ID identifies each function module for log registration. An ID filter list is the aggregation of the shielded IDs.

If id or bymodule-alias is not specified, all information is filtered.

If you do not want to output a specific log to the log file or log buffer, you can find the ID of the log in the data dictionary and run the info-center filter-id command to inject the ID into the filter list. Then, you can run the display info-center filter-id command to check whether the ID has become the one to be filtered.

Example

# Display all the IDs in the filter list.
<HUAWEI> display info-center filter-id
ID              : 0x40394017                                                                                                        
Module          : SHELL                                                                                                             
Alias           : CMDRECORD                                                                                                         
Content         : Recorded command information. (Task=[string], Ip=[string], VpnName=[STRING], User=[string], AthenticationMethod="[STRING]", Command="[string]")                                                                                                      
Filtered Number : 2                                                                                                                 
                                                                                                                                    
ID              : 0x40394018                                                                                                        
Module          : SHELL                                                                                                             
Alias           : DISPLAY_CMDRECORD                                                                                                 
Content         : Recorded display command information. (Task=[string], Ip=[string], VpnName=[string], User=[string], AuthenticationMethod="[string]", Command="[string]")                                                                                              
Filtered Number : 1         
Table 3-41  Description of the display info-center filter-id command output

Item

Description

ID

Identifier to which each log corresponds.

To configure the Switch to filter a log or trap with a specified ID, run the info-center filter-id id command.

Module

Module name.

To configure the Switch to filter a log or trap with a specified module name or alias name, run the info-center filter-id bymodule-alias modname alias command.

Alias

Alias name.

To configure the Switch to filter a log or trap with a specified module name or alias name, run the info-center filter-id bymodule-alias modname alias command.

Content

Log message to which each log ID corresponds.

Filtered Number

Number of times that the log to which the log ID corresponds is filtered.

Related Topics

display info-center rate-limit record

Function

The display info-center rate-limit record command displays the suppression of the log processing rate in the information center.

Format

display info-center rate-limit record

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

You can run the display info-center rate-limit record command to check suppression information of the log processing rate. Then you can determine whether service logs are suppressed because there are many logs.

Example

# Display the suppression of the log processing rate in the information center.
<HUAWEI> display info-center rate-limit record 
Record No.1
 InfoID               : 417d5000
 Module               : 6OVER4
 Alias                : DESTFAIL
 Rate limit threshold : 50
 Total receive number : 1872
 Total drop number    : 922
 Total send number    : 950
 Begin timestamp      : 2009-12-21 11:41:28
Table 3-42  Description of the display info-center rate-limit record command output

Item

Description

InfoID

Log ID.

Module

Log module name.

Alias

Log mnemonic name.

Rate limit threshold

Maximum number of logs set for the information center to process every second.

Total receive number

Total number of logs that are generated during the latest suppression period.

Total drop number

Total number of logs that are discarded during the latest suppression period.

Total send number

Total number of logs that the information center process during the latest suppression period.

Begin timestamp

Timestamp signifying when the suppression function is enabled for the last time.

display info-center rate-limit threshold

Function

The display info-center rate-limit threshold command displays the threshold of the log processing rate (maximum number of logs that the information center can process every second). The threshold information includes the default threshold contained in the released version, the default threshold for the specified log ID, and the threshold set through the command lines after the system startup.

Format

display info-center rate-limit threshold

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

You can run the display info-center rate-limit threshold command to check the log processing rate threshold of each module and then adjust the threshold based on service requirements.

Example

# Display the threshold of the log processing rate set for the information center.
<HUAWEI> display info-center rate-limit threshold 
Rate limit threshold(per second):
 Module           Alias                                   Default  Config       
 default                                                  30       30           
 IPC              IPCFRGTOOLARGE                          5        5            
 IPC              IPCDUMPMEM                              5        5            
 IPC              ALLOCINDEXERR                           5        5            
 IPC              DRVNOTSTABLE                            2        2            
 IPC              NOTIMODFALNOREASM                       2        2            
 IPC              SYNRPCGETSMFAL                          5        5            
 IPC              SYNRPCMODUNREG                          5        5            
 IPC              SYNRPCRETNULL                           5        5            
 IPC              MODULENOTREG                            5        5            
 IPC              SENDRETURN                              5        5            
 IPC              GETMTUFAL                               5        5            
 IPC              ALLOCIPCFRGFAL                          5        5            
 IPC              RECVINVALIDMSG                          5        5            
 IPC              RCVNOTIQUEERR                           5        5            
 IPC              NOTIFYQUEERR                            5        5            
 IPC              SENDFINISHRETURN                        5        5            
 IPC              RECVINVALIDMSGTYPE                      5        5            
 SOURCE           UMSGGETSRCOBJFAL                        1        1            
Table 3-43  Description of the display info-center rate-limit threshold command output

Item

Description

Module

Log module name.

Alias

Log mnemonic name.

Default

The default threshold of the log processing rate.

Config

The threshold of the log processing rate set for the information center.

display info-center statistics

Function

The display info-center statistics command displays statistics on the information center.

Format

display info-center statistics

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

You can run the display info-center statistics command to view statistics on the information center, including logs, traps, and debugging messages of each module.

Example

# Display statistics on the information center.

<HUAWEI> display info-center statistics
Information statistics data:
ModuleID    ModuleName        LogSend   LogDrop   DiagSend  DiagDrop  TrapSend
TrapDrop  DebugSend DebugDrop
0x417d0000  6OVER4            0         0         0         0         0
0         0         0
0x41470000  AAA               0         0         0         0         0
0         0         0
0x406c0000  ACL               0         0         0         0         0
0         0         0
0x40ef0000  ACL6              0         0         0         0         0
0         0         0
0xff060000  ACLE              1         0         0         0         0
0         0         0
0xff380000  ADA_BFD           0         0         0         0         0
0         0         0
0x40e70000  ADDR              0         0         0         0         0
0         0         0


0xff2f0000  ADP_RRPP          0         0         114       18        0
0         0         0
0xff950000  ADPIPV4           0         0         253       393       0
0         0         0
  ---- More ----
Table 3-44  Description of the display info-center statistics command output

Item

Description

ModuleID

Registered ID of the module.

ModuleName

Name of the module that generates logs.

LogSend

Number of sent logs.

LogDrop

Number of discarded logs.

DiagSend

Number of sent diagnostic messages.

DiagDrop

Number of discarded diagnostic messages.

TrapSend

Number of sent traps.

TrapDrop

Number of discarded traps.

DebugSend

Number of sent debugging messages.

DebugDrop

Number of discarded debugging messages.

display logbuffer

Function

The display logbuffer command displays information recorded in the log buffer.

Format

display logbuffer [ size size | slot slot-id | module module-name | security | level { severity | level } ] *

display logbuffer summary [ level severity | slot slot-id ] *

display logbuffer order by module

Parameters

Parameter Description Value
size size

Displays the specified number of logs recently generated in the log buffer.

The value is an integer that ranges from 1 to 1024.

module module-name

Displays logs of a specified module in the log buffer.

Enumerated type. The value depends on the registered module.

security Specifies the security logs. -
slot slot-id

Displays logs in a specified slot.

The value must be set according to the device configuration.

level { severity | level }
Displays logs of specified severity name or ID.
  • severity specifies the severity ID.

  • level specifies the severity name.

The value of severity is an integer that ranges from 0 to 7.
  • 0: Emergencies

  • 1: Alert

  • 2: Critical

  • 3: Error

  • 4: Warning

  • 5: Notification

  • 6: Informational

  • 7: Debugging

The value of level is the enumerated type:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

summary

Displays the summary of logs in the log buffer.

-

order by module

Displays logs in the order of the modules to which they belong to.

NOTE:
  • Logs in the log buffer are classified and displayed by the modules they belong to.
  • Modules are displayed by the time that the module's first log is generated in the log buffer in descending order.
  • Logs in each module are displayed by the time they are generated in descending order.

-

Views

All views

Default Level

3: Management level

Usage Guidelines

The display logbuffer command displays the information of recent logs. If the actual number of logs is smaller than the value specified by size, the system displays logs of the actual number.

Example

# Display all the logs in the log buffer.

<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 : 43                                                           
                                                                                
Oct 16 2013 06:06:48 HUAWEI %%01VFS/4/DISKSPACE_NOT_ENOUGH(l)[3]:Disk space is 
insufficient. The system begins to delete unused log files.                     
Oct 10 2013 19:06:48 HUAWEI %%01VFS/4/DISKSPACE_NOT_ENOUGH(l)[4]:Disk space is 
insufficient. The system begins to delete unused log files.                     
Oct  7 2013 16:36:48 HUAWEI %%01VFS/4/DISKSPACE_NOT_ENOUGH(l)[5]:Disk space is 
insufficient. The system begins to delete unused log files.                     
Oct  5 2013 09:12:22 HUAWEI %%01EZOP/3/PROCESS_STOP(l)[6]:Easy-operation upgrad
e process has been stopped. (Reason=There is a configuration file in this device)                         
Oct  5 2013 09:09:29 HUAWEI %%01IFNET/4/IF_ENABLE(l)[7]:Interface XGigabitEther
net0/0/4 has been available.                                                    
Oct  5 2013 09:09:29 HUAWEI %%01IFNET/4/IF_ENABLE(l)[8]:Interface XGigabitEther
net0/0/3 has been available.                                                    
Oct  5 2013 09:09:29 HUAWEI %%01IFNET/4/IF_ENABLE(l)[9]:Interface XGigabitEther
net0/0/2 has been available.                                                    
Oct  5 2013 09:09:29 HUAWEI %%01IFNET/4/IF_ENABLE(l)[10]:Interface XGigabitEthe
rnet0/0/1 has been available.                                                   
Oct  5 2013 09:09:29 HUAWEI %%01IFNET/4/CARD_ENABLE(l)[11]:Board 0 card 1 has b
een available.                                                                  
Oct  5 2013 09:09:24 HUAWEI %%01ALML/4/ENT_PLUG_IN(l)[12]:LS51S24CA frame[1] bo
ard[0]'s card[1] was plugged in.                                                
Oct  5 2013 09:09:22 HUAWEI %%01IFNET/4/IF_ENABLE(l)[13]:Interface GigabitEther
net0/0/24 has been available.                                                   
Oct  5 2013 09:09:22 HUAWEI %%01IFNET/4/IF_ENABLE(l)[14]:Interface GigabitEther
net0/0/23 has been available.                                                   
Oct  5 2013 09:09:21 HUAWEI %%01IFNET/4/IF_ENABLE(l)[15]:Interface GigabitEther
net0/0/22 has been available.                                                   
Oct  5 2013 09:09:21 HUAWEI %%01IFNET/4/IF_ENABLE(l)[16]:Interface GigabitEther
net0/0/21 has been available.                                                   
Oct  5 2013 09:09:20 HUAWEI %%01IFNET/4/IF_ENABLE(l)[17]:Interface GigabitEther
net0/0/20 has been available.                                                   
Oct  5 2013 09:09:20 HUAWEI %%01IFNET/4/IF_ENABLE(l)[18]:Interface GigabitEther
net0/0/19 has been available.                                                   
Oct  5 2013 09:09:20 HUAWEI %%01IFNET/4/IF_ENABLE(l)[19]:Interface GigabitEther
net0/0/18 has been available.                                                   
Oct  5 2013 09:09:19 HUAWEI %%01IFNET/4/IF_ENABLE(l)[20]:Interface GigabitEther
net0/0/17 has been available.                                                   
Oct  5 2013 09:09:19 HUAWEI %%01IFNET/4/IF_ENABLE(l)[21]:Interface GigabitEther
net0/0/16 has been available.                                                   
Oct  5 2013 09:09:18 HUAWEI %%01IFNET/4/IF_ENABLE(l)[22]:Interface GigabitEther
net0/0/15 has been available.                                                   
Oct  5 2013 09:09:18 HUAWEI %%01IFNET/4/IF_ENABLE(l)[23]:Interface GigabitEther
net0/0/14 has been available. 
  ---- More ----  
# Display logs in the order of the modules they belong to.
<HUAWEI> display logbuffer order by module
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 : 113

Nov 10 2010 16:16:53 HUAWEI %%01DHCP/4/DHCP_INFO_LOG_DHCP_REMOTEBACKUP_FAILED(l)[0]:Saving the dynamic binding table to a remot
e server failed. Ensure that the FTP/SFTP server address is reachable and the FTP/SFTP user name and password and the file path are 
correct.                                                                                                                            
Nov 10 2010 10:38:23 HUAWEI %%01INFO/4/SUPPRESS_LOG(l)[1]:Last message repeated 1 times.(InfoID=1077493787, ModuleName=SHELL, I
nfoAlias=LOGINFAILED)                                                                                                               
Nov 10 2010 10:19:42 HUAWEI %%01SHELL/4/LOGINFAILED(s)[2]:Failed to login. (Ip=10.134.27.157, UserName=**, Times=3, AccessType=
TELNET, VpnName=)                                                                                                                   
Nov 10 2010 10:19:42 HUAWEI %%01SHELL/4/LOGIN_FAIL_FOR_INPUT_TIMEOUT(s)[3]:Failed to log in due to timeout.(Ip=10.134.27.157, U
serName=**, Times=3, AccessType=TELNET, VpnName=)                                                                                   
Nov 10 2010 10:18:02 HUAWEI %%01SHELL/4/LOGINFAILED(s)[4]:Failed to login. (Ip=10.134.27.157, UserName=**, Times=2, AccessType=
TELNET, VpnName=)                                                                                                                   
Nov 10 2010 10:18:02 HUAWEI %%01SHELL/4/LOGIN_FAIL_FOR_INPUT_TIMEOUT(s)[5]:Failed to log in due to timeout.(Ip=10.134.27.157, U
serName=**, Times=2, AccessType=TELNET, VpnName=)                                                                                   
Nov 10 2010 10:16:27 HUAWEI %%01SHELL/4/LOGINFAILED(s)[6]:Failed to login. (Ip=10.134.27.157, UserName=**, Times=1, AccessType=
TELNET, VpnName=)                                                                                                                   
Nov 10 2010 10:16:27 HUAWEI %%01SHELL/4/LOGIN_FAIL_FOR_INPUT_TIMEOUT(s)[7]:Failed to log in due to timeout.(Ip=10.134.27.157, U
serName=**, Times=1, AccessType=TELNET, VpnName=)                                                                                   
Nov  9 2010 19:51:57 HUAWEI %%01SHELL/4/LOGINFAILED(s)[8]:Failed to login. (Ip=10.134.27.157, UserName=**, Times=1, AccessType=
TELNET, VpnName=)
Table 3-45  Description of the display logbuffer command output

Item

Description

Logging buffer configuration and contents

Whether the device is enabled to output logs to the log buffer:
  • enabled
  • disabled

To configure the device to output logs to the log buffer, run the info-center logbuffer command.

Allowed max buffer size

Maximum size of the log buffer.

Actual buffer size

Actual size of the log buffer.

To set the log buffer size, run the info-center logbuffer size command.

Channel number

Number of the channel used to send logs to the log buffer.

To configure the number of a channel used to send logs to the log buffer, run the info-center channel command.

Channel name

Name of the channel used to send logs to the log buffer.

To configure the name of a channel used to send logs to the log buffer, run the info-center channel name command.

Dropped messages

Number of dropped messages.

Overwritten messages

Number of overwritten messages.

Current messages

Number of current messages.

# Display the summary of information in the log buffer.

<HUAWEI> display logbuffer summary
      SLOT EMERG ALERT  CRIT ERROR  WARN NOTIF  INFO DEBUG                      
         0     0     0     0    36   476     0     0     0                      
Table 3-46  Description of the display logbuffer summary command output

Item

Description

SLOT

ID of the slot where logs are generated.

EMERG

Number of logs of emergency.

ALERT

Number of logs of alert.

CRIT

Number of logs of critical.

ERROR

Number of logs of error.

WARN

Number of logs of warning.

NOTIF

Number of logs of notification.

INFO

Number of logs of informational.

DEBUG

Number of logs of debugging.

display logfile

Function

The display logfile command displays information about a log file.

Format

display logfile file-name [ offset | hex ] *

Parameters

Parameter Description Value
file-name Specifies the log file name, which can contain the drive and path. The value is a string of case-insensitive characters, spaces not supported. If the parameter value does not contain any path, it is a string of 1 to 64 bytes. Otherwise, it is a string of 1 to 160 bytes.
offset Displays the log file with the specified offset or byte.

The value is an integer that ranges from 0 to 2147483647.

hex Displays the log file in hexadecimal notation. If the parameter is not specified, the log file is displayed in text format. -

Views

All views

Default Level

3: Management level

Usage Guidelines

When encountering problems, you can query log information to know about what happened during device operation. This is helpful for fault location.

The file name is generated automatically by the system. The file name extension of the log file is *.log or *.dblg. When the current log file size reaches the specified upper limit, the system compresses the file into a *.log.zip or *.dblg.zip file.

You can view the *.log files or *.log.zip files. When viewing a *.log.zip file, you can press Ctrl+C to abort command execution.

If the files you filter based on the pipe character are large and no qualified log file is displayed, the command fails to display any output for a long period of time until the command execution finishes.

For details about the log format, see "Log Message Format Description" in the S1720, S2700, S5700, and S6720 V200R011C10 Log Reference - Introduction.

Example

# Display log information saved in the log file in a specified path.

<HUAWEI> display logfile logfile/log.log
################################################################
#     This logfile is generated at slot 0
################################################################

Aug 30 2013 16:18:58-05:13 HUAWEI FSP/4/STANDBY_CHANGE:OID 1.3.6.1.4.1.2011.5.25.183.1.22.3 Slot 2 is designated as standby.       
Aug 30 2013 16:19:40-05:13 HUAWEI SNMP/4/WARMSTART:OID 1.3.6.1.6.3.1.1.5.2 warmStart                                               
Aug 30 2013 16:19:15-05:13 HUAWEI %%01ACL/6/INIT_OK(l)[6]:Succeed in mqc initializtion.                                            
Aug 30 2013 16:19:41-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[7]:Record command information. (Task=CFM, Ip=**, User=**, Command="vlan 
batch 4090", Result=Success)                                                                                                        
Aug 30 2013 16:19:41-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[8]:Record command information. (Task=CFM, Ip=**, User=**, Command="inter
face Vlanif4090", Result=Success)                                                                                                   
Aug 30 2013 16:19:43-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[9]:Record command information. (Task=CFM, Ip=**, User=**, Command="inter
face Eth-Trunk10", Result=Success)                                                                                                  
Aug 30 2013 16:19:43-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[10]:Record command information. (Task=CFM, Ip=**, User=**, Command="inte
rface Eth-Trunk20", Result=Success)                                                                                                 
Aug 30 2013 16:19:44-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[11]:Record command information. (Task=CFM, Ip=**, User=**, Command="inte
rface Eth-Trunk30", Result=Success)                                                                                                 
Aug 30 2013 16:19:44-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[12]:Record command information. (Task=CFM, Ip=**, User=**, Command="inte
rface GigabitEthernet0/0/1", Result=Success)                                                                                        
Aug 30 2013 16:19:44-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[13]:Record command information. (Task=CFM, Ip=**, User=**, Command="inte
rface GigabitEthernet0/0/2", Result=Success)                                                                                        
Aug 30 2013 16:19:44-05:13 HUAWEI %%01SHELL/5/CMDRECORD(s)[14]:Record command information. (Task=CFM, Ip=**, User=**, Command="inte
rface GigabitEthernet0/0/3", Result=Success)

display snmp-agent trap feature-name info all

Function

display snmp-agent trap feature-name info all command displays all trap messages of the Information Center module.

Format

display snmp-agent trap feature-name info all

Parameters

None

Views

All views

Default Level

3: Management level

Usage Guidelines

The display snmp-agent trap feature-name info all command displays whether all trap functions of the Information Center module are enabled.

Example

# Display all trap messages of the Information Center module.

<HUAWEI> display snmp-agent trap feature-name info all
------------------------------------------------------------------------------
Feature name: INFO
Trap number : 2
------------------------------------------------------------------------------
Trap name                       Default switch status   Current switch status
hwICLogFileAging                on                      on
hwICLogBufferLose               on                      on
Table 3-47  Description of the display snmp-agent trap feature-name info all command output

Item

Description

Feature name

Name of the module to which a trap message belongs.

Trap number

Number of trap messages.

Trap name

Name of a trap message of the Information Center module:

  • hwICLogFileAging: indicates that a log file aged and then was deleted.
  • hwICLogBufferLose: indicates that some logs in the log buffer were lost because of storage space insufficiency.

Default switch status

Status of the default trap switch:
  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

Current switch status

Status of the current trap switch:
  • on: indicates that the trap function is enabled.
  • off: indicates that the trap function is disabled.

display trapbuffer

Function

The display trapbuffer command displays information recorded in the trap buffer.

Format

display trapbuffer [ size value | slot slot-id | module module-name | level { severity | level } ] *

display trapbuffer order by module

Parameters

Parameter Description Value
size value Displays the specified number of traps recently generated in the trap buffer. If this parameter is not specified, all traps are displayed. The value is an integer that ranges from 1 to 1024.
module module-name

Displays traps of a specified module in the trap buffer.

Enumerated type. The value depends on the registered module.

slot slot-id

Displays traps in a specified slot.

The value must be set according to the device configuration.

level { severity | level }
Displays traps of specified severity name or ID.
  • severity specifies the severity ID.

  • level specifies the severity name.

The value of severity is an integer that ranges from 0 to 7.
  • 0: Emergencies

  • 1: Alert

  • 2: Critical

  • 3: Error

  • 4: Warning

  • 5: Notification

  • 6: Informational

  • 7: Debugging

The value of level is the enumerated type:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

order by module

Displays alarms in the order of the modules they belong to.

NOTE:
  • Alarms in the alarm buffer are classified and displayed by the modules they belong to.
  • Modules are displayed by the time that the module's first alarm is generated in the alarm buffer in descending order.
  • Alarms in each module are displayed by the time they are generated in descending order.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

The display trapbuffer command displays the information of recent traps. If the number of traps in the trap buffer is smaller than value, traps of the actual number are displayed.

Example

# Display all traps in the trap buffer.

<HUAWEI> display trapbuffer
Trapping buffer configuration and contents : enabled                            
Allowed max buffer size : 1024                                                  
Actual buffer size : 256                                                        
Channel number : 3 , Channel name : trapbuffer                                  
Dropped messages : 0                                                            
Overwritten messages : 6248                                                     
Current messages : 256                                                          
                                                                                
#Sep 19 2012 04:38:03+08:00 HUAWEI DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011
.5.25.191.3.1 configurations have been changed. The current change number is 8, 
the change loop count is 0, and the maximum number of records is 4095.          
#Sep 19 2012 04:37:39+08:00 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.2
5.207.2.2 A user login. (UserIndex=34, UserName=VTY, UserIP=10.135.18.114, UserC
hannel=VTY0)                                                                    
#Sep 19 2012 04:35:48+08:00 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.
25.207.2.4 A user logout. (UserIndex=34, UserName=VTY, UserIP=10.135.18.143, Use
rChannel=VTY0)                                                                  
#Sep 19 2012 04:20:54+08:00 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.2
5.207.2.2 A user login. (UserIndex=34, UserName=VTY, UserIP=10.135.18.143, UserC
hannel=VTY0)                                                                    
#Sep 19 2012 04:08:03+08:00 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.
25.207.2.4 A user logout. (UserIndex=34, UserName=VTY, UserIP=10.135.18.143, Use
rChannel=VTY0)                                                                  
#Sep 19 2012 03:54:27+08:00 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.2
5.207.2.2 A user login. (UserIndex=34, UserName=VTY, UserIP=10.135.18.143, UserC
hannel=VTY0)                                                                    
#Sep 19 2012 03:54:18+08:00 HUAWEI LINE/5/VTYUSERLOGINFAIL:OID 1.3.6.1.4.1.2011
.5.25.207.2.3 A user login fail. (UserIndex=34, UserName=VTY, UserIP=10.135.18.1
43, UserChannel=VTY0)                                                           
#Sep 19 2012 02:51:03+08:00 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.
25.207.2.4 A user logout. (UserIndex=34, UserName=VTY, UserIP=10.135.18.57, User
Channel=VTY0)                                                                   
#Sep 19 2012 02:50:24+08:00 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.
25.207.2.4 A user logout. (UserIndex=35, UserName=VTY, UserIP=10.135.18.164, Use
rChannel=VTY1)                                                                  
#Sep 19 2012 02:40:19+08:00 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.2
5.207.2.2 A user login. (UserIndex=35, UserName=VTY, UserIP=10.135.18.164, UserC
hannel=VTY1)                                                                    
#Sep 19 2012 02:35:23+08:00 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.2
5.207.2.2 A user login. (UserIndex=34, UserName=VTY, UserIP=10.135.18.57, UserCh
annel=VTY0)                                                                     
......
# Display alarms in the order of the modules they belong to.
<HUAWEI> display trapbuffer order by module
Trapping buffer configuration and contents : enabled
Allowed max buffer size : 1024
Actual buffer size : 256
Channel number : 3 , Channel name : trapbuffer
Dropped messages : 0
Overwritten messages : 0
Current messages : 79

#Nov 11 2010 11:51:24 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.25.207.2.2 A user login. (UserIndex=36, UserName=**, Us
erIP=10.135.19.152, UserChannel=VTY2)                                                                                               
#Nov 10 2010 18:54:06 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.25.207.2.2 A user login. (UserIndex=35, UserName=**, Us
erIP=10.135.186.212, UserChannel=VTY1)                                                                                              
#Nov 10 2010 12:07:44 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.25.207.2.2 A user login. (UserIndex=34, UserName=**, Us
erIP=10.135.19.157, UserChannel=VTY0)                                                                                               
#Nov 10 2010 11:19:23 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.25.207.2.4 A user logout. (UserIndex=34, UserName=**, 
UserIP=10.134.27.157, UserChannel=VTY0)                                                                                             
#Nov 10 2010 10:48:57 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.25.207.2.2 A user login. (UserIndex=34, UserName=**, Us
erIP=10.134.27.157, UserChannel=VTY0)                                                                                               
#Nov 10 2010 10:48:48 HUAWEI LINE/5/VTYUSERLOGOUT:OID 1.3.6.1.4.1.2011.5.25.207.2.4 A user logout. (UserIndex=34, UserName=**, 
UserIP=10.134.27.157, UserChannel=VTY0)                                                                                             
#Nov 10 2010 10:38:23 HUAWEI LINE/5/VTYUSERLOGIN:OID 1.3.6.1.4.1.2011.5.25.207.2.2 A user login. (UserIndex=34, UserName=**, Us
erIP=10.134.27.157, UserChannel=VTY0)
Table 3-48  Description of the display trapbuffer command output

Item

Description

Trapping buffer configuration and contents

Whether the device is enabled to output traps to the trap buffer:
  • enabled
  • disabled

To enable the device to output traps to the trap buffer, run the info-center trapbuffer command.

Allowed max buffer size

Maximum size of the trap buffer.

Actual buffer size

Actual size of the trap buffer.

To set the size of the trap buffer, run the info-center trapbuffer size command.

Channel number

Number of the channel used to send traps to the trap buffer.

To set the channel number, run the info-center channel command.

Channel name

Name of the channel used to send traps to the trap buffer.

To set the channel name, run the info-center channel name command.

Dropped messages

Number of dropped messages.

Overwritten messages

Number of overwritten messages.

Current messages

Number of current messages.

info-center channel

Function

The info-center channel command configures channels for outputting information in various directions.

The undo info-center channel command restores the default settings.

By default, the system outputs information in various directions through channels listed in the table below.

Table 3-49  Default association between the channel number, channel name, and output direction of information channels

Channel Number

Channel Name

Output Direction

0

console

Console

1

monitor

User terminal

2

loghost

Log host

3

trapbuffer

Trap buffer

4

logbuffer

Log buffer

5

snmpagent

SNMP agent

6

channel6

Unspecified

7

channel7

Unspecified

8

channel8

Unspecified

9

channel9

Log file

Format

info-center { console | logbuffer | logfile | monitor | snmp | trapbuffer } channel { channel-number | channel-name }

undo info-center { { console | monitor | snmp | logfile } channel | { logbuffer | trapbuffer } channel [ channel-number | channel-name ] }

Parameters

Parameter Description Value
console Specifies the channel used to output information to the console. -
logbuffer Specifies the channel used to output information to the log buffer. -
logfile Specifies the channel used to output information to the log file. -
monitor Specifies the channel used to output information to the user terminal. -
snmp Specifies the channel used to output information to the SNMP agent. -
trapbuffer Specifies the channel used to output information to the trap buffer. -
channel-number Specifies the channel number. The value is an integer ranging from 0 to 9.
channel-name Specifies the name of a channel, which can be the default channel name or a user-defined name. The value is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.

Views

System view

Default Level

3: Management level

Usage Guidelines

You can run the info-center channel command in the following scenarios: The same information is sent to different directions. For example, the log file and log host record the same content or the trap buffer and the SNMP agent record the same content.

NOTE:

The channels should not have the same name.

For details on how to configure a channel for outputting information to a log host, see info-center loghost.

The info-center channel command takes effect only after the information center function has been enabled using the info-center enable command.

Example

# Configure the channel used to output information to a console.

<HUAWEI> system-view
[HUAWEI] info-center console channel console

# Configure the channel used to output information to the log buffer.

<HUAWEI> system-view
[HUAWEI] info-center logbuffer channel logbuffer

# Configure the channel used to output information to the user terminal.

<HUAWEI> system-view
[HUAWEI] info-center monitor channel monitor

# Configure the channel used to output information to an SNMP agent.

<HUAWEI> system-view
[HUAWEI] info-center snmp channel 5

# Configure the channel used to output information to the trap buffer.

<HUAWEI> system-view
[HUAWEI] info-center trapbuffer channel trapbuffer

info-center channel name

Function

The info-center channel name command names a channel with a specified number.

The undo info-center channel command restores the default channel name.

The following lists default channel names.

Table 3-50  Default channel names

Channel Number

Default Channel Name

0

console

1

monitor

2

loghost

3

trapbuffer

4

logbuffer

5

snmpagent

6

channel6

7

channel7

8

channel8

9

channel9

Format

info-center channel channel-number name channel-name

undo info-center channel channel-number

Parameters

Parameter Description Value
channel-number Specifies the number of a channel. The value is an integer than ranges from 0 to 9. That is, the system has 10 channels.
channel-name Specifies the name of a channel. The value is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can rename channels, which facilitates memorization and usage.

Precautions

Channel names must be unique. It is recommended that channel names represent channel functions.

Example

# Name channel 0 execconsole.

<HUAWEI> system-view
[HUAWEI] info-center channel 0 name execconsole

info-center enable

Function

The info-center enable command enables the information center.

The undo info-center enable command disables the information center.

The info-center disable command disables the information center.

By default, the information center is enabled.

Format

info-center enable

undo info-center enable

info-center disable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

During device running, the information center records device operation. The system outputs system information to destinations such as the log host and the console only after the information center is enabled. Network administrators can store and query output information to monitor device running and locate faults.

Precautions

After the undo info-center enable or info-center disable command is executed, only logfile and logbuffer record logs, the other channel no longer records.

Follow-up Procedure

Configure a rule for outputting information to the terminal or remote server.

Example

# Enable the information center.

<HUAWEI> system-view
[HUAWEI] info-center enable
Info: Information center is enabled.              

info-center filter-id

Function

The info-center filter-id command configures the Switch to filter a specified log or trap.

The undo info-center filter-id command disables the Switch from filtering a specified log or trap.

By default, no log or trap is filtered.

Format

info-center filter-id { id | bymodule-alias modname alias } &<1-50>

info-center filter-id { id | bymodule-alias modname alias } [ bytime interval | bynumber number ]

undo info-center filter-id all

undo info-center filter-id { id | bymodule-alias modname alias } &<1-50>

undo info-center filter-id { id | bymodule-alias modname alias } [ bytime interval | bynumber number ]

Parameters

Parameter Description Value
id Specifies the ID of the log or trap to be filtered.
NOTE:

This parameter indicates the ID of a log. If this parameter fails to be configured, the log specified by this ID does not exist.

The value is in hexadecimal notation and contains 8 digits. The value contains 0-9, a-f, and A-F.

bymodule-alias modname alias Specifies the module name and alias name corresponding to the log or trap to be filtered.

Enumerated type. Set the value according to the device configuration.

all Filters all logs or traps. -
bytime interval Specifies the interval at which logs are sent. The value is an integer that ranges from 1 to 86400, in seconds.
bynumber number Specifies the number of logs that are discarded between two received logs. The value is an integer that ranges from 1 to 1000.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If some logs or traps are unnecessary, configure the Switch not to output the logs and traps. When the filtering function is enabled, the information center does not send the traps with a specified ID that satisfy the filtering condition to any channel. As a result, the trap buffer, console, terminal, or SNMP agent cannot receive the traps with the specified ID.

Precautions

  • Currently, the Switch can filter traps with a maximum of 50 IDs. If there are more than 50 log IDs, the system displays a message indicating that the filtering table is full. To configure the filtering function, run the undo info-center filter-id { id | bymodule-alias modname alias } &<1-50> [ bytime interval | bynumber number ], or the undo info-center filter-id all command to delete original IDs and reconfigure the log ID.

  • When both the bytime interval and bynumber number parameters are not specified, all the logs with the specified ID will be discarded.
  • When the bytime interval parameter is specified, the interval for sending two allowed logs must be at least the configured time.
  • When the bynumber number parameter is specified, the configured number of logs between two allowed logs must be discarded.
  • To add multiple IDs at a time, use a space to separate every two IDs. The result of adding each ID is displayed.
  • You cannot add the same ID or alias name repeatedly.

  • When you add an unregistered or nonexistent ID or alias name, the system displays a message indicating that the system fails to filter the trap with the specified ID or alias name.

  • During a software upgrade, if the information filtering function is configured in the old version, but the new version does not support the specified log module and alias, the information filtering configuration of the specified log module and alias will be automatically cleared after the upgrade.

  • You are advised to use the module name and alias to filter specified log information. The id parameter can be obtained by running the display info-center register-info [ module module-name ] log command in the diagnostic view, and the modname and alias parameters can be obtained through the command association function.

Example

# Filter information by module names and alias names.
<HUAWEI> system-view
[HUAWEI] info-center filter-id bymodule-alias CMD CMD_PRI_REARRG
# Cancel filtering for all logs.
<HUAWEI> system-view
[HUAWEI] undo info-center filter-id all
# Filter the log with the ID of 40394017.
<HUAWEI> system-view
[HUAWEI] info-center filter-id 40394017

info-center local log-counter disable

Function

The info-center local log-counter disable command disables the local log from carrying the sequence number.

The undo info-center local log-counter disable command enables the local log to carry the sequence number.

By default, the local log carries the sequence number.

Format

info-center local log-counter disable

undo info-center local log-counter disable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the device keeps running for a long time, a large number of logs may be generated.

  • You can run the info-center local log-counter disable command to disable logs sent to the log buffer, log file, console, or terminal from carrying the sequence number, and run the undo info-centerlocal log-counter disable command to enable these logs to carry the sequence number.
  • You can run the undo info-center local log-counter disable command to enable logs to carry the incremental sequence number, checking whether all logs have been sent to the log buffer, log file, console, or terminal.
NOTE:
  • Logs sent to the log file, console, or terminalconsole or terminal are counted separately and therefore carry different sequence numbers in ascending order. The sequence number of the earliest log is 0.

  • Logs sent to the log buffer carry sequence numbers in descending order. The sequence number of the latest log is 0.

Example

# Disable local logs from carrying the sequence number.

<HUAWEI> system-view
[HUAWEI] info-center local log-counter disable

# Enable local logs to carry the sequence number.

<HUAWEI> system-view
[HUAWEI] undo info-center local log-counter disable

info-center logbuffer

Function

The info-center logbuffer command enables the Switch to send logs to the log buffer.

The undo info-center logbuffer command disables the Switch from sending logs to the log buffer.

By default, the Switch is enabled to send logs to the log buffer.

Format

info-center logbuffer

undo info-center logbuffer

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

To log in to a device and check the faults or problems during operation, run the info-center logbuffer command to enable the function to output logs to the log buffer. Then, you can view log information in the log buffer.

By configuring the size of the log buffer using the info-center logbuffer size buffersize command, you can view information about specified logs.

By configuring the number or name of a channel through which a device sends logs to the log buffer using the info-center logbuffer channel { channel-number | channel-name } command, you can send log information through a specified channel to the log buffer.

Example

# Enable the Switch to send logs to the log buffer.

<HUAWEI> system-view
[HUAWEI] info-center logbuffer

info-center logbuffer size

Function

The info-center logbuffer size command sets the maximum number of logs in the log buffer.

The undo info-center logbuffer size command restores the default maximum number of logs in the log buffer.

By default, a log buffer can store a maximum of 512 logs.

Format

info-center logbuffer size logbuffer-size

undo info-center logbuffer size [ logbuffer-size ]

Parameters

Parameter Description Value
logbuffer-size Specifies the maximum number of logs in the log buffer. The value is an integer that ranges from 0 to 1024. If logbuffer-size is 0, logs are not displayed.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the number of logs in the log buffer reaches the maximum value, new logs will replace the existing logs that were placed earlier in the log buffer until all the new logs are stored.

Precautions

When you run the info-center logbuffer size command multiple times, only the latest configuration takes effect.

The info-center logbuffer size command takes effect only after the information center function has been enabled using the info-center enable command.

Example

# Set the maximum number of logs in the log buffer to 50.

<HUAWEI> system-view
[HUAWEI] info-center logbuffer size 50

info-center logfile size

Function

The info-center logfile size command sets the log file size.

The undo info-center logfile size command restores the default log file size.

By default, the log file size is 8 MB.

Format

info-center logfile size size

undo info-center logfile size

Parameters

Parameter Description Value
size Specifies the log file size. The value is an integer that is 4, 8, 16, or 32, in MB. The default value is 8 MB.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To configure the Switch to export information to a log file, run the info-center logfile size command to set the log file size.

Precautions

If you configure the device to export information to a log file, exported information is saved in the log.log or log.dblg file. When the log.log or log.dblg file exceeds the specified size, the system compresses the file in to a zip package and names the compressed file date time.log.zip or date time.dblg.zip.

The info-center logfile size command takes effect only after the information center function has been enabled using the info-center enable command.

Example

# Set the log file size to 32 MB.

<HUAWEI> system-view
[HUAWEI] info-center logfile size 32

info-center loghost

Function

The info-center loghost command configures the device to output information to a log host.

The undo info-center loghost command disables the device from outputting information to a log host.

By default, no information is output to the log host.

Format

info-center loghost ip-address [ channel { channel-number | channel-name } | facility local-number | language language-name | { vpn-instance vpn-instance-name | public-net } | local-time | log-counter { disable | enable } | port port | { source-ip source-ip-address } | transport { udp | tcp ssl-policy policy-name } ] *

info-center loghost ipv6 ipv6-address [ channel { channel-number | channel-name } | facility local-number | language language-name | local-time | log-counter { disable | enable } | port port | transport { udp | tcp ssl-policy policy-name } ] *

undo info-center loghost ip-address [ vpn-instance vpn-instance-name ]

undo info-center loghost ipv6 ipv6-address

info-center loghost domain domain-name [ vpn-instance vpn-instance-name ] [ channel { channel-number | channel-name } | facility local-number | language language-name | log-counter { disable | enable } | local-time | port port | transport { udp | tcp ssl-policy policy-name } ] *

undo info-center loghost domain domain-name [ vpn-instance vpn-instance-name ]

NOTE:

Only the S6720EI, S6720S-EI, S5720HI, S5720EI, S6720SI, S6720S-SI, S5730SI, S5730S-EI, S5720SI, S5720S-SI, S5720LI, S5720S-LI, S6720LI, S6720S-LI, S2720EI, S1720X-E, S1720GW-E, S1720GWR-E, S1720X, S1720GW, S1720GWR support the vpn-instance vpn-instance-name parameter.

Parameters

Parameter Description Value
ip-address Specifies the IPv4 address of the log host. The value is in dotted decimal notation.
channel { channel-number | channel-name } Specifies the channel used to send information to a log host.
  • channel-number: specifies the number of a channel.
  • channel-name: specifies the name of a channel. The name can be the default or user-defined channel name.

The value of channel-number is an integer that ranges from 0 to 9.

The value of channel-name is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.

facility local-number Specifies the tool used by the log host to record information. The value ranges from local0 to local7. The default value is local7.
language language-name Displays the language in which logs are recorded.

Currently, the value can only be English.

vpn-instance vpn-instance-name VPN instance. The value must be an existing VPN instance name.
public-net Indicates that the log host is connected in the public network. -
local-time Indicates the local time when logs are sent to the log host. -
log-counter { disable | enable } Disables or enables the log counter function. -
port port Specifies the port number of a log host. The value is an integer that ranges from 1 to 65535
source-ip source-ip-address Specifies the source IP address used to send information to the log host. The value is in dotted decimal notation.
transport Indicates the information transport mode. -
udp Indicates the UDP transport mode.
NOTE:
The default transport mode is UDP if no transport mode is specified.
-
tcp Indicates the TCP transport mode.
NOTE:
The default transport mode is UDP if no transport mode is specified.
-
ssl-policy policy-name

Specifies a Secure Sockets Layer (SSL) policy in the TCP transport mode.

This parameter is recommended to improve log transmission security.

The value is a string of 1 to 23 case-insensitive characters without spaces.
ipv6 ipv6-address Specifies the IPv6 address of the log host. The value is a 32-digit hexadecimal number.
domain domain-name

Specifies a DNS domain name of a log host.

The value is a string of 1 to 255 case-sensitive characters, spaces not supported.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To query information generated on the Switch deployed remotely, configure the Switch to export information to a log host so that you can view device information on the log host. Run the info-center loghost command to configure the Switch to export information to a log host.

To configure the Switch to output information to different log hosts using different channels, specify the channels used to send information to the log hosts. For example, you can configure the Switch to output information to log hosts at 192.168.0.1 and 192.168.0.2 using channels 7 and 8 respectively.

Precautions

The Switch can output information to eight log hosts including IPv4 and IPv6 hosts to implement backup among log hosts.

To transfer logs to the log hosts using TCP and encrypt logs using SSL, create an SSL policy first.

If the set net-manager vpn-instance command is run to configure the NMS to manage network elements through a VPN instance, either of the following situations occurs.
  • If vpn-instance is configured, the system accesses the log host in the VPN instance.

  • If public-net is configured, the system accesses the log host on the public network.

If the transport tcp ssl-policy policy-name parameters are specified to enable logs to be transmitted in TCP mode through SSL encryption, perform the following operations:
  • Run the ssl-policy policy-name command to configure an SSL policy and enter the SSL policy view.
  • Run the trusted-ca load command to load trusted-CA files (cacert and rootcert files) of the SSL client.
  • On the log server, load trusted-CA files (serverkey and servercert files) of the SSL server.
  • Run the display tcp status command to check that the TC connection status of port 6514 is Established.

Example

# Configure a device to use channel 6 to output information to the log host at 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] info-center loghost 10.1.1.1 channel channel6 

# Configure the source IP address used to send information to the log host is Loopback1.

<HUAWEI> system-view
[HUAWEI] info-center  loghost source LoopBack1

# Configure the Switch to send information to the log host at FC00:0:0:3001::1/64.

<HUAWEI> system-view
[HUAWEI] info-center loghost ipv6 fc00:0:0:3001::1

# Configure the Switch to send information to the host with the IPv4 address 192.168.2.2 and VPN instance name vpn1.

<HUAWEI> system-view
[HUAWEI] info-center loghost 192.168.2.2 vpn-instance vpn1
# Configure a device to send information to a log host with the domain name set to www.test.com.
<HUAWEI> system-view
[HUAWEI] info-center loghost domain www.test.com
# Configure a device to send information to the log host at 192.168.2.2 in TCP mode, using the SSL policy huawei123 that has been created in the system.
<HUAWEI> system-view
[HUAWEI] ssl policy huawei123
[HUAWEI-ssl-policy-ftps_der] trusted-ca load pem-ca 1_cacert_pem_rsa.pem
[HUAWEI-ssl-policy-ftps_der] trusted-ca load pem-ca 1_rootcert_pem_rsa.pem
[HUAWEI-ssl-policy-ftps_der] quit

info-center loghost source

Function

The info-center loghost source command configures the source interface used by the Switch to send information to a log host.

The undo info-center loghost source command restores the default source interface used by the Switch to send information to a log host.

By default, the source interface for a device to send logs to a log host is the actual interface that sends the logs.

Format

info-center loghost source interface-type interface-number

undo info-center loghost source

Parameters

Parameter Description Value
interface-type interface-number Specifies the type and number of an interface. -

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If multiple devices send log messages to the same log host, you can identify the devices by setting different source interfaces so as to index the received log messages.

The source interface specified in the info-center loghost source command for a device to send logs to a log host is not necessarily the actual interface that sends the logs, but the IP address of the specified source interface is carried in logs.

Prerequisites

There is a reachable route between the source interface and the log host.

Example

# Specify Loopback0 IP address as the source interface address to send information to a log host.

<HUAWEI> system-view
[HUAWEI] interface loopback 0
[HUAWEI-LoopBack0] ip address 10.1.1.1 255.255.255.0
[HUAWEI-LoopBack0] quit
[HUAWEI] info-center loghost source loopback 0

info-center loghost source-port

Function

The info-center loghost source-port command configures a source interface through which the device sends information to the log host.

The undo info-center loghost source-port command restores the default source interface through which the device sends information to the log host.

By default, the source interface number is 38514.

Format

info-center loghost source-port source-port

undo info-center loghost source-port

Parameters

Parameter Description Value
source-port Specifies the number of the source interface through which the device sends information to the log host. The value is an integer ranging from 1025 to 65535.

Views

System view

Default Level

3: Management level

Usage Guidelines

If the device uses the default source interface to send information to the log host, attackers may keep accessing this interface. As a result, the log host cannot send information. To improve system security, you can run the info-center loghost source-port source-port command to change the source interface through which the device sends information to the log host so that attackers cannot obtain the new source interface.

Example

# Change the number of the source interface through which the device sends information to the log host to 1026.

<HUAWEI> system-view
[HUAWEI] info-center loghost source-port 1026

info-center max-logfile-number

Function

The info-center max-logfile-number command sets the maximum number of log files to be saved.

The undo info-center max-logfile-number command restores the default maximum number of log files to be saved.

By default, a maximum of 200 log files can be saved.

Format

info-center max-logfile-number filenumbers

undo info-center max-logfile-number

Parameters

Parameter Description Value
filenumbers Specifies the maximum number of log files that can be saved. The value is an integer that ranges from 3 to 500.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If too many log files are saved on the Switch, many disk space resources are occupied. To view log files generated recently, run the info-center max-logfile-number command to set the maximum number of log files that can be saved.

Precautions

If the number of log files generated on the Switch exceeds the limit, the system deletes the oldest log file so that the number of log files is not larger than the maximum value.

If the number of saved log files is greater than the default value, more system resources are consumed. The default value is recommended. Excess log files can be deleted manually or automatically. When the system deletes excess log files, high CPU usage may last for a short period.

Example

# Set the maximum number of log files to be saved to 100.

<HUAWEI> system-view
[HUAWEI] info-center max-logfile-number 100

info-center rate-limit except

Function

The info-center rate-limit except command cancels the log processing rate limit for logs.

The undo info-center rate-limit except command deletes the preceding configuration.

Format

info-center rate-limit except { byinfoid infoID | bymodule-alias modname alias }

undo info-center rate-limit except { byinfoid infoID | bymodule-alias modname alias }

Parameters

Parameter Description Value
byinfoid infoID Specifies the log ID in hexadecimal notation.

The value is a 32-digit hexadecimal number in the format XXXXXXXX. It ranges from 0 to ffffffff.

bymodule-alias modname Specifies the log module name. The value is a string of 1 to 24 case-insensitive characters without spaces.
alias Specifies the log mnemonic name. The value is a string of 1 to 64 case-insensitive characters without spaces.

Views

System view

Default Level

3: Management level

Usage Guidelines

When too many logs will never be generated under a specified ID, you can run the info-center rate-limit except command to avoid the impact of the suppression of the log processing rate. After this command is run, the configured log processing rate limit will not be effective for logs with the specified ID or module name.

During a software upgrade, if the function that prevents logs from being suppressed by the information center is configured in the old version, but the new version does not support the specified log module and alias, the function configuration of the specified log module and alias will be automatically cleared after the upgrade.

Example

# Prevent logs specified by the module name and mnemonic from being suppressed by the information center.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit except bymodule-alias AAA AUTHEN_ERR_EVENT
# Prevent logs specified by the log ID from being suppressed by the information center.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit except byinfoid ff011015
# Prevent logs with a specified log ID from being suppressed by the information center.
<HUAWEI> system-view
[HUAWEI] undo info-center rate-limit except bymodule-alias AAA AUTHEN_ERR_EVENT

info-center rate-limit global-threshold

Function

The info-center rate-limit global-threshold command sets the total number of logs that the information center can process every second.

The undo info-center rate-limit global-threshold command restores the default value.

By default, the information center processes a maximum of 400 logs in every second.

Format

info-center rate-limit global-threshold value

undo info-center rate-limit global-threshold

Parameters

Parameter Description Value
value Specifies the maximum number of logs that the information center can process every second. The value is an integer that ranges from 100 to 1000.

Views

System view

Default Level

3: Management level

Usage Guidelines

You can run the info-center rate-limit global-threshold command to adjust the processing capability of the information center. If the number of logs to be processed exceeds the processing capability of the information center, the extra logs are discarded.

NOTE:
  • If the threshold is too low, some logs may be discarded.
  • If the threshold is too high, the information center cannot identify the log ID under which too many logs are generated. The number of logs to be processed depends on the current processing capacity of the information center.

Example

# Set the number of logs that the information center can process every second to 300.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit global-threshold 300

info-center rate-limit monitor-period

Function

The info-center rate-limit monitor-period command sets the monitoring period for the information center to suppress the log processing rate.

The undo info-center rate-limit monitor-period command restores the default value.

By default, the monitoring period is 3 seconds.

Format

info-center rate-limit monitor-period value

undo info-center rate-limit monitor-period

Parameters

Parameter Description Value
value Specifies the monitoring period for the information center to suppress the log processing rate. The value is an integer ranging from 1 to 60, in seconds.

Views

System view

Default Level

3: Management level

Usage Guidelines

In the monitoring period specified by value, if the rate of sending a single log every second exceeds the threshold configured using the info-center rate-limit threshold command, the information center will limit the log processing rate. In this situation, the information center discards logs exceeding the threshold.

In the monitoring period that is five times value, if the number of a single type of logs that are sent every second is smaller than the threshold configured using the info-center rate-limit threshold command, the information center does not limit the log processing rate.

Example

# Set the monitoring period for the information center to suppress the log processing rate to 5 seconds.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit monitor-period 5

info-center rate-limit threshold

Function

The info-center rate-limit threshold command sets the maximum number of logs with the same log ID that the information center can process every second.

The undo info-center rate-limit threshold command restores the default setting.

By default, the information center processes a maximum of 30 logs with the same log ID in every second.

Format

info-center rate-limit threshold value [ byinfoid infoID | bymodule-alias modname alias ]

undo info-center rate-limit threshold [ value ] [ byinfoid infoID | bymodule-alias modname alias ]

Parameters

Parameter Description Value
value Specifies the maximum number of logs with the same log ID that the information center can process every second. The value is an integer that ranges from 1 to 500.
byinfoid infoID Specifies the log ID. The value is a 32-digit hexadecimal number in the format XXXXXXXX. It ranges from 0 to ffffffff.
bymodule-alias modname Specifies the log of the module name. The value is a string of 1 to 24 case-insensitive characters without spaces.
alias Specifies the log of the mnemonic name. The value is a string of 1 to 64 case-insensitive characters without spaces.

Views

System view

Default Level

3: Management level

Usage Guidelines

You can run the info-center rate-limit threshold command to set the maximum number of logs with the same log ID that the information center can process every second. The information center monitors the number of logs that are generated every second under the same log ID. When the number of logs that are generated every second under the same log ID exceeds the threshold in the monitoring period, the information center decides that too many logs are generated and suppresses its log processing rate by processing only the conforming traffic (logs within the threshold) and discarding the non-conforming traffic (logs exceeding the threshold). When the number of logs that are generated every second under the same log ID falls below the threshold and remains below the threshold for five monitoring periods, the information center removes the suppression.

By default, the information center processes a maximum of 30 logs with the same log ID in every second. In certain application scenarios, by default, the information center needs to process more than 50 logs with the same log ID in every second. You can set thresholds for logs with different log IDs. Generally, the default threshold is recommended.
  • If the threshold is too low, some logs may be discarded.
  • If the threshold is too high, the information center cannot identify the log ID under which too many logs are generated.
NOTE:
  • If the threshold value1 specified by the parameter byinfoid infoID or bymodule-alias modname alias differs from the threshold value0 specified globally, value1 takes effect.
  • During a software upgrade, if the threshold is configured in the old version, but the new version does not support the specified log module and alias, the threshold configuration of the specified log module and alias will be automatically cleared after the upgrade.

Example

# Set the maximum number of logs that the information center can process every second to 60.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit threshold 60
# Set the maximum number of logs identified by the same module name and mnemonic that the information center can process every second to 30.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit threshold 30 bymodule-alias AAA AUTHEN_ERR_EVENT
# Set the maximum number of logs with the same log ID that the information center can process every second to 20.
<HUAWEI> system-view
[HUAWEI] info-center rate-limit threshold 20 byinfoid ff011015
# Restore the maximum number of logs that the information center can process every second to the default value.
<HUAWEI> system-view
[HUAWEI] undo info-center rate-limit threshold
# Cancel the restriction on the maximum number of logs with a specified log ID that the information center can process every second.
<HUAWEI> system-view
[HUAWEI] undo info-center rate-limit threshold bymodule-alias AAA AUTHEN_ERR_EVENT

info-center source channel

Function

The info-center source channel command configures a rule for outputting information to a channel.

The undo info-center source channel command restores the default rule for outputting information to a channel.

The following lists the default rule for outputting information to a channel.

Table 3-51  Default rule for outputting information to a channel
Output Channel Module Enabled to Output Information Log Trap Debugging Message
Status Lowest Output Severity Status Lowest Output Severity Status Lowest Output Severity
0 (console) default on warning on debugging on debugging
1 (remote terminal) default on warning on debugging on debugging
2 (log host) default on informational on debugging off debugging
3 (trap buffer) default off informational on debugging off debugging
4 (log buffer) default on warning off debugging off debugging
5 (SNMP agent) default off debugging on debugging off debugging
6 (channel 6) default on debugging on debugging off debugging
7 (channel 7) default on debugging on debugging off debugging
8 (channel 8) default on debugging on debugging off debugging
9 (channel 9) default on debugging on debugging off debugging

Format

info-center source { module-name | default } channel { channel-number | channel-name } [ log { state { off | on } | level severity } * | trap { state { off | on } | level severity } * | debug { state { off | on } | level severity } * ] *

undo info-center source { module-name | default } channel { channel-number | channel-name }

Parameters

Parameter Description Value
module-name Specifies the module name. Enumerated type. The value depends on the registered module.
default Indicates the default module. -
channel-number Specifies the number of a channel. The value is an integer that ranges from 0 to 9.
channel-name Specifies the name of a channel. The value is a string of 1 to 30 case-insensitive characters. The value consists of letters or numbers and must start with a letter.
log { state { off | on } } Specifies the log status.
  • off: Logs are not sent.
  • on: Logs are sent.
NOTE:
This field does not take effect for diagnostic logs.
-
log { level severity } Specifies the lowest severity of output logs.
NOTE:
This field does not take effect for diagnostic logs.
Logs are classified into eight severities. The following severities are listed in descending order of priority:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

trap { state { off | on } } Specifies the trap status:
  • off: Traps are not sent.
  • on: Traps are sent.
-
trap { level severity } Specifies the lowest severity of output traps.
Logs are classified into eight severities. The following severities are listed in descending order of priority:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

debug { state { off | on } } Specifies the debugging message status.
  • off: Debugging messages are not sent.
  • on: Debugging messages are sent.
-
debug { level severity } Specifies the lowest severity of output debugging messages.
Logs are classified into eight severities. The following severities are listed in descending order of priority:
  • emergencies

  • alert

  • critical

  • error

  • warning

  • notification

  • informational

  • debugging

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To collect and query information generated on the Switch, define severities for various type of information that is output to different channels. You can run the info-center source channel command to configure a rule for outputting information to a channel.

The following lists information severities.
Table 3-52  Information severities

Value

Severity

Description

0

emergencies

A fault causes the device to fail to run normally unless it is restarted. For example, the device is restarted because of program exceptions or a memory error is detected.

1

alert

A fault needs to be rectified immediately. For example, memory usage of the system reaches the upper limit.

2

critical

A fault needs to be analyzed and processed. For example, the memory usage falls below the lower threshold; temperature falls below the alarm threshold; BFD detects that a device is unreachable or detects locally generated error messages.

3

error

An improper operation is performed or exceptions occur during service processing. The fault does not affect services but needs to be analyzed. For example, users enter incorrect commands or passwords; error protocol packets are received from other devices.

4

warning

Some events or operations may affect device running or cause service processing faults, which requires full attention. For example, a routing process is disabled; BFD detects packet loss; error protocol packets are detected.

5

notification

A key operation is performed to keep the device running normally. For example, the shutdown command is run; a neighbor is discovered; protocol status changes.

6

informational

A normal operation is performed. For example, a display command is run.

7

debugging

A normal operation is performed, which requires no attention.

Precautions

Each information channel has a default record with the module name default. The default settings for logs, traps, and debugging messages in different channels may differ.

If a module generates a large number of logs, traps, or debugging messages in a short time, use the following methods to suppress this information:
  • Specify level severity to adjust the channel level. Information with lower severity will be filtered.
  • Specify state off to disable information sent by a specified module.
After the lowest severity of output information is specified, information lower than the severity will be filtered.

Example

# Configure the device to send logs higher than or equal to warning of the CFM module.

<HUAWEI> system-view
[HUAWEI] info-center source CFM channel snmpagent log level warning

info-center statistic-suppress enable

Function

The info-center statistic-suppress enable command enables suppression of statistics about consecutive repeated logs.

The undo info-center statistic-suppress enable command disables suppression of statistics about consecutive repeated logs.

The info-center statistic-suppress disable command disables suppression of statistics about consecutive repeated logs.

By default, suppression of statistics about consecutive repeated logs is enabled.

Format

info-center statistic-suppress enable

undo info-center statistic-suppress enable

info-center statistic-suppress disable

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

In the system, service modules generate logs and control the volume of generated logs. The information center processes the received logs.

A large number of repeated logs are generated in a short time in some scenarios, for example, when ARP and VRRP are enabled. This wastes both the storage space and CPU resources. Generally, users do not want to view the repeated logs. You can run the info-center statistic-suppress enable command to suppress statistics on consecutive repeated logs so that the system can still record other logs.
NOTE:
Logs that are generated consecutively and with the identical log ID and parameters can be regarded as repeatedly generated logs.

Precautions

Statistics about repeatedly generated logs are first output at the 30th seconds from the time the first log is output, and then statistics about repeatedly generated logs are output at the 120th seconds. After being output two times, statistics about repeatedly generated logs are output every 600 seconds.

By default, once receiving a log, the information center outputs the log. If the information center receives repeatedly generated logs within a period, it outputs the number of these logs and will output logs only when it receives a new log (a log with a different log ID). For example, a module sends logs to the information center in the sequence of A1(T1) A2(T2) A3(T2) B1(T3) B2(T4) B3(T4) C1(T5) C2(T6) A4(T7) B4(T8) B5(T8) B5(T8) B7(T9) A5(T9) B8(T10) D1(T11) A6(T11) A7(T12) A8(T12) A9(T13) A10(T14) A11(T15) A12(T16) A13(T17) A14(T18) B9(T18). A1 to A14 are the same; B1 to B9 are the same; C1, C2 and D1 are different from others; T1 to T18 are sequence numbers. The log information output by the information center is as follows:
T1:A1
T3(1): last message repeated 2 times
T3:B1
T5: last message repeated 2 times
T5:C1
T6:C2
T7:A4
T8:B4
T9(1): last message repeated 3 times
T9:A5
T10:B8
T11:D1
T11:A6
T13(2): last message repeated 3 times
T18(2): last message repeated 5 times
T18:B9
Logs of the service module received by the information center show that:
  • Statistics about repeatedly generated logs are output when either of the following conditions is met:
    • The next log is a different log, as shown in (1).
    • The time period (every 30 seconds, 120 seconds, and 600 seconds) for outputting log statistics expires, as shown in (2).
  • Each time the statistics are output, the service module clears the count and starts counting again. For example, during the period from T11 to T18, log A is generated 9 times.
  • The information center outputs logs in the same sequence the logs are generated, making the trace of information and scenario easy.
NOTE:
Logs with the sequence being A B A B A B A B are alternate logs; therefore, the info-center statistic-suppress enable command is unable to suppression the statistics about these logs.

Example

# Disable suppression of statistics about consecutive repeated logs.

<HUAWEI> system-view
[HUAWEI] undo info-center statistic-suppress enable

info-center timestamp

Function

The info-center timestamp command sets the timestamp format of logs, traps, and debugging messages.

The undo info-center timestamp command restores the default timestamp format of logs, traps, and debugging messages.

By default, the date timestamp is used in traps, logs and debugging messages. Debugging messages are accurate to milliseconds, and traps and logs are accurate to seconds.

Format

info-center timestamp { debugging | log | trap } { { date | format-date | short-date } [ precision-time { second | tenth-second | millisecond } ] | boot } [ without-timezone ]

undo info-center timestamp { debugging | trap | log }

Parameters

Parameter Description Value
debugging Indicates debugging messages. -
log Indicates logs. -
trap Indicates traps. -
boot Indicates that the timestamp is expressed in the format of relative time, a period of time since the start of the system. The format is xxxxxx.yyyyyy. xxxxxx is the higher order 32 bits of the milliseconds elapsed since the start of the system; yyyyyy is the lower order 32 bits of the milliseconds elapsed since the start of the system. -
date Specifies the current date and time. It is expressed in mm dd yyyy hh:mm:ss format. -
short-date Indicates the short date. This timestamp differs from date is that the year is not displayed. -
format-date Indicates that the timestamp is expressed in YYYY-MM-DD hh:mm:ss format. -
precision-time Specifies the precision. -
second Indicates that the precision is accurate to seconds. -
tenth-second Indicates that the precision is accurate to 0.1 second. -
millisecond Indicates that the precision is accurate to milliseconds. -
without-timezone Specifies a timestamp to filter timezone information.
NOTE:

If without-timezone is configured for logs, traps, or debug information, the log, trap, or debugging information sent to the log host does not carry time zone or DST information.

-

Views

System view

Default Level

3: Management level

Usage Guidelines

The info-center timestamp command sets the timestamp format of logs, traps, and debugging messages.

The following describes the timestamp in date format.

Table 3-53  Description of fields of the timestamp in date format

Field

Description

Value

mm

Month

The value can be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.

dd

Date

1-31. If the date is smaller than 10, add a space in front of the date, For example, " 7".

yyyy

Year

4 digits

hh:mm:ss

Local time

hh ranges from 00 to 23, and mm or ss ranges from 00 to 59.

When the precision of the timestamp is accurate to 0.1 second or milliseconds, the system adds identifiers to the logs generated at the same time based on the sequence.

Prerequisites

The information center has been enabled by using the info-center enable command.

Example

# Set the timestamp format of traps to boot.

<HUAWEI> system-view
[HUAWEI] info-center timestamp trap boot

# Set the timestamp precision of logs, traps, and debugging messages.

<HUAWEI> system-view
[HUAWEI] info-center timestamp log date precision-time millisecond
[HUAWEI] info-center timestamp debugging date precision-time tenth-second
[HUAWEI] info-center timestamp trap date precision-time millisecond
Related Topics

info-center trapbuffer

Function

The info-center trapbuffer command enables the Switch to send traps to the trap buffer.

The undo info-center trapbuffer command disables the Switch from sending traps to the trap buffer.

By default, the Switch is enabled to send traps to the trap buffer.

Format

info-center trapbuffer

undo info-center trapbuffer

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

To view traps in the trap buffer, run the info-center trapbuffer command to enable the Switch to send traps to the trap buffer.

The info-center trapbuffer command takes effect only after the information center function has been enabled using the info-center enable command.

Example

# Enable the Switch to send traps to the trap buffer.

<HUAWEI> system-view
[HUAWEI] info-center trapbuffer

info-center trapbuffer size

Function

The info-center trapbuffer size command sets the maximum number of traps in the trap buffer.

The undo info-center trapbuffer size command restores the default maximum number of traps in the trap buffer.

By default, a trap buffer allows a maximum of 256 traps.

Format

info-center trapbuffer size trapbuffer-size

undo info-center trapbuffer size [ trapbuffer-size ]

Parameters

Parameter Description Value
trapbuffer-size Specifies the maximum number of traps in the trap buffer. The value is an integer that ranges from 0 to 1024. If trapbuffer-size is 0, traps are not displayed.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The info-center trapbuffer size command sets the maximum number of traps in the trap buffer.

Prerequisites

The Switch has been enabled to output traps to the trap buffer by using the info-center trapbuffer command.

Precautions

When you run the info-center trapbuffer size command multiple times, only the latest configuration takes effect.

If a small value of trapbuffer-size is used, some traps may be not displayed. If a large value of trapbuffer-size is used, repeated traps may be displayed. The default value of trapbuffer-size is recommended.

Example

# Set the maximum number of traps in the trap buffer to 30.

<HUAWEI> system-view
[HUAWEI] info-center trapbuffer size 30

reset info-center statistics

Function

The reset info-center statistics command clears statistics on each module.

Format

reset info-center statistics

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To recollect statistics on each module, run the reset info-center statistics command to clear all historical statistics.

Precautions

The cleared statistics cannot be restored. Exercise caution when you run the reset info-center statistics command.

Example

# Clear statistics on each module.

<HUAWEI> reset info-center statistics

reset logbuffer

Function

The reset logbuffer command clears logs in the log buffer.

Format

reset logbuffer

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To record logs in the log buffer again, run the reset logbuffer command to clear all the information in the log buffer.

Precautions

Statistics cannot be restored after being cleared. Exercise caution when you run the reset logbuffer command.

Example

# Clear information in the log buffer.

<HUAWEI> reset logbuffer
Warning: This command will reset the log buffer. Logs in the buffer will be lost. Continue? [Y/N]:y
Related Topics

reset trapbuffer

Function

The reset trapbuffer command clears Trap information in the trap buffer.

Format

reset trapbuffer

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To record traps in the trap buffer again, run the reset trapbuffer command to clear all the information in the trap buffer.

Precautions

Statistics cannot be restored after being cleared. Exercise caution when you run the reset trapbuffer command.

Example

# Clear information in the trap buffer.

<HUAWEI> reset trapbuffer
Related Topics

save logfile

Function

The save logfile command saves logs in the user log file buffer to a user log file.

Format

save logfile

Parameters

None

Views

User view

Default Level

0: Visit level

Usage Guidelines

The system periodically saves log information in the user log buffer to a user log file. If the log buffer becomes full within the log saving interval, the system immediately saves logs to the user log file. To view the current logs, run the save logfile command to save the logs to the user log file.

When you run this command, the device obtains or uses some personal data of users, such as the STA MAC address. Delete the personal data immediately after the command is executed to ensure user data security.

Example

# Save logs in the user log file buffer to the user log file.

<HUAWEI> save logfile
Info: Save logfile successfully. 

save logfile all

Function

The save logfile all command saves the logs in the user log buffer area and diagnostic log buffer area to the user log file and diagnostic log file, respectively.

Format

save logfile all

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

The logs in the user log buffer area and diagnostic log buffer area are periodically saved to the user log file and diagnostic log file, respectively. The log saving interval varies with the product. To save the logs in the user log buffer area and diagnostic log buffer area to the user log file and diagnostic log file, respectively, run the save logfile all command.

A user log file is saved in a log directory (for example, the log or logfile directory) and named in the log.log format.

A diagnostic log file is saved in a log directory (for example, the log or logfile directory) and named in the log.dblg format.

Example

# Save the logs in the user log buffer area and diagnostic log buffer area to the user log file and diagnostic log file, respectively.

<HUAWEI> save logfile all
Info: Save logfile successfully.
Info: Save diagnostic logfile successfully.

snmp-agent trap enable feature-name info

Function

snmp-agent trap enable feature-name info command enables the trap function of the Information Center module.

undo snmp-agent trap enable feature-name info command disables the trap function of the Information Center module.

By default, the trap function of the Information Center module is enabled.

Format

snmp-agent trap enable feature-name info [ trap-name { hwiclogbufferlose | hwiclogfileaging } ]

undo snmp-agent trap enable feature-name info [ trap-name { hwiclogbufferlose | hwiclogfileaging } ]

Parameters

Parameter Description Value
trap-name Indicates the trap of a specified event type of the information center module. If the trap-name parameter is not specified, all the traps of the information center module are enabled. -
hwiclogbufferlose Enables or disables the trap generated when some logs in the log buffer were lost because of storage space insufficiency. -
hwiclogfileaging Enables or disables the trap generated when a log file aged and then was deleted. -

Views

System view

Default Level

3: Management level

Usage Guidelines

After the trap function is enabled, the trap about the Information Center module generated when the device is running will be sent to the NMS. Otherwise, the trap about the Information Center module will not be sent to the NMS. If you want to enable a specific trap or several traps, choose the trap-name parameter.

Example

# Enables hwiclogfileaging for the Information Center module.

<HUAWEI> system-view
[HUAWEI] snmp-agent trap enable feature-name info trap-name hwiclogfileaging

terminal debugging

Function

The terminal debugging command enables debugging message display on the user terminal.

The undo terminal debugging command disables debugging message display on the user terminal.

By default, debugging message display is disabled on the user terminal.

Format

terminal debugging

undo terminal debugging

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the terminal debugging command to enable debugging message display on the user terminal to view system debugging message and locate faults.

Prerequisites

The terminal monitor command has been executed to enable display of logs, traps, and debugging message output on the user terminal.

Example

# Enable debugging message display on the user terminal.

<HUAWEI> terminal debugging
Info: Current terminal debugging is on.

terminal echo synchronous

Function

The terminal echo synchronous command enables a terminal to display debugging, log, or trap information synchronously.

The undo terminal echo synchronous command disables a terminal from displaying debugging, log, or trap information synchronously.

By default, a terminal displays debugging, log, and trap information asynchronously.

Format

terminal echo synchronous [ level { severity | all } | size size-number ] *

undo terminal echo synchronous

Parameters

Parameter Description Value
level severity Specifies an information severity.

The value is an integer ranging from 0 to 7. The default value is 0.

The information center classifies information into the following severities:

  • 0: emergency

  • 1: alert

  • 2: critical

  • 3: error

  • 4: warning

  • 5: notice

  • 6: informational

  • 7: debug

A smaller value indicates a higher severity. The information with a severity higher than a specified severity is displayed asynchronously.

all

Displays information of all severities.

size size-number

Specifies the total number of debugging, log, and trap records.

The value is an integer ranging from 1 to 1024. The default value is 512.

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When a device generates debugging, log, or trap information, the information queues in the device process and is sent to a terminal sequentially. This output is called a synchronous output.

A synchronous output provides effectively organized output information, improving user experience. In asynchronous output mode, multiple types of information interlaces, which brings poor readability. An asynchronous output allows you to promptly obtain debugging and diagnosis information and therefore applies to debugging and diagnosis scenarios.

You can run the terminal echo synchronous command to enable a synchronous output on a terminal, facilitating subsequent operations.

  • When you enter a command, the entered command content is displayed after debugging, log, or trap information is displayed. This function is enabled by default. After a synchronous output is disabled, this function is still supported.

  • When no command is entered, the command prompt is displayed after debugging, log, or trap information is displayed. This function is enabled by default. After a synchronous output is disabled, this function is still supported.
  • When a command is being run, no debugging, log, or trap information is displayed. After the command is run, debugging, log, or trap information is displayed.
  • When you enter Y for the message "Are you sure to continue?[Y/N]," the [Y/N]: prompt is displayed after debugging, log, or trap information is displayed.
  • When you enter the More phase, the More prompt is displayed after debugging, log, or trap information is displayed.
  • If you run a command, for example, for decompressing or saving a file, the terminal does not display output information until the operation is complete. This process ensures monitoring continuity.

Prerequisites

Example

# Enable a terminal to display debugging information synchronously.

<HUAWEI> terminal monitor
Info: Current terminal monitor is on.  
<HUAWEI> terminal debugging
Info: Current terminal debugging is on.  
<HUAWEI> terminal echo synchronous
Info: Current terminal synchronization is on.      
<HUAWEI> save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]:
Aug 23 2012 12:04:37.790.2 huawei VTY/7/Debug_Stat: 
 (0)VTY ACCEPT BEGIN ! 
Aug 23 2012 12:04:37.790.3 huawei VTY/7/Debug_Stat: 
 (1)SOCKET ACCEPT OK ! 
Aug 23 2012 12:04:37.790.4 huawei VTY/7/Debug_Stat: 
 (2)FIND LINE INDEX OK !
[Y/N]:

terminal logging

Function

The terminal logging command enables log display on the user terminal.

The undo terminal logging command disables log display on the user terminal.

By default, log display is enabled on the user terminal.

Format

terminal logging

undo terminal logging

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To view logs on a terminal, run the terminal logging command to enable log display on the user terminal.

Prerequisites

The terminal monitor command has been executed to enable display of logs, traps, and debugging message output on the user terminal.

Example

# Disable log display on the user terminal.

<HUAWEI> undo terminal logging
Info: Current terminal logging is off.

terminal monitor

Function

The terminal monitor command enables display of logs, traps, and debugging message output by the information center on the user terminal.

The undo terminal monitor command disables display of logs, traps, and debugging message output by the information center on the user terminal.

By default, console display is enabled and terminal display is disabled.

Format

terminal monitor

undo terminal monitor

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Prerequisites

The information center has been enabled by using the info-center enable command.

Follow-up Procedure

Run the terminal debugging/undo terminal debugging, terminal logging/undo terminal logging, terminal trapping/undo terminal trapping/ command to enable or disable terminal debugging message, log, or trap display.

Precautions

Logs, traps, and debugging message are sent to the current terminal only when the terminal monitor command is used.

Running the undo terminal monitor command is equivalent to running the undo terminal debugging, undo terminal logging, undo terminal trapping command.

Example

# Disable display of logs, traps, and debugging message output by the information center on the user terminal.

<HUAWEI> undo terminal monitor
Info: Current terminal monitor is off.

terminal trapping

Function

The terminal trapping command enables trap display on the user terminal.

The undo terminal trapping command disables trap display on the user terminal.

By default, trap display is enabled on the user terminal.

Format

terminal trapping

undo terminal trapping

Parameters

None

Views

User view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To view traps on a terminal, run the terminal trapping command to enable trap display on the user terminal.

Prerequisites

The terminal monitor command has been executed to enable display of logs, traps, and debugging message output on the user terminal.

Example

# Disable trap display on the user terminal.

<HUAWEI> undo terminal trapping
Info: Current terminal trapping is off. 
Translation
Download
Updated: 2019-04-18

Document ID: EDOC1000178165

Views: 42024

Downloads: 1101

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next