03-Network Management and Monitoring @CG@

HomeSupportWirelessH3C WX5500E Series Access ControllersConfigure & DeployConfiguration GuidesH3C WX5540E Access Controller Switching Engine Configuration Guides(R2607P26)-6W10103-Network Management and Monitoring @CG@
03-Information center configuration
Title Size Download
03-Information center configuration 179.89 KB

This chapter describes how to configure the information center.

Overview

The information center collects and classifies system information as follows:

·          Receives system information including log, trap, and debugging 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 divided into the following types:

·          Log information—Describes user operations and interface state changes.

·          Trap information—Describes device faults such as authentication and network failures.

·          Debugging information—Displays device 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 device 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 an interface exceeds the upper limit.

alerts

Critical

2

Critical condition. For example, the device 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.

errors

Warning

4

Warning condition. For example, the device is being logged into through the Web interface, or the memory resources are used up.

warnings

Notification

5

Normal but significant condition. For example, a terminal logs in to the device, or the device 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

Table 2 shows the 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 as needed. You can also configure channels 7 and 8 and associate them with specific output destinations to meet your needs.

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 debugging information

1

monitor

Monitor terminal

Log, trap and debugging information

2

loghost

Log host

Log, trap and debugging information

3

trapbuffer

Trap buffer

Trap information

4

logbuffer

Log buffer

Log information

5

snmpagent

SNMP module

Trap information

6

channel6

Web interface

Log information

7

channel7

Not specified

Log, trap, and debugging information

8

channel8

Not specified

Log, trap, and debugging information

9

channel9

Log file

Log, trap, and debugging 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 shows the default output rules.

Table 3 Default output rules

Destination

System information source modules

Log

Trap

Debug

Output switch

Severity

Output switch

Severity

Output switch

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

N/A

N/A

Enabled

Informational

N/A

N/A

Log buffer

All supported modules

Enabled

Informational

N/A

N/A

N/A

N/A

SNMP module

All supported modules

N/A

N/A

Enabled

Informational

N/A

N/A

Web interface

All supported modules

Enabled

Debug

N/A

N/A

N/A

N/A

Log file

All supported modules

Enabled

Debug

Enabled

Debug

Disabled

Debug

 

System information formats

The following shows the original format of system information, which might be different from what you see. The actual format depends on the log resolution tool you use.

Formats

The system information formats vary with output destionations. See Table 4.

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 2013 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1

Log host

·      H3C format:
<PRI>timestamp Sysname %%vvmodule/level/digest: source content

·      UNICOM format:
<PRI>timestamp Sysname vvmodule/level/serial_number: content

·      H3C format:
<189>Oct 9 14:59:04 2012 Sysname %%10SHELL/5/SHELL_LOGIN(l): VTY logged in from 192.168.1.21

·      UNICOM format:

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

¡ <186>Oct 13 16:48:08 2012 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+level, 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.

·      level ranges from 0 to 7. Table 1 describes details the severity levels.

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 log was generated.

Logs sent to the log host and those sent to the other destinations have different precisions, and their timestamp formats are configured with different commands. For more information, see Table 5 and Table 6.

Sysname (host name or host IP address)

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

·      If the system information is in the H3C format, the field is displayed as the system name of the device 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 exists only in logs sent to a log host.

vv (version information)

This field identifies the version of the log, and has a value of 10.

It exists only in logs sent to the log host.

Module

This field specifies the name of the module that generated the log. 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. See Table 1 for more information about 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 debugging information.

Serial Number

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

source

This optional field shows the IP address of the log sender. It is displayed only when the system information is sent to a log host in H3C format.

content

This field provides the content of the system information.

 

Table 5 Timestamp precisions and configuration commands

Item

Destined to the log host

Destined to the console, monitor terminal, log buffer, and log file

Precision

Seconds

Milliseconds

Command used to set the timestamp format

info-center timestamp loghost

info-center timestamp

 

Table 6 Description of the timestamp parameters

Timestamp parameters

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, of milliseconds elapsed.

System information that is sent to all destinations other than the 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 2013 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully.

May 30 05:36:29:579 2013 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>2013-05-30T06:42:44 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully.

2013-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.

 

Information center configuration task list

 

Task

Remarks

Outputting system information to the console

Optional.

Outputting system information to the 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 the log file

Optional.

Enabling synchronous information output

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

1.       Enable the information center.

info-center enable

Optional.

Enabled by default.

2.       Specify a name for a channel identified by its number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

3.       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).

4.       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.

See "Default output rules of system information."

5.       Configure the timestamp format.

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

Optional.

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

6.       Return to user view.

quit

N/A

7.       Enable system information output to the console.

terminal monitor

Optional.

The default setting is enabled.

8.       Enable the display of system information on the console.

·      Enable the display of debug information on the console:
terminal debugging

·      Enable the display of log information on the console:
terminal logging

·      Enable the display of trap information on the console:
terminal trapping

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 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 a name for a channel identified by its 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.

See "Default output rules of system information."

6.       Configure the timestamp format.

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

Optional.

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

7.       Return to user view.

quit

N/A

8.       Enable system information output to the monitor terminal.

terminal monitor

The default setting is disabled.

You must execute this command before you can enable the display of debug, log, and trap information on the monitor terminal.

9.       Enable the display of system information on the monitor terminal.

·      Enable the display of debug information on the monitor terminal:
terminal debugging

·      Enable the display of log information on the monitor terminal:
terminal logging

·      Enable the display of trap information on the monitor terminal:
terminal trapping

Optional.

By default, the monitor terminal displays log and trap information, and discards debug information.

 

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 a name for a channel identified by its 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.

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 the output interface of the matching route, and the primary IP address of the output interface is used as the source IP address of log information.

6.       Configure the timestamp format 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 system information format.

·      Set the format to UNICOM:
info-center format unicom

·      Set the format to H3C:
undo info-center format

Optional.

Use either approach.

H3C by default.

8.       Specify a log host and configure related parameters.

info-center loghost host-ipv4-address [ port port-number ] [ dscp dscp-value ] [ channel { channel-number | channel-name } | facility local-number ] *

By default, no log host or related parameters are specified.

If no channel is specified when outputting system information to a log host, the system uses channel 2 (loghost) by default.

The value of the port-number argument must 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

The trap buffer receives the trap information only, and discards the log and debugging information.

To output system information to the trap buffer:

 

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 a name for a channel identified by its number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for default channel names.

4.       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.

5.       Configure an output rule for the trap buffer.

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

Optional.

See "Default output rules of system information."

6.       Configure the timestamp format.

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

Optional.

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

 

Outputting system information to the log buffer

The log buffer receives the log information only, and discards the trap and debugging information.

To output system information to the log buffer:

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 a name for a channel identified by its 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 buffer.

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 } [ log { level severity | state state } * ]

Optional.

See "Default output rules of system information."

6.       Configure the timestamp format.

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

Optional.

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

 

Outputting system information to the SNMP module

The SNMP module receives the trap information only, and discards the log and debugging information.

To monitor device running status, trap information is usually sent to the SNMP 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 a name for a channel identified by its number.

info-center channel channel-number name channel-name

Optional.

See Table 2 for 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 } [trap { level severity | state state } * ]

Optional.

See "Default output rules of system information."

6.       Configure the timestamp format.

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

Optional.

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

 

Outputting system information to the Web interface

The Web interface receives log information only, and discards the trap and debugging information.

This feature allows you to control whether to output system information to the Web interface and, if so, which system information can be output to the Web interface. The Web interface provides search and sorting functions. 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 a name for a channel identified by its 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 } [ log { level severity | state state }* ]

Optional.

See "Default output rules of system information."

6.       Configure the timestamp format.

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

Optional.

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

 

Saving system information to the log file

The log file feature saves log information from the log file buffer to the log file at every 24 hours. You can adjust the saving interval or manually save log information to the log file. After saving log information into the log file, the system clears the log file buffer.

The log file has a specific capacity. When the capacity is reached, the system deletes the earliest log messages and writes new messages into the log file.

To save system information to the 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 interval at which the log file is saved.

info-center logfile frequency freq-sec

Optional.

The default saving interval is 86400 seconds.

5.       Configure the maximum size of the log file.

info-center logfile size-quota size

Optional.

By default, the maximum size of the log file is 10 MB.

To ensure normal operation, set the size argument 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 root directory of the flash.

The configuration made by this command cannot survive a system reboot.

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

logfile save

Optional.

Available in any view.

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

 

Enabling 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.

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.

Use the default setting in normal cases to avoid affecting interface status monitoring.

To disable an interface from generating link up/down logging information:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enter Layer 2 Ethernet interface view or VLAN 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.

 

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 and the log information of the log buffer.

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

Available in any view.

Display the summary of the log buffer.

display logbuffer summary [ level severity ] [ | { 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

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 debugging 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 debugging 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 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 the console. (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.

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 that the device and the log host can reach each other. (Details not shown.)

1.        Configure the device:

# Enable the information center.

<Device> system-view

[Device] info-center enable

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

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

# Disable the output of log, trap, and debugging 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 debugging information on the specified channel (loghost in this example) before you configure an output rule.

# 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 from Device.

# mkdir /var/log/Device

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

c.     Edit the file syslog.conf in directory /etc/ and add the following content.

# 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 the 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 by using the –r option to make the new 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 that the device and the log host can reach other. (Details not shown.)

1.        Configure the device:

# Enable the information center.

<Sysname> system-view

[Sysname] info-center enable

# Specify the host 1.2.0.1/16 as the log host, use the channel loghost to output log information (optional, loghost by default), and specify 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 content.

# 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. The information level is info. The Linux 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 file /etc/syslog.conf:

·      Comments must be on a separate line and must begin with the 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 by using the –r option to make the new configuration take effect.

# ps -ae | grep syslogd

147

# kill -9 147

# syslogd -r &

 

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

Now, the system can record log information into the log file.

 

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