- Table of Contents
-
- 13-Network Management and Monitoring Configuration Guide
- 00-Preface
- 01-System Maintenance and Debugging Configuration
- 02-NQA Configuration
- 03-NTP Configuration
- 04-IPC Configuration
- 05-SNMP Configuration
- 06-RMON Configuration
- 07-CWMP Configuration
- 08-Sampler Configuration
- 09-Mirroring Configuration
- 10-Protocol Packet Statistics Configuration
- 11-sFlow Configuration
- 12-Information Center Configuration
- 13-Packet Capture Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
12-Information Center Configuration | 204.18 KB |
Configuring the information center
Classification of system information
System information channels and output destinations
Default output rules of system information
Information center configuration task list
Outputting system information to the console
Outputting system information to the monitor terminal
Outputting system information to a log host
Outputting system information to the trap buffer
Outputting system information to the log buffer
Outputting system information to the SNMP module
Outputting system information to the Web interface
Saving system information to a log file
Enabling log file overwrite-protection·
Saving security logs into the security log file
Configuring synchronous information output
Disabling an interface from generating link up/down logging information
Displaying and maintaining information center
Information center configuration examples
Outputting log information to the console
Overview
The information center collects and manages system information as follows:
· Receives system information including log, trap, and debug information from source modules.
· Outputs the information to different information channels, according to output rules.
· Outputs information to different destinations, based on channel-to-destination associations.
Figure 1 Information center diagram
By default, the information center is enabled. It affects system performance to some degree when it is processing large amounts of information. If the system resources are insufficient, disable the information center to save resources.
Classification of system information
System information is classified into the following types:
· Log information—Describes user operations and interface state changes.
· Trap information—Describes switch faults such as authentication and network failures.
· Debug information—Displays switch running status for troubleshooting.
Source modules refer to protocol modules, board drivers, and configuration modules which generate system information. You can classify, filter, and output system information based on source modules. To view the supported source modules, use info-center source ?.
System information levels
System information is classified into eight severity levels, from 0 through 7 in descending order. The switch outputs the system information with a severity level that is higher than or equal to the specified level. For example, if you configure an output rule with a severity level of 6 (informational), information that has a severity level from 0 to 6 is output.
Table 1 System information levels
Severity |
Severity value |
Description |
Corresponding keyword in commands |
Emergency |
0 |
The system is unusable. For example, the system authorization has expired. |
emergencies |
Alert |
1 |
Action must be taken immediately. For example, traffic on the interface exceeds the upper limit. |
alerts |
Critical |
2 |
Critical condition. For example, the switch temperature exceeds the upper limit, the power module fails, or the fan tray fails. |
critical |
Error |
3 |
Error condition. For example, the link state changes or a storage card is unplugged. |
errors |
Warning |
4 |
Warning condition. For example, the switch is being logged into through Web interface, or the memory resources are used up. |
warnings |
Notification |
5 |
Normal but significant condition. For example, a terminal logs in to the switch or the switch reboots. |
notifications |
Informational |
6 |
Informational message. For example, a command or a ping operation is executed. |
informational |
Debug |
7 |
Debugging message. |
debugging |
System information channels and output destinations
The system supports ten channels. By default, channels 0 through 6, and channel 9 are configured with channel names and output destinations. You can change these default settings with commands as needed. You can also configure channels 7 and 8 and associate them with specific output destinations to meet your requirements.
You can use the info-center channel name command to change the name of an information channel.
Each output destination receives information from only one information channel, but each information channel can output information to multiple output destinations.
Table 2 Default information channels and output destinations
Information channel number |
Default channel name |
Default output destination |
System information received by default |
0 |
console |
Console |
Log, trap and debug information |
1 |
monitor |
Monitor terminal |
Log, trap and debug information |
2 |
loghost |
Log host |
Log, trap and debug information |
3 |
trapbuffer |
Trap buffer |
Trap information |
4 |
logbuffer |
Log buffer |
Log and debug information |
5 |
snmpagent |
SNMP module |
Trap information |
6 |
channel6 |
Web interface |
Log information |
7 |
channel7 |
Not specified |
Log, trap, and debug information |
8 |
channel8 |
Not specified |
Log, trap, and debug information |
9 |
channel9 |
Log file |
Log, trap, and debug information |
Default output rules of system information
A default output rule specifies the system information source modules, information type, and severity levels for an output destination.
Table 3 Default output rules
Output destination |
System information source |
Log |
Trap |
Debug |
|||
Status |
Severity |
Status |
Severity |
Status |
Severity |
||
Console |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Log host |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
All supported modules |
Disabled |
Informational |
Enabled |
Informational |
Disabled |
Debug |
Log buffer |
All supported modules |
Enabled |
Informational |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
All supported modules |
Disabled |
Debug |
Enabled |
Informational |
Disabled |
Debug |
Web interface |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
Log file |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
System information formats
The following shows the original format of system information, which may be different from what you see. The actual format depends on the log resolution tool you use.
The format of system information displayed on the Web interface depends on the Web interface.
Format
The format of system information varies with output destinations.
Table 4 System information formats
Output destination |
Format |
Example |
Console, monitor terminal, logbuffer, trapbuffer, SNMP module, or log file |
timestamp sysname module/level/digest: content |
%Jun 26 17:08:35:809 2008 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1. |
Log host |
· H3C format: · UNICOM format: |
· H3C format: · UNICOM format: ¡ <186>Oct 13 16:48:08 2000 Sysname 10IFNET/2/210231a64jx073000020: log_type=port;content=Vlan-interface1 link status is DOWN. ¡ <186>Oct 13 16:48:08 2000 Sysname 10IFNET/2/210231a64jx073000020: log_type=port;content=Line protocol on the interface Vlan-interface1 is DOWN. |
Field description
Field |
Description |
PRI (priority) |
The priority is calculated by using this formula: facility*8+severity, where: · facility is the facility name. It can be configured with info-center loghost. It is used to identify different log sources on the log host, and to query and filter logs from specific log sources. · The severity value ranges from 0 to 7. See Table 1 for more information. Note that the priority field is available only for information that is sent to the log host. |
timestamp |
The timestamp records the time when the system information was generated. The timestamp of the system information sent to the log host has a precision of seconds, and that to all the other destinations has a precision of milliseconds. 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 system information destined to destinations except for the log host: · 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 debug information. See Table 5 for more information about the timestamp format. |
Sysname (host name or host IP address) |
· If the system information is sent to a log host in UNICOM format, and the info-center loghost source command is configured, or the vpn-instance vpn-instance-name option is provided in the info-center loghost command, this field is displayed as the IP address of the switch that generated the system information. · If the system information sent is in H3C format, this field is displayed as the system name of the switch that generated the system information. You can use the sysname command to modify the local system name. For more information, see Fundamentals Command Reference. |
%% (vendor ID) |
This field indicates that the information was generated by an H3C device. It is displayed only when the system information is sent to a log host in H3C format. |
vv |
This field identifies the version of syslog, and has a value of 10. It exists only in system information sent to a log host. |
module |
This field specifies the name of the module that generated the system information. You can enter the info-center source ? command in system view to view the module list. |
level (severity) |
System information is divided into eight severity levels, from 0 to 7 in descending order. See Table 1 for more information about these severity levels. You cannot change the system information levels generated by modules. However, you can use the info-center source command to control the output of system information based on severity levels. |
digest |
This field briefly describes the content of the system information. It contains a string of up to 32 characters. 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 debug information. |
serial_number |
This field indicates the serial number of the switch that generated the system information. It is displayed only when the system information is sent to a log host in UNICOM format. |
source |
This optional field identifies the source of the information. It is displayed only when the system information is sent to a log host in H3C format. It can take one of the following values: · Slot number of the card. · IRF member ID. · IRF member ID and card slot number. · IP address of the log sender. |
content |
This field provides the content of the system information. |
Table 5 Description of the timestamp format
Timestamp format |
Description |
Example |
boot |
Time since system startup, in the format of xxx.yyy. xxx represents the higher 32 bits, and yyy represents the lower 32 bits. System information sent to all destinations except log host supports this parameter. |
%0.109391473 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. 0.109391473 is a timestamp in the boot format. |
date |
Current date and time, in the format of mm dd hh:mm:ss:xxx yyy. All system information supports this parameter. |
%May 30 05:36:29:579 2003 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. May 30 05:36:29:579 2003 is a timestamp in the date format. |
iso |
Timestamp format stipulated in ISO 8601. Only system information that is sent to the log host supports this parameter. |
<189>2003-05-30T06:42:44 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully. 2003-05-30T06:42:44 is a timestamp in the iso format. |
none |
No timestamp is included. All system information supports this parameter. |
% Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully. No timestamp is included. |
no-year-date |
Current date and time without year information, in the format of mm dd hh:mm:ss:xxx. Only the system information that is sent to the log host supports this parameter. |
<189>May 30 06:44:22 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully. May 30 06:44:22 is a timestamp in the no-year-date format. |
FIPS compliance
The switch supports the FIPS mode that complies with NIST FIPS 140-2 requirements. Support for features, commands, and parameters might differ in FIPS mode and non-FIPS mode. For more information about FIPS mode, see Security Configuration Guide.
Information center configuration task list
Task |
Remarks |
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Optional. |
|
Disabling an interface from generating link up/down logging information |
Optional. |
Configurations for the information output destinations function independently.
Outputting system information to the console
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Name the channel identified by its channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for 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 an output rule for the console. |
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. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. By default, the timestamp format for log, trap, and debug information is date. |
7. Return to user view. |
quit |
N/A |
8. Enable log output to the console. |
terminal monitor |
The default setting is enabled. |
9. (Optional.) Enable the display of system information on the console. |
· Enable the display of debug information on the console: · Enable the display of log information on the console: · Enable the display of trap information on the console: |
Optional. By default, the console displays log and trap information, and discards debug information. |
Outputting system information to the monitor terminal
Monitor terminals refer to terminals that log in to the device through the AUX or VTY user interface.
To output system information to the monitor terminal:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for the 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 an output rule for the monitor terminal. |
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. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. By default, the timestamp format for log, trap, and debug information is date. |
7. Return to user view. |
quit |
N/A |
8. Enable log output to the monitor terminal. |
terminal monitor |
The default setting is enabled. |
9. Enable the display of system information on the monitor terminal. |
· Enable the display of debug information on the monitor terminal: · Enable the display of log information on the monitor terminal: · Enable the display of trap information on the monitor terminal: |
Optional. By default, the monitor terminal displays log and trap information, and discards debug information. |
For more information about terminal access, see Terminal Access Configuration Guide.
Outputting system information to a log host
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output rule for the log host. |
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. |
5. Specify the source IP address for the log information. |
info-center loghost source interface-type interface-number |
Optional. By default, the source IP address of output log information is the primary IP address of the matching route's egress interface. |
6. Configure the format of the timestamp 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 format of the system information sent to a log host. |
· Set the format to UNICOM: · Set the format to H3C: |
Optional. Use either approach. 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, no log host is specified. If you specify to output system information to a log host without providing the channel, the system uses channel 2 (loghost) by default. The value of the port-number argument must be the same as that configured on the log host. Otherwise, the log host cannot receive system information. |
Outputting system information to the trap buffer
The trap buffer only receives trap information, and discards log and debug information.
To output system information to the trap buffer:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
1. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
2. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for the default channel names. |
3. Configure an output channel for the trap buffer and set 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. |
4. Configure an output rule for the trap buffer. |
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. |
5. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the log buffer
The log buffer only receives log information, and discards trap and debug information.
To output system information to the log buffer:
Step |
Command |
Remarks |
1. Enter system view. |
N/A |
|
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for the default channel names. |
4. Configure an output channel for the log buffer and set 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 an output rule for the log buffer. |
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. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the SNMP module
The SNMP module only receives trap information, and discards log and debug information
To monitor the device running status, trap information is usually sent to the SNMP network management system (NMS). For this purpose, you must configure output of traps to the SNMP module, and set the trap sending parameters for the SNMP module. For more information about SNMP, see "Configuring SNMP."
To output system information to the SNMP module:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for the default channel names. |
4. Configure an output channel for 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 an output rule for the SNMP module. |
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. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Outputting system information to the Web interface
The Web interface receives log information only, and discards the trap and debug information.
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. 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 output system information to the Web interface:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
Optional. Enabled by default. |
3. Specify the name for a channel identified by the channel number. |
info-center channel channel-number name channel-name |
Optional. See Table 2 for default channel names. |
4. Configure an output channel for 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. |
5. Configure an output rule for the Web interface. |
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. |
6. Configure the timestamp format. |
info-center timestamp { debugging | log | trap } { boot | date | none } |
Optional. The timestamp format for log, trap and debug information is date by default. |
Saving system information to a log file
Perform this task to save system information to a log file at a specific interval. You can also manually save information to a log file.
System information is saved into the log file buffer. The system writes the information from the log file buffer to the log file at the specified interval. You can also manually save the information while the switch is not busy. After the information in the log file buffer is saved into a log file, the system clears the log file buffer.
A log file has a specific capacity. When the capacity is reached, the system creates a new log file to save new messages. The log files are named as logfile1.log, logfile2.log, and so on. When the number of log files reaches the upper limit, or the storage device runs out of space, the system deletes the earliest log file and creates a new one.
To save system information to a log file:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the 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 log file saving interval. |
info-center logfile frequency freq-sec |
Optional. The default saving interval is 86400 seconds. |
5. Configure the maximum storage space for a log file. |
info-center logfile size-quota size |
Optional. To ensure normal operation, set the size to a value between 1 MB and 10 MB. |
6. Configure the directory to save the log file. |
info-center logfile switch-directory dir-name |
Optional. By default, the log file is saved in the logfile directory under the root directory of the storage device, which varies with devices. The configuration made by this command cannot survive a reboot or an active/standby switchover. |
7. Manually save the log buffer contents to the log file. |
logfile save |
Optional. By default, the system saves the log file at the interval configured by the info-center logfile frequency command. Available in any view. |
Enabling log file overwrite-protection
This function is supported only in FIPS mode.
This function enables a device to shut down all its physical ports except for the console port, the aux port, the management Ethernet port, and the physical ports bound to an IRF port when the number of log files reaches the upper limit or the storage device runs out of space.
To enable log file overwrite-protection:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable log file overwrite-protection. |
info-center logfile overwrite-protection |
Log file overwrite-protection is disabled by default. |
Saving security logs into the security log file
Security logs are very important for locating and troubleshooting network problems. Generally, security logs are output together with other logs. It is difficult to identify security logs among all logs.
To solve this problem, you can save security logs into a security log file without affecting the current log output rules.
After you enable the saving of the security logs into the security log file, the system first outputs security logs to the security log file buffer, and then saves the logs from the security log file buffer into the security log file at a specified interval (the security log administrator can also manually save security logs into the log file). After the logs are saved, the buffer is cleared immediately.
The size of the security log file is limited. When the maximum size is reached, the system deletes the oldest log and writes the new log into the security log file. To avoid security log loss, you can set an alarm threshold for the security log file usage. When the alarm threshold is reached, the system outputs a message to inform the administrator. The administrator can log in to the device as the security log administrator and back up the security log file to prevent the loss of important data.
To save security logs into the security log file:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enable the information center. |
info-center enable |
By default, the information center is enabled. |
3. Enable the saving of the security logs into the security log file. |
info-center security-logfile enable |
By default, this function is disabled. |
4. Set the interval at which the system saves security logs. |
info-center security-logfile frequency freq-sec |
The default saving interval is 600 seconds. |
5. (Optional.) Set the maximum size of the security log file. |
info-center security-logfile size-quota size |
The default setting is 1 MB. |
6. (Optional.) Set the alarm threshold of the security log file usage. |
info-center security-logfile alarm-threshold usage |
By default, the alarm threshold of the security log file usage is 80. (That is, when the usage of the security log file reaches 80%, the system will inform the user.) |
Configuring synchronous information output
The output of system logs interrupts ongoing configuration operations. You have to find the previously input commands before the logs. Synchronous information output can show the previous input after log output and a command prompt in command editing mode, or a [Y/N] string in interaction mode so you can continue your operation from where you were stopped.
If system information, such as log information, is output before you input any information under the current command line prompt, the system does 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), the system displays your previous input in a new line but does not display the command line prompt.
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. |
Disabling an interface from generating link up/down logging information
By default, all interfaces generate link up or link down log information when the state changes. In some cases, you might want to disable specific interfaces from generating this information. For example:
· You are concerned only about the states of some interfaces. In this case, you can use this function to disable other interfaces from generating link up and link down log information.
· An interface is unstable and continuously outputs log information. In this case, you can disable the interface from generating link up and link down log information.
To disable an interface 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 interface from generating link up or link down logging information. |
undo enable log updown |
By default, all interfaces generate link up and link down logging information when the state changes. |
Use the default setting in normal cases to avoid affecting interface status monitoring.
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 log information recorded (in standalone mode). |
display logbuffer [ reverse ] [ level severity | size buffersize | slot slot-number ] * [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the state of the log buffer and the log information recorded (in IRF mode). |
display logbuffer [ reverse ] [ level severity | size buffersize | chassis chassis-number slot slot-number ] * [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display a summary of the log buffer (in standalone mode). |
display logbuffer summary [ level severity | slot slot-number ] * [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display a summary of the log buffer (in IRF mode). |
display logbuffer summary [ level severity | chassis chassis-number 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. |
Clear the log buffer. |
reset logbuffer |
Available in user view. |
Clear the trap buffer. |
reset trapbuffer |
Available in user view. |
Information center configuration examples
By default, Ethernet, VLAN, and aggregate interfaces are down. To configure these types of interfaces, bring them up first with the undo shutdown command.
Outputting log information to the console
Network requirements
Configure the device to send ARP and IP log information that has a severity level of at least informational to the console.
Figure 2 Network diagram
Configuration procedure
# Enable the information center.
<Sysname> system-view
[Sysname] info-center enable
# Use channel console to output log information to the console. (This step is optional because it is the default setting.)
[Sysname] info-center console channel console
# Disable the output of log, trap, and debug information of all modules on the channel console.
[Sysname] info-center source default channel console debug state off log state off trap state off
To avoid outputting unnecessary information, disable the output of log, trap, and debug information of all modules on the specified channel (console in this example), and then configure the output rule as needed.
# Configure an output rule to output to the console ARP and IP log information that has a severity level of at least informational.
[Sysname] info-center source arp channel loghost log level informational state on debug state off trap state off
[Sysname] info-center source ip channel loghost log level informational state on debug state off trap state off
[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.
Now, if the ARP and IP modules generate log information, the information center automatically sends the log information to the console, which displays the information.
Outputting log information to a UNIX log host
Network requirements
Configure the device to send ARP and IP log information that has a severity level of at least informational to the UNIX log host at 1.2.0.1/16.
Figure 3 Network diagram
Configuration procedure
Before the configuration, make sure the device and the log host can reach each other.
1. Configure the device:
# Enable the information center.
<Device> system-view
[Device] 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.
[Device] info-center loghost 1.2.0.1 channel loghost facility local4
# Disable the output of log, trap, and debug information of all modules on channel loghost.
[Device] info-center source default channel loghost debug state off log state off trap state off
To avoid outputting unnecessary information, disable the output of log, trap, and debug information of all modules on the specified channel (loghost in this example), and then configure the output rule as needed.
# Configure an output rule to output to the log host ARP and IP log information that has a severity level of at least informational.
[Device] info-center source arp channel loghost log level informational state on trap state off
[Device] info-center source ip channel loghost log level informational state on trap state off
2. Configure the log host:
The following configurations were performed on Solaris 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 in directory /var/log/, and then create file info.log in the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
c. Edit the file syslog.conf in directory /etc/ and add the following contents.
# Device configuration messages
local4.info /var/log/Device/info.log
In this configuration, local4 is the name of the logging facility that the log host uses to receive logs. info is the informational level. The UNIX system records the log information that has a severity level of at least informational to the file /var/log/Device/info.log.
|
NOTE: Be aware of the following issues while editing the file /etc/syslog.conf: · Comments must be on a separate line and must begin with a pound sign (#). · No redundant spaces are allowed after 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 by using the info-center loghost and info-center source commands. Otherwise the log information might not be output properly to the log host. |
d. 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 &
Now, the system can record log information into the log file.
Outputting log information to a Linux log host
Network requirements
Configure the device to send log information that has a severity level of at least informational to the Linux log host at 1.2.0.1/16.
Figure 4 Network diagram
Configuration procedure
Before the configuration, make sure the device and the log host can reach each other.
1. Configure the device:
# Enable the 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
# Configure an output rule to output to the log host the log information that has a severity level of at least informational.
[Sysname] info-center source default channel loghost log level informational state on debug state off trap state off
Disable the output of unnecessary information of all modules on the specified channel in the output rule.
2. Configure the log host:
a. Log in to the log host as a root user.
b. Create a subdirectory named Device in the directory /var/log/, and then create the file info.log in the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
c. Edit the file syslog.conf in the directory /etc/ and add the following contents.
# Device configuration messages
local5.info /var/log/Device/info.log
In this configuration, local5 is the name of the logging facility that the log host uses 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 file /etc/syslog.conf: · Comments must be on a separate line and must begin with a pound sign (#). · No redundant spaces are allowed after 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 by using the info-center loghost and info-center source commands. Otherwise, the log information might not be output properly to the log host. |
d. 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 &
Make sure the syslogd process is started with the -r option on a Linux log host.
Now, the system can record log information into the log file.