- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
05-Information Center Configuration | 170.51 KB |
Configuring the information center
Classification of system information
Output channels and 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
Enabling 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
Outputting log information to a UNIX log host
Outputting log information to a Linux log host
Overview
The information center collects and classifies 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 processing large amounts of information. If the system resources are insufficient, disable the information center to save resources.
Classification of system information
System information falls into the following types:
· Log information—Describes user operations and interface state changes.
· Trap information—Describes device faults such as authentication and network failures.
· Debug 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 the info-center source ? command.
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 to solve a serious problem. 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 or a storage card is unplugged. |
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 |
Debug message. |
debugging |
Output channels and destinations
Table 2 shows the output channels and destinations.
The system supports ten channels. By default, channels 0 through 6 are configured with channel names and output destinations. You can change these default settings as needed. You can also configure channels 7 through 9 and associate them with specific output destinations as needed.
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
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 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 |
Not specified |
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 shows the 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 |
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 |
System information formats
The format of system information varies with output destinations. 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.
Table 4 System information formats
Output destination |
Format |
Example |
Console, monitor terminal, logbuffer, trapbuffer, or SNMP module |
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. |
Table 5 describes the fields in the system information.
Table 5 System information 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. 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 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 7 and Table 7. |
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 source module name. You can execute 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 string ends with (l), the information is log information. · If the string ends with (t), the information is trap information. · If the string ends with (d), the information is debug information. |
Serial Number |
This field indicates the serial number of the device that generated the system information. It is displayed only if the system information sent to the log host is in the UNICOM format. |
source |
This optional field identifies the source of the information, typically the IP address of the log sender. It is displayed only if the system information is sent to a log host in H3C format. |
content |
This field contains the content of the system information. |
Table 6 Timestamp precisions and configuration commands
Item |
Destined to the log host |
Destined to the console, monitor terminal, and log buffer |
Precision |
Seconds |
Milliseconds |
Command used to set the timestamp format |
info-center timestamp loghost |
info-center timestamp |
Table 7 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 sent to all destinations other than 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. |
Information center configuration task list
Task |
Remarks |
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. 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 console. |
info-center console channel { channel-number | channel-name } |
Optional. By default, system information is output to the console through channel 0 (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 system information output to the console. |
terminal monitor |
Optional. The default setting is enabled. |
9. 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, VTY, or TTY 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. |
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 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 debugging, 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: ·
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. |
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. |
5. Specify the source IP address for output 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' egress interface. |
6. Configure the timestamp format. |
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: ·
Set the format to H3C: |
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 ] [ 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 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 |
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 } [ 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 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 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 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 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 } [ 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 only receives log information, and discards trap and debug 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 abundant search and sorting functions. If you output system information to the Web interface, you can view the 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 } [ 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. |
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 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.
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, Layer 3 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 information center configuration information. |
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 a summary of the log buffer. |
display logbuffer summary [ level severity ] [ | { begin | exclude | include } regular-expression ] |
Available in any view. |
Display the state and the trap information of the trap buffer. |
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 AP 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.
<AP> system-view
[AP] info-center enable
# Use channel console to output log information to the console. (This step is optional because it is the default setting.)
[AP] info-center console channel console
# Disable all modules from outputting log, trap, and debug information to channel console.
[AP] info-center source default channel console debug state off log state off trap state off
To avoid output of unnecessary information, disable all modules from outputting log, trap, and debug information to the specified channel (console in this example) before you configure an output rule.
# Configure an output rule to enable ARP and IP modules to output log information that has a severity level of at least informational to the console.
[AP] info-center source arp channel console log level informational state on
[AP] info-center source ip channel console log level informational state on
[AP] quit
# Enable the display of log information on the console. (This function is enabled by default.)
<AP> terminal monitor
Info: Current terminal monitor is on.
<AP> 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 AP 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 AP and the log host can reach each other. (Details not shown.)
1. Configure the AP:
# Enable the information center.
<AP> system-view
[AP] info-center enable
# Specify the log host 1.2.0.1/16, use channel loghost to as the output channel (optional, loghost by default), and specify local4 as the logging facility.
[AP] info-center loghost 1.2.0.1 channel loghost facility local4
# Disable all modules from outputting log, trap, and debug information to channel loghost.
[AP] info-center source default channel loghost debug state off log state off trap state off
To avoid output of unnecessary information, disable all modules from outputting log, trap, and debug information to the specified channel (loghost in this example) before you configure an output rule.
# Configure an output rule to allow ARP and IP modules to output log information that has a severity level of at least informational to the log host.
[AP] info-center source arp channel loghost log level informational state on trap state off
[AP] 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 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 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 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 AP 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 new configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
Now, the system can output log information to the log host.
Outputting log information to a Linux log host
Network requirements
Configure the AP 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 AP and the log host can reach other. (Details not shown.)
1. Configure the AP:
# Enable the information center.
<AP> system-view
[AP] info-center enable
# Specify the host 1.2.0.1/16 as the log host, use the channel loghost as the output channel (optional, loghost by default), and specify local5 as the logging facility.
[AP] info-center loghost 1.2.0.1 channel loghost facility local5
# Configure an output rule to allow all modules to output log information that has a severity level of at least informational to the log host.
[AP] info-center source default channel loghost log level informational state on debug state off trap state off
To avoid output of unnecessary information, disable all modules from outputting debug and trap information to the specified channel (loghost in this example) 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 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 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 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 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 AP 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 new 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 output log information to the log host.