12-Network Management and Monitoring Configuration Guide

HomeSupportRoutersH3C SR8800 Router SeriesConfigure & DeployConfiguration GuidesH3C SR8800 Configuration Guide-Release3347-6W10312-Network Management and Monitoring Configuration Guide
13-Information Center Configuration
Title Size Download
13-Information Center Configuration 217.52 KB

Information center overview

Introduction to information center

Acting as the system information hub, information center classifies and manages system information, offering a powerful support for network administrators and developers in monitoring network performance and diagnosing network problems.

The following describes the working process of information center:

·           Receives the log, trap, and debugging information generated by each module.

·           Outputs the above information to different information channels according to the user-defined output rules.

·           Outputs the information to different destinations based on the information channel-to-destination associations.

To sum up, information center assigns the log, trap and debugging information to the ten information channels according to the eight severity levels and then outputs the information to different destinations. The following describes the working process in details.

Figure 1 Information center diagram (default)

 

 

NOTE:

By default, the information center is enabled. An enabled information center affects the system performance in some degree due to information classification and output. Such impact becomes more obvious in the event that there is enormous information waiting for processing.

 

Classification of system information

The system information of the information center falls into the following types:

·           Log information

·           Trap information

·           Debugging information

Eight levels of system information

The information is classified into eight levels by severity. The severity levels in the descending order are emergency, alert, critical, error, warning, notice, informational and debug. When the system information is output by level, the information with severity level higher than or equal to the specified level is output. For example, in the output rule, if you configure to output information with severity level being informational, the information with severity level being emergency through informational will be output.

Table 1 Severity description

Severity

Severity value

Description

Corresponding keyword in commands

Emergency

0

The system is unusable.

emergencies

Alert

1

Action must be taken immediately

alerts

Critical

2

Critical conditions

critical

Error

3

Error conditions

errors

Warning

4

Warning conditions

warnings

Notice

5

Normal but significant condition

notifications

Informational

6

Informational messages

informational

Debug

7

Debug-level messages

debugging

 

Eight output destinations and ten channels of system information

The system supports eight information output destinations, including the console, monitor terminal (monitor), log buffer, log host, trap buffer, SNMP module, web interface (syslog), and log file.

The system supports ten channels. The channels 0 through 5, and channel 9 are configured with channel names, output rules, and are associated with output destinations by default. The channel names, output rules and the associations between the channels and output destinations can be changed through commands. In addition, you can configure channels 6, 7, and 8 without changing the default configuration of the eight channels.

Table 2 Information channels and output destinations

Information channel number

Default channel name

Default output destination

Description

0

console

Console

Receives log, trap and debugging information.

1

monitor

Monitor terminal

Receives log, trap and debugging information, facilitating remote maintenance.

2

loghost

Log host

Receives log, trap and debugging information and information will be stored in files for future retrieval.

3

trapbuffer

Trap buffer

Receives trap information, a buffer inside the router for recording information.

4

logbuffer

Log buffer

Receives log and debugging information, a buffer inside the router for recording information.

5

snmpagent

SNMP module

Receives trap information.

6

channel6

Web interface

Receives log, trap, and debugging information.

7

channel7

Not specified

Receives log, trap, and debugging information.

8

channel8

Not specified

Receives log, trap, and debugging information.

9

channel9

Log file

Receives log, trap, and debugging information.

 

 

NOTE:

Configurations for the eight output destinations function independently and take effect only when the information center is enabled.

 

Outputting system information by source module

The system is composed of a variety of protocol modules, board drivers, and configuration modules. The system information can be classified, filtered, and output according to source modules. You can use the info-center source ? command to view the supported information source modules.

Default output rules of system information

The default output rules define the source modules allowed to output information on each output destination, the output information type, and the output information level as shown in Table 3, which indicates that by default and in terms of all modules:

·           All log information is allowed to be output to the web interface and log file; log information with severity level equal to or higher than informational is allowed to be output to the log host; log information with severity level equal to or higher than informational is allowed to be output to the console, monitor terminal, and log buffer; log information is not allowed to be output to the trap buffer and the SNMP module.

·           All trap information is allowed to be output to the console, monitor terminal, log host, web interface, and log file; trap information with severity level equal to or higher than informational is allowed to be output to the trap buffer and SNMP module; trap information is not allowed to be output to the log buffer.

·           All debugging information is allowed to be output to the console and monitor terminal; debugging information is not allowed to be output to the log host, trap buffer, log buffer, the SNMP module, and log file.

Table 3 Default output rules for different output destinations

Output destination

Modules allowed

LOG

TRAP

DEBUG

Enabled/disabled

Severity

Enabled/disabled

Severity

Enabled/disabled

Severity

Console

default (all modules)

Enabled

Informational

Enabled

Debug

Enabled

Debug

Monitor terminal

default (all modules)

Enabled

Informational

Enabled

Debug

Enabled

Debug

Log host

default (all modules)

Enabled

Informational

Enabled

Debug

Disabled

Debug

Trap buffer

default (all modules)

Disabled

Informational

Enabled

Informational

Disabled

Debug

Log buffer

default (all modules)

Enabled

Informational

Disabled

Debug

Disabled

Debug

SNMP module

default (all modules)

Disabled

Debug

Enabled

Informational

Disabled

Debug

Web interface

default (all modules)

Enabled

Debug

Enabled

Debug

Disabled

Debug

Log file

default (all modules)

Enabled

Debug

Enabled

Debug

Disabled

Debug

 

System information format

The format of system information varies with the output destinations.

1.       If the output destination is not the log host (such as console, monitor terminal, logbuffer, trapbuffer, SNMP, or log file), the system information is in the following format:

timestamp sysname module/level/digest:content

For example, a monitor terminal connects to the router. When a terminal logs in to the router, the log information in the following format is displayed on the monitor terminal:

%Jun 26 17:08:35:809 2008 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1

2.       If the output destination is the log host, the system information is in the following formats:

¡  H3C format

<<PRI>>timestamp sysname %%vvmodule/level/digest: source content

For example, if a log host is connected to the device, when a terminal logs in to the device, the following log information is displayed on the log host:

<189>Oct 9 14:59:04 2009 MyDevice %%10SHELL/5/SHELL_LOGIN(l):VTY logged in from 192.168.1.21.

¡  UNICOM format

<PRI>timestamp sysname vvmodule/level/serial_number: content

For example, if a log host is connected to the device, when a port of the device goes down, the following log information is displayed on the log host:

<186>Oct 13 16:48:08 2000 H3C 10IFNET/2/210231a64jx073000020: log_type=port;content=Vlan-interface1 link status is DOWN.

<186>Oct 13 16:48:08 2000 H3C 10IFNET/2/210231a64jx073000020: log_type=port;content=Line protocol on the interface Vlan-interface1 is DOWN.

 

 

NOTE:

·       The closing set of angel brackets (< >), the space, the forward slash (/), and the colon (:) are all required in the above format.

·       The format in the previous part is the original format of system information, so you may see the information in a different format. The displayed format depends on the log resolution tools you use.

 

What follows is a detailed explanation of the fields involved:

PRI (priority)

The priority is calculated using the following formula: facility*8+severity, in which facility represents the logging facility name and can be configured when you set the log host parameters. The facility ranges from local0 to local7 (16 to 23 in decimal integers) and defaults to local7. The facility is mainly used to mark different log sources on the log host, query and filter the logs of the corresponding log source. Severity ranges from 0 to 7. Table 1 details the value and meaning associated with each severity.

Note that the priority field takes effect only when the information has been sent to the log host.

timestamp

Timestamp records the time when system information is generated to allow users to check and identify system events. The time stamp of the system information sent from the information center to the log host is with a precision of seconds. The timestamp format of the system information sent to the log host is configured with the info-center timestamp loghost command, and that of the system information sent to the other destinations is configured with the info-center timestamp command. For the detailed description of the timestamp parameters, see the following table:

Table 4 Description on the timestamp parameters

Timestamp parameter

Description

Example

boot

System up time (that is, the duration for this operation of the router), in the format of xxxxxx.yyyyyy. xxxxxx represents the higher 32 bits, and yyyyyy represents the lower 32 bits.

System information sent to all destinations except log host supports this parameter.

%0.16406399 Sysname IFNET/3/LINK_UPDOWN: GigabitEthernet3/1/6 link status is DOWN.

0.16406399 is a timestamp in the boot format.

date

Current date and time of the system, in the format of Mmm dd hh:mm:ss:sss yyyy.

System information sent to all destinations supports this parameter.

%Aug 19 16:11:03:288 2009 Sysname IFNET/3/LINK_UPDOWN: GigabitEthernet3/1/6 link status is UP.

Aug 19 16:11:03:288 2009 is a timestamp in the date format.

iso

Timestamp format stipulated in ISO 8601

Only the system information sent to a log host supports this parameter.

<187>2009-09-21T15:32:55 Sysname %%10 IFNET/3/LINK_UPDOWN(l): GigabitEthernet3/1/6 link status is DOWN.

2009-09-21T15:32:55 is a timestamp in the iso format.

none

No timestamp is included.

System information sent to all destinations supports this parameter.

% Sysname IFNET/3/LINK_UPDOWN: GigabitEthernet3/1/6 link status is DOWN.

No timestamp is included.

no-year-date

Current date and time of the system, with year information excluded.

Only the system information sent to a log host supports this parameter.

<187>Aug 19 16:120:38 Sysname %%10 IFNET/3/LINK_UPDOWN(l): GigabitEthernet3/1/6 link status is DOWN.

Aug 19 16:120:38 is a timestamp in the no-year-date format.

 

Sysname (host name or host IP address)

·           If the system information is sent to a log host in the format of UNICOM, and the info-center loghost source command is configured, or vpn-instance vpn-instance-name is provided in the info-center loghost command, the field is displayed as the IP address of the device that generates the system information.

·           In other cases (when the system information is sent to a log host in the format of H3C, or sent to other destinations), the field is displayed as the name of the device that generates the system information, namely, the system name of the device. You can use the sysname command to modify the system name. For more information, see Fundamentals Command Reference.

%% (vendor ID)

This field indicates that the information is generated by an H3C device. It is displayed only when the system information is sent to a log host in the format of H3C.

vv

This field is a version identifier of syslog, with a value of 10. It is displayed only when the output destination is log host.

module

The module field represents the name of the module that generates system information. You can enter the info-center source ? command in system view to view the module list.

level (severity)

System information can be divided into eight levels based on its severity, from 0 to 7. See Table 1 for definition and description of these severity levels. The levels of system information generated by modules are predefined by developers, and you cannot change the system information levels. However, with the info-center source command, you can configure to output information of the specified level and not to output information lower than the specified level.

digest

The digest field is a string of up to 32 characters, outlining the system information.

For system information destined to the log host:

·           If the character string ends with (l), the information is log information

·           If the character string ends with (t), the information is trap information

·           If the character string ends with (d), the information is debugging information

For system information destined to other destinations:

·           If the timestamp starts with a percent sign (%), the information is log information

·           If the timestamp starts with a pound sign (#), the information is trap information

·           If the timestamp starts with an asterisk (*), the information is debugging information

serial number

This field indicates the serial number of the device that generates the system information. It is displayed only when the system information is sent to a log host in the format of UNICOM.

source

This field indicates the source of the information, such as the slot number of a board or the source IP address of the log sender. This field is optional and is displayed only when the system information is sent to a log host in the format of H3C.

content

This field provides the content of the system information.

Configuring information center

Information center configuration task list

Complete the following tasks to configure information center:

 

Task

Remarks

Outputting system information to the console

Optional

Outputting system information to a monitor terminal

Optional

Outputting system information to a log host

Optional

Outputting system information to the trap buffer

Optional

Outputting system information to the log buffer

Optional

Outputting system information to the SNMP module

Optional

Outputting system information to the web interface

Optional

Saving system information to a log file

Optional

Configuring synchronous information output

Optional

Disabling a port from generating link up/down logging information

Optional

 

Outputting system information to the console

Outputting system information to the console

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.    Configure the channel through which system information can be output to the console.

info-center console channel { channel-number | channel-name }

Optional.

By default, system information is output to the console through channel 0 (known as console).

5.    Configure the output rules of system information.

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

Optional.

See “Default output rules of system information.”

6.    Configure the format of the time stamp.

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

The time stamp format for log, trap and debugging information is date by default.

 

Enabling the display of system information on the console

After setting to output system information to the console, you need to enable the associated display function to display the output information on the console.

Follow these steps in user view to enable the display of system information on the console:

 

Step

Command

Remarks

1.    Enable the monitoring of system information on the console.

terminal monitor

Optional.

Enabled on the console and disabled on the monitor terminal by default.

2.    Enable the display of debugging information on the console.

terminal debugging

Disabled by default.

3.    Enable the display of log information on the console.

terminal logging

Optional.

Enabled by default.

4.    Enable the display of trap information on the console.

terminal trapping

Optional

Enabled by default.

 

Outputting system information to a monitor terminal

System information can also be output to a monitor terminal, which is a user terminal that has login connections through the AUX, VTY, or TTY user interface.

Outputting system information to a monitor terminal

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.    Configure the channel through which system information can be output to a monitor terminal.

info-center monitor channel { channel-number | channel-name }

Optional.

By default, system information is output to the monitor terminal through channel 1 (known as monitor).

5.    Configure the output rules of the system information.

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

Optional.

See “Default output rules of system information.”

6.    Configure the format of the time stamp.

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

By default, the time stamp format for log, trap and debugging information is date.

 

Enabling the display of system information on a monitor terminal

After setting to output system information to a monitor terminal, you need to enable the associated display function in order to display the output information on the monitor terminal.

To enable the display of system information on a monitor terminal:

 

Step

Command

Remarks

1.    Enable the monitoring of system information on a monitor terminal.

terminal monitor

Enabled on the console and disabled on the monitor terminal by default.

2.    Enable the display of debugging information on a monitor terminal.

terminal debugging

Disabled by default.

3.    Enable the display of log information on a monitor terminal.

terminal logging

Optional.

Enabled by default.

4.    Enable the display of trap information on a monitor terminal.

terminal trapping

Optional.

Enabled by default.

 

Outputting system information to a log host

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional

See Table 2 for default channel names.

4.    Configure the output rules of the system information.

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

Optional.

See “Default output rules of system information.”

5.    Specify the source IP address for the log information.

info-center loghost source interface-type interface-number

Optional.

By default, the source interface is determined by the matched route, and the primary IP address of this interface is the source IP address of the log information.

6.    Configure the format of the time stamp for system information output to the log host.

info-center timestamp loghost { date | iso | no-year-date | none }

Optional.

date by default.

7.    Set the formation of the system information sent to a log host to UNICOM.

info-center format unicom

Optional.

H3C by default.

8.    Specify a log host and configure the related output parameters.

info-center loghost [ vpn-instance vpn-instance-name ] { host-ipv4-address | ipv6 host-ipv6-address } [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] *

By default, the system does not output information to a log host. If you specify to output system information to a log host, the system uses channel 2 (loghost) by default.

The value of the port-number argument should be the same as the value configured on the log host, otherwise, the log host cannot receive system information.

 

Outputting system information to the trap buffer

 

 

NOTE:

The trap buffer receives the trap information only, and discards the log and debugging information even if you have configured to output them to the trap buffer.

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.    Configure the channel through which system information can be output to the trap buffer and specify the buffer size.

info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] *

Optional.

By default, system information is output to the trap buffer through channel 3 (known as trapbuffer) and the default buffer size is 256.

5.    Configure the output rules of the system information.

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

Optional.

See “Default output rules of system information.”

6.    Configure the format of the time stamp.

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

The time stamp format for log, trap and debugging information is date by default.

 

Outputting system information to the log buffer

 

 

NOTE:

You can configure to output log, trap, and debugging information to the log buffer, but the log buffer receives the log and debugging information only, and discards the trap information.

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.    Configure the channel through which system information can be output to the log buffer and specify the buffer size.

info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ] *

Optional.

By default, system information is output to the log buffer through channel 4 (known as logbuffer) and the default buffer size is 512.

5.    Configure the output rules of the system information.

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

Optional.

See “Default output rules of system information.”

6.    Configure the format of the timestamp.

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

The time stamp format for log, trap and debugging information is date by default.

 

Outputting system information to the SNMP module

 

 

NOTE:

The SNMP module receives the trap information only, and discards the log and debugging information even if you have configured to output them to the SNMP module.

 

To monitor the device running status, trap information is usually sent to the SNMP network management station (NMS). In this case, you need to configure to send traps to the SNMP module, and then set the trap sending parameters for the SNMP module to further process traps. For more information, see the chapter “SNMP configuration.”

To configure to output system information to the SNMP module:

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Name the channel with a specified channel number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.    Configure the channel through which system information can be output to the SNMP module.

info-center snmp channel { channel-number | channel-name }

Optional.

By default, system information is output to the SNMP module through channel 5 (known as snmpagent).

5.    Configure the output rules of the system information.

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

Optional.

See “Default output rules of system information.”

6.    Configure the format of the timestamp.

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

The time stamp format for log, trap and debugging information is date by default.

 

Outputting system information to the web interface

This feature allows you to control whether to output system information to the Web interface and which system information can be output to the Web interface. The Web interface provides abundant search and sorting functions; therefore, if you configure to output the system information to the Web interface, you can view system information by clicking corresponding tabs after logging in to the device through the Web interface.

To set to output system information to the web interface:

To do…

Use the command…

Remarks

Enter system view

system-view

N/A

Enable information center

info-center enable

Optional.

Enabled by default.

Name the channel with a specified channel number

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

Configure the channel through which system information can be output to the Web interface

info-center syslog channel { channel-number | channel-name }

Optional.

By default, system information is output to the Web interface through channel 6.

Configure the output rules of the system information

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

Optional.

See “Default output rules of system information.”

Configure the format of the time stamp

info-center timestamp { debugging | log | trap } { boot | date | none }

Optional.

The time stamp format for log, trap and debugging information is date by default.

 

 

NOTE:

You can configure to output log, trap and debugging information to a channel. However, when this channel is bound with the output destination Web interface, after logging in through the Web interface, you can view log information of specific types only, and other types of information will be filtered out.

 

Saving system information to a log file

With the log file feature enabled, the log information generated by system can be saved to a specified directory with a predefined frequency. This allows you to check the operation history at any time to make sure that the router functions properly.

Logs are saved into the logfile buffer before they are saved into a log file. The system writes the logs in the logfile buffer into the log file at a specified frequency, which is usually set to 24 hours and during a relatively free time, in mornings for example. You can also manually save the logs. After the logs in the logfile buffer are saved into the log file successfully, the system clears the logfile buffer.

A log file has capacity limitations. When the size of a log file reaches the maximum value:

·           If the router only supports a single log file, the system will delete the earliest message(s)and write new message(s) into the log file. The directory of a log file varies with the router models. Typically, a log file is saved in the directory /logfile/logfile.log.

·           If the device supports multiple log files, the system will create new log files to save new messages. The new log files will be named as logfile1.log, logfile2.log, and so on. When the number of log files reaches the upper limit, or the storage media has no space available, the system will delete the earliest log file and create a new one.

To set to save system information to a log file:

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable information center.

info-center enable

Optional.

Enabled by default.

3.    Enable the log file feature.

info-center logfile enable

Optional.

Enabled by default.

4.    Configure the frequency with which the log file is saved.

info-center logfile frequency freq-sec

Optional.

The default value is 60 seconds.

5.    Configure the maximum storage space reserved for a log file.

info-center logfile size-quota size

Optional.

The default value is 10 MB.

6.    Configure the directory to save the log file.

info-center logfile switch-directory dir-name

Optional.

By default, it is the logfile directory under the root directory of the memory device, which varies with routers.

7.    Manually save the log buffer content to the log file.

logfile save

Optional.

Available in any view.

By default, the system saves the log file with the frequency defined by the info-center logfile frequency command.

 

 

NOTE:

·       To make sure that the router works normally, use the info-center logfile size-quota command to set a logfile to be no smaller than 1 MB and no larger than 10 MB.

·       Use the info-center logfile switch-directory command to manually configure the directory to which a log file can be saved. The configuration becomes invalid at a system reboot or an active/standby switchover.

 

Configuring synchronous information output

Synchronous information output refers to the feature that if the user’s input is interrupted by system output such as log, trap, or debugging information, then after the completion of system output the system will display a command line prompt (a prompt in command editing mode, or a [Y/N] string in interaction mode) and your input so far.

This command is used in the case that your input is interrupted by a large amount of system output. With this feature enabled, you can continue your operations from where you were stopped.

To enable synchronous information output:

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enable synchronous information output.

info-center synchronous

Disabled by default.

 

 

NOTE:

·       If system information, such as log information, is output before you input any information under the current command line prompt, the system will not display the command line prompt after the system information output.

·       If system information is output when you are inputting some interactive information (non Y/N confirmation information), then after the system information output, the system will not display the command line prompt but your previous input in a new line.

 

Disabling a port from generating link up/down logging information

By default, all the ports of the router generate link up/down logging information when the port state changes. Therefore, you may need to use this function in some cases, for example:

·           You only concern the states of some of the ports. In this case, you can use this function to disable the other ports from generating link up/down logging information.

·           The state of a port is not stable, and therefore redundant logging information will be generated. In this case, you can use this function to disable the port from generating link up/down logging information.

Follow the steps below to disable a port from generating link up/down logging information:

 

Step

Command

Remarks

1.    Enter system view.

system-view

N/A

2.    Enter interface view.

interface interface-type interface-number

N/A

3.    Disable the port from generating link up/down logging information.

undo enable log updown

By default, all ports are allowed to generate link up/down logging information when the port state changes.

 

 

NOTE:

With this feature applied to a port, when the state of the port changes, the system does not generate port link up/down logging information. In this case, you cannot monitor the port state changes conveniently. Therefore, H3C recommends that you use the default configuration in normal cases.

 

Displaying and maintaining information center

 

Task

Command

Remarks

Display information about information channels.

display channel [ channel-number | channel-name ] [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the information of each output destination.

display info-center [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the state of the log buffer and the recorded log information.

display logbuffer [ reverse ] [ level severity | size buffersize | slot slot-number]* [ | { begin | exclude | include } regular-expression ]

Available in any view

Display a summary of the log buffer.

display logbuffer summary [ level severity | slot slot-number ] * [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the content of the log file buffer.

display logfile buffer [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the configuration of the log file.

display logfile summary [ | { begin | exclude | include } regular-expression ]

Available in any view

Display the state of the trap buffer and the trap information recorded.

display trapbuffer [ reverse ] [ size buffersize ] [ | { begin | exclude | include } regular-expression ]

Available in any view

Reset the log buffer.

reset logbuffer

Available in user view

Reset the trap buffer.

reset trapbuffer

Available in user view

 

Information center configuration examples

Outputting log information to a Unix log host

Network requirements

·           Send log information to a Unix log host with an IP address of 1.2.0.1/16.

·           Log information with severity higher than informational will be output to the log host.

·           The source modules are ARP and IP.

Figure 2 Network diagram

 

Configuration procedure

Before the configuration, make sure that there is a route between Device and PC.

1.       Configure Device

# Enable information center.

<Sysname> system-view

[Sysname] info-center enable

# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log information (optional, loghost by default), and use local4 as the logging facility.

[Sysname] info-center loghost 1.2.0.1 channel loghost facility local4

# Disable the output of log, trap, and debugging information of all modules to the log host.

[Sysname] info-center source default channel loghost debug state off log state off trap state off

 

CAUTION

CAUTION:

As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (loghost in this example) first and then configure the output rule as needed so that unnecessary information will not be output.

 

# Configure the information output rule: allow log information of ARP and IP modules with severity equal to or higher than informational to be output to the log host. (Note that the source modules allowed to output information depend on the router model.)

[Sysname] info-center source arp channel loghost log level informational state on

[Sysname] info-center source ip channel loghost log level informational state on

2.       Configure the log host

The following configurations were performed on SunOS 4.0 which has similar configurations to the Unix operating systems implemented by other vendors.

a.    Log in to the log host as a root user.

b.    Create a subdirectory named Device under directory /var/log/, and create file info.log under the Device directory to save logs of Device.

# mkdir /var/log/Device

# touch /var/log/Device/info.log

c.     Edit file /etc/syslog.conf and add the following contents.

# MyDevice configuration messages

local4.info    /var/log/Device/ info.log

In the above configuration, local4 is the name of the logging facility used by the log host to receive logs. info is the information level. The Unix system will record the log information with severity level equal to or higher than informational to file /var/log/Device/info.log.

 

 

NOTE:

Be aware of the following issues while editing the /etc/syslog.conf file:

·       Comments must be on a separate line and must begin with the # sign.

·       No redundant spaces are allowed in the file name.

·       The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the device using the info-center loghost and info-center source commands; otherwise the log information may not be output properly to the log host.

 

d.    After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the following commands to display the process ID of syslogd, kill the syslogd process and then restart syslogd using the –r option to make the modified configuration take effect.

# ps -ae | grep syslogd

147

# kill -HUP 147

# syslogd -r &

After the above configurations, the system will be able to keep log information in the related file.

Outputting log information to a Linux log host

Network requirements

·           Send log information to a Linux log host with an IP address of 1.2.0.1/16.

·           Log information with severity higher than informational will be output to the log host.

·           All modules can output log information.

Figure 3 Network diagram

 

Configuration procedure

Before the configuration, make sure that there is a route between Device and PC.

1.       Configure Device

# Enable information center.

<Sysname> system-view

[Sysname] info-center enable

# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log information (optional, loghost by default), and use local5 as the logging facility.

[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5

# Disable the output of log, trap, and debugging information of all modules on channel loghost.

[Sysname] info-center source default channel loghost debug state off log state off trap state off

 

CAUTION

CAUTION:

As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (loghost in this example) first and then configure the output rule as needed so that unnecessary information will not be output.

 

# Configure the information output rule: allow log information of all modules with severity equal to or higher than informational to be output to the log host.

[Sysname] info-center source default channel loghost log level informational state on

2.       Configure the log host

a.    Log in to the log host as a root user.

b.    Create a subdirectory named Device under directory /var/log/, and create file info.log under the Device directory to save logs of Device.

# mkdir /var/log/Device

# touch /var/log/Device/info.log

c.     Edit file /etc/syslog.conf and add the following contents.

# Device configuration messages

local5.info    /var/log/Device/info.log

In the above configuration, local5 is the name of the logging facility used by the log host to receive logs. info is the information level. The Linux system will record the log information with severity level equal to or higher than informational to file /var/log/Device/info.log.

 

 

NOTE:

Be aware of the following issues while editing the /etc/syslog.conf file:

·       Comments must be on a separate line and must begin with the # sign.

·       No redundant spaces are allowed in the file name.

·       The router name and the accepted severity of the log information specified by the /etc/syslog.conf file must be identical to those configured on the router using the info-center loghost or info-center source command; otherwise the log information may not be output properly to the log host.

·       The logging facility name and the information level specified in the /etc/syslog.conf file must be identical to those configured on the device using the info-center loghost and info-center source commands; otherwise the log information may not be output properly to the log host.

 

d.    After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the following commands to display the process ID of syslogd, kill the syslogd process, and restart syslogd using the -r option to make the modified configuration take effect.

# ps -ae | grep syslogd

147

# kill -9 147

# syslogd -r &

 

 

NOTE:

Make sure that the syslogd process is started with the -r option on a Linux log host.

 

After the above configurations, the system will be able to keep log information in the related file.

Outputting log information to the console

Network requirements

·           Log information with a severity higher than informational will be output to the console;

·           The source modules are ARP and IP.

Figure 4 Network diagram

 

Configuration procedure

# Enable information center.

<Sysname> system-view

[Sysname] info-center enable

# Use channel console to output log information to the console (optional, console by default).

[Sysname] info-center console channel console

# Disable the output of log, trap, and debugging information of all modules on channel console.

[Sysname] info-center source default channel console debug state off log state off trap state off

 

CAUTION

CAUTION:

As the default system configurations for different channels are different, you need to disable the output of log, trap, and debugging information of all modules on the specified channel (console in this example) first and then configure the output rule as needed so that unnecessary information will not be output.

 

# Configure the information output rule: allow log information of ARP and IP modules with severity equal to or higher than informational to be output to the console. (Note that the source modules allowed to output information depend on the router model.)

[Sysname] info-center source arp channel console log level informational state on

[Sysname] info-center source ip channel console log level informational state on

[Sysname] quit

# Enable the display of log information on a terminal. (Optional, this function is enabled by default.)

<Sysname> terminal monitor

Info: Current terminal monitor is on.

<Sysname> terminal logging

Info: Current terminal logging is on.

After the above configuration takes effect, if the specified module generates log information, the information center automatically sends the log information to the console, which then displays the information.

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网