- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Information Center Commands | 188.61 KB |
Information center configuration commands
info-center logfile size-quota
info-center logfile switch-directory
The WX3000E series comprises WX3024E and WX3010E wireless switches.
The port numbers in this chapter are for illustration only.
display channel
Syntax
display channel [ channel-number | channel-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
channel-number: Displays information of the channel with a specified number, where channel-number represents the channel number, which ranges from 0 to 9.
channel-name: Displays information of the channel with a specified name, where channel-name represents the channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Table 1 Information channels for different output destinations
Output destination |
Information channel number |
Default channel name |
Console |
0 |
console |
Monitor terminal |
1 |
monitor |
Log host |
2 |
loghost |
Trap buffer |
3 |
trapbuffer |
Log buffer |
4 |
logbuffer |
SNMP module |
5 |
snmpagent |
Web interface |
6 |
channel6 |
Log file |
9 |
channel9 |
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display channel command to display channel information.
If no channel is specified, information for all channels is displayed.
Examples
# Display information for channel 0.
<Sysname> display channel 0
channel number:0, channel name:console
MODU_ID NAME ENABLE LOG_LEVEL ENABLE TRAP_LEVEL ENABLE DEBUG_LEVEL
ffff0000 default Y informational Y debugging Y debugging
The above information indicates to output log information with the severity from 0 to 4, trap information with the severity from 0 to 7 and debugging information with the severity from 0 to 7 to the console. The information source modules are all modules (default).
Table 2 Output description
Field |
Description |
channel number |
A specified channel number, in the range 0 to 9. |
channel name |
A specified channel name, which varies with user’s configuration. For more information, see the info-center channel name command. |
MODU_ID |
The ID of the module to which the information permitted to pass through the current channel belongs |
NAME |
The name of the module to which the information permitted to pass through the current channel belongs Default means all modules are allowed to output system information, but the module type varies with devices. |
ENABLE |
Indicates whether to enable or disable the output of log information, which could be Y or N. |
LOG_LEVEL |
The severity of log information, see Table 4 for details. |
ENABLE |
Indicates whether to enable or disable the output of trap information, which could be Y or N. |
TRAP_LEVEL |
The severity of trap information, see Table 4 for details. |
ENABLE |
Indicates whether to enable or disable the output of debugging information, which could be Y or N. |
DEBUG_LEVEL |
The severity of debugging information, see Table 4 for details. |
display info-center
Syntax
display info-center [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display info-center command to display the information of each output destination.
Examples
# Display configurations on each output destination.
<Sysname> display info-center
Information Center:enabled
Log host:
1.1.1.1,
port number : 514, host facility : local7,
channel number : 2, channel name : loghost
Console:
channel number : 0, channel name : console
Monitor:
channel number : 1, channel name : monitor
SNMP Agent:
channel number : 5, channel name : snmpagent
Log buffer:
enabled,max buffer size 1024, current buffer size 512,
current messages 512, dropped messages 0, overwritten messages 740
channel number : 4, channel name : logbuffer
Trap buffer:
enabled,max buffer size 1024, current buffer size 256,
current messages 216, dropped messages 0, overwritten messages 0
channel number : 3, channel name : trapbuffer
logfile:
channel number:9, channel name:channel9
syslog:
channel number:6, channel name:channel6
Information timestamp setting:
log - date, trap - date, debug - date,
loghost - date
Table 3 Output description
Field |
Description |
Information Center |
The current state of the information center, which could be enabled or disabled. |
Log host: 1.1.1.1, port number : 514, host facility : local2, channel number : 8, channel name : channel8 |
Configurations on the log host destination (It can be displayed only when the info-center loghost command is configured), including IP address of the log host, number of the port that receives the system information on the log host, logging facility used, and the channel number and channel name used.) |
Console: channel number : 0, channel name : console |
Configurations on the console destination, including the channel number and channel name used |
Monitor: channel number : 1, channel name : monitor |
Configurations on the monitor terminal destination, including the channel number and channel name used |
SNMP Agent: channel number : 5, channel name : snmpagent |
Configurations on the SNMP module destination, including the channel number and channel name used |
Log buffer: enabled,max buffer size 1024, current buffer size 512, current messages 512, dropped messages 0, overwritten messages 740 channel number : 4, channel name : logbuffer |
Configurations on the log buffer destination, including whether information output to this destination is enabled or disabled, the maximum capacity, the current capacity, the current number of messages, the number of dropped messages, the number of messages that have been overwritten, and the channel number and channel name used. |
Trap buffer: enabled,max buffer size 1024, current buffer size 256, current messages 216, dropped messages 0, overwritten messages 0 channel number : 3, channel name : trapbuffer |
Configurations on the trap buffer destination, including whether information output to this destination is enabled or disabled, the maximum capacity, the current capacity, the current number of messages, the number of dropped messages, the number of messages that have been overwritten, and the channel number and channel name used. |
logfile: channel number:9, channel name:channel9 |
Configurations on the log file destination, including the channel number, and channel name used. |
syslog: channel number:6, channel name:channel6 |
Configurations on the Web interface destination, including the channel number, and channel name used. |
Information timestamp setting |
The time stamp configurations, specifying the time stamp format for log, trap, debug, and log host information. |
display logbuffer
Syntax
display logbuffer [ reverse ] [ level severity | size buffersize | slot slot-number ] * [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
reverse: Displays log entries chronologically, with the most recent entry at the top. If this keyword is not specified, the log entries will be displayed chronologically, with the oldest entry at the top.
level severity: Displays information of the log with specified level, where severity represents information level, which ranges from 0 to 7.
Severity |
Value |
Description |
Corresponding keyword in commands |
Emergency |
0 |
The system is unusable. |
emergencies |
Alert |
1 |
Action must be taken immediately |
alerts |
Critical |
2 |
Critical conditions |
critical |
Error |
3 |
Error conditions |
errors |
Warning |
4 |
Warning conditions |
warnings |
Notice |
5 |
Normal but significant condition |
notifications |
Informational |
6 |
Informational messages |
informational |
Debug |
7 |
Debug-level messages |
debugging |
size buffersize: Displays specified number of the latest log messages in the log buffer, where buffersize represents the number of the latest log messages to be displayed in the log buffer. The value is in the range of 1 to 1024.
slot slot-number: A value of 1 identifies the slot where the switching engine resides.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display logbuffer command to display the state of the log buffer and the log information recorded. Absence of the size buffersize argument indicates that all log information recorded in the log buffer is displayed.
Examples
# Display the state and log information of the log buffer.
<Sysname> display logbuffer
Logging buffer configuration and contents:enabled
Allowed max buffer size : 1024
Actual buffer size : 512
Channel number : 4 , Channel name : logbuffer
Dropped messages : 0
Overwritten messages : 0
Current messages : 127
%Jun 19 18:03:24:55 2006 Sysname IC/7/SYS_RESTART:
System restarted --
The rest is omitted here.
Table 5 Output description
Field |
Description |
Logging buffer configuration and contents |
Indicates the current state of the log buffer and its contents, which could be enabled or disabled. |
Allowed max buffer size |
The maximum buffer size allowed |
Actual buffer size |
The actual buffer size |
Channel number |
The channel number of the log buffer, defaults to 4. |
Channel name |
The channel name of the log buffer, defaults to logbuffer. |
Dropped messages |
The number of dropped messages |
Overwritten messages |
The number of overwritten messages (when the buffer size is not big enough to hold all messages, the latest messages overwrite the old ones). |
Current messages |
The number of the current messages |
display logbuffer summary
Syntax
display logbuffer summary [ level severity | slot slot-number ] * [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
level severity: Displays the summary of the log buffer, where severity represents information level, which ranges from 0 to 7.
slot slot-number: A value of 1 identifies the slot where the switching engine resides.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display logbuffer summary command to display the summary of the log buffer.
Examples
# Display the summary of the log buffer.
<Sysname> display logbuffer summary
SLOT EMERG ALERT CRIT ERROR WARN NOTIF INFO DEBUG
1 0 0 0 6 1 37 43 0
Table 6 Output description
Field |
Description |
SLOT |
Number of the slot where the card resides |
EMERG |
Represents emergency, see Table 4 for details |
ALERT |
Represents alert, see Table 4 for details |
CRIT |
Represents critical, see Table 4 for details |
ERROR |
Represents error, see Table 4 for details |
WARN |
Represents warning, see Table 4 for details |
NOTIF |
Represents notice, see Table 4 for details |
INFO |
Represents informational, see Table 4 for details |
DEBUG |
Represents debug, see Table 4 for details |
display logfile buffer
Syntax
display logfile buffer [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display logfile buffer command to display contents of the log file buffer.
Note that all contents in the log file buffer will be cleared after they are successfully saved into the log file automatically or manually.
Examples
# Display the contents of the log file buffer.
<Sysname> display logfile buffer
%@27091414#Aug 7 08:04:02:470 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983040 is Up, ifAdminStatus is 1, ifOperStatus is 1
The rest is omitted here.
display logfile summary
Syntax
display logfile summary [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display logfile summary command to display the configuration of the log file.
Examples
# Display the configuration of the log file.
<Sysname> display logfile summary
Log file is enabled.
Channel number : 9
Log file size quota : 10 MB
Log file directory : flash:/logfile
Writing frequency : 24 hour 0 min 10 sec
Table 7 Output description
Field |
Description |
Log file is |
The current state of a log file, which could be enabled or disabled. |
Channel number |
The channel number of a log file, defaults to 9. |
Log file size quota |
The maximum storage space reserved for a log file |
Log file directory |
Log file directory |
Writing frequency |
Log file writing frequency |
display trapbuffer
Syntax
display trapbuffer [ reverse ] [ size buffersize ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
reverse: Displays trap entries chronologically, with the most recent entry at the top. If this keyword is not specified, trap entries will be displayed chronologically, with the oldest entry at the top.
size buffersize: Displays specified number of the latest trap messages in a trap buffer, where buffersize represents the number of the latest trap messages in a trap buffer, which ranges from 1 to 1,024.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.
Description
Use the display trapbuffer command to display the state and the trap information recorded.
Absence of the size buffersize argument indicates that all trap information is displayed.
Examples
# Display the state of the trap buffer and the trap information recorded. (The output of this command depends on the operations executed on the device.)
<Sysname> display trapbuffer
Trapping buffer configuration and contents:enabled
Allowed max buffer size : 1024
Actual buffer size : 256
Channel number : 3 , channel name : trapbuffer
Dropped messages : 0
Overwritten messages : 0
Current messages : 9
#Aug 7 08:03:27:421 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983041 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:439 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983048 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:439 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983056 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:465 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 3277798 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:05:32:425 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.3<linkDown>: Interface 983048 is Down, ifAdminStatus is 1, ifOperStatus is 2
#Aug 7 08:39:53:302 2009 Sysname SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.2011.10.2.2.1.1.3.0.1<h3cLogIn>: login from VTY
#Aug 7 08:43:25:583 2009 Sysname CFGMAN/4/TRAP:
1.3.6.1.4.1.2011.10.2.4.2.1<h3cCfgManEventlog> configure changed:
EventIndex=1,CommandSource=2,ConfigSource=4,ConfigDestination=2
Table 8 Output description
Field |
Description |
Trapping buffer configuration and contents |
Indicates the current state of the trap buffer and its contents, which could be enabled or disabled. |
Allowed max buffer size |
The maximum buffer size allowed |
Actual buffer size |
The actual buffer size |
Channel number |
The channel number of the trap buffer, defaults to 3. |
channel name |
The channel name of the trap buffer, defaults to trapbuffer. |
Dropped messages |
The number of dropped messages |
Overwritten messages |
The number of overwritten messages (when the buffer size is not big enough to hold all messages, the latest messages overwrite the old ones). |
Current messages |
The number of the current messages |
enable log updown
Syntax
enable log updown
undo enable log updown
View
Interface view
Default level
2: System level
Parameters
None
Description
Use the enable log updown command to allow a port to generate link up/down logging information when the port state changes.
Use the undo enable log updown command to disable a port from generating link up/down logging information when the port state changes.
By default, all the ports are allowed to generate port link up/down logging information when the port state changes.
Examples
# Disable port GigabitEthernet 1/0/1 from generating link up/down logging information.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo enable log updown
info-center channel name
Syntax
info-center channel channel-number name channel-name
undo info-center channel channel-number
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which is a string of 1 to 30 characters. It must be a combination of letters and numbers, and start with a letter and is case insensitive.
Description
Use the info-center channel name command to name a channel with a specified channel number.
Use the undo info-center channel command to restore the default name for a channel with a specified channel number.
See Table 1 for details of default channel names and channel numbers.
Examples
# Name channel 0 as abc.
<Sysname> system-view
[Sysname] info-center channel 0 name abc
info-center console channel
Syntax
info-center console channel { channel-number | channel-name }
undo info-center console channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center console channel command to specify the channel to output system information to the console.
Use the undo info-center console channel command to restore the default output channel to the console.
By default, output of information to the console is enabled with channel 0 as the default channel (known as console).
Note that the info-center console channel command takes effect only after the information center is enabled first with the info-center enable command.
Examples
# Set channel 0 to output system information to the console.
<Sysname> system-view
[Sysname] info-center console channel 0
info-center enable
Syntax
info-center enable
undo info-center enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the info-center enable command to enable information center.
Use the undo info-center enable command to disable the information center.
The system outputs information to the log host or the console only after the information center is enabled first.
By default, the information center is enabled.
Examples
# Enable the information center.
<Sysname> system-view
[Sysname] info-center enable
Info: Information center is enabled.
info-center format unicom
Syntax
info-center format unicom
undo info-center format
View
System view
Default level
2: System level
Parameters
None
Description
Use the info-center format unicom command to set the format of the system information sent to a log host to UNICOM.
Use the undo info-center format command to restore the default.
By default, the format of the system information sent to a log host is H3C.
The system information sent to a log host is in two formats: H3C and UNICOM. For more information, see the Network Management and Monitoring Configuration Guide.
Examples
# Set the format of the system information sent to a log host to UNICOM.
<Sysname> system-view
[Sysname] info-center format unicom
info-center logbuffer
Syntax
info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center logbuffer [ channel | size ]
View
System view
Default level
2: System level
Parameters
channel-number: A specified channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
buffersize: Specifies the maximum number of log messages that can be stored in a log buffer. The value is in the range of 1 to 1024, and the default value is 512.
Description
Use the info-center logbuffer command to enable information output to a log buffer and set the corresponding parameters.
Use the undo info-center logbuffer command to disable information output to a log buffer.
By default, information is output to the log buffer with the default channel of channel 4 (logbuffer) and the default buffer size of 512.
Note that the info-center logbuffer command takes effect only after the information center is enabled with the info-center enable command.
Examples
# Configure the system to output information to the log buffer through channel 4, and set the log buffer size to 50.
<Sysname> system-view
[Sysname] info-center logbuffer size 50
info-center logfile enable
Syntax
info-center logfile enable
undo info-center logfile enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the info-center logfile enable command to enable the output of system information to the log file.
Use the undo info-center logfile enable command to disable the output of system information to the log file.
By default, the output of system information to the log file is enabled.
Examples
# Enable the log file feature.
<Sysname> system-view
[Sysname] info-center logfile enable
info-center logfile frequency
Syntax
info-center logfile frequency freq-sec
undo info-center logfile frequency
View
System view
Default level
2: System level
Parameters
freq-sec: Frequency at which the system saves the log file, which ranges from 1 to 86,400 seconds.
Description
Use the info-center logfile frequency command to configure the frequency at which the system saves the log file.
Use the undo info-center logfile frequency command to restore the default frequency.
By default, the frequency at which the system saves the log file is 86400 seconds.
Examples
# Configure the frequency at which the system saves the log file as 60,000 seconds.
<Sysname> system-view
[Sysname] info-center logfile frequency 60000
info-center logfile size-quota
Syntax
info-center logfile size-quota size
undo info-center logfile size-quota
View
System view
Default level
2: System level
Parameters
size: The maximum storage space reserved for a log file, in MB. The value is in the range of 1 to 10.
Description
Use the info-center logfile size-quota command to set the maximum storage space reserved for a log file.
Use the undo info-center logfile size-quota command to restore the default maximum storage space reserved for a log file.
By default, the storage space reserved for a log file is 5 MB.
Examples
# Set the maximum storage space reserved for a log file to 6 MB.
<Sysname> system-view
[Sysname] info-center logfile size-quota 6
info-center logfile switch-directory
Syntax
info-center logfile switch-directory dir-name
View
System view
Default level
2: System level
Parameters
dir-name: The name of the directory where a log file is saved, which is a string of 1 to 64 characters.
Description
Use the info-center logfile switch-directory command to configure the directory where a log file is saved. Ensure that the directory is created first before saving a log file into it.
By default, a log file is saved in the logfile directory under the flash root directory.
Note that this command can be used to configure the directory to which a log file can be saved. The configuration will lose after system restart or active standby switchover of the main control boards.
Examples
# Create a directory with the name test under flash root directory.
<Sysname> mkdir test
%Created dir flash:/test.
# Set the directory to save the log file to flash:/test.
<Sysname> system-view
[Sysname] info-center logfile switch-directory flash:/test
info-center loghost
Syntax
info-center loghost { ipv6 host-ipv6-address | host-ipv4-address } [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] *
undo info-center loghost { ipv6 host-ipv6-address | host-ipv4-address }
View
System view
Default level
2: System level
Parameters
ipv6 host-ipv6-address: The IPv6 address of the log host.
host-ipv4-address: The IPv4 address of the log host.
port port-number: Specifies the number of the port that receives the system information on the log host. The value ranges from 1 to 65535 and defaults to 514. In addition, the value of the port-number argument should be the same as the value configured on the log host, otherwise, the log host cannot receive system information.
channel: Specifies the channel through which system information can be output to the log host.
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
facility local-number: The logging facility of the log host. The value can be local0 to local7 and defaults to local7. Logging facility is mainly used to mark different logging sources, query and filer the logs of the corresponding log source.
Description
Use the info-center loghost command to specify a log host and to configure the related parameters.
Use the undo info-center loghost command to restore the default configurations on a log host.
By default, output of system information to the log host is disabled. When it is enabled, the default channel name will be loghost and the default channel number will be 2.
Note that:
· The info-center loghost command takes effect only after the information center is enabled with the info-center enable command.
· Ensure to input a correct IP address while using the info-center loghost command to configure the IP address for a log host. System will prompt an invalid address if the loopback address (127.0.0.1) is input.
· A maximum number of 4 hosts (different) can be designated as the log host.
Examples
# Output log information to a log host with the IP address being 1.1.1.1.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
# Output log information to a log host with the IPv6 address being 1::1.
<Sysname> system-view
[Sysname] info-center loghost ipv6 1::1
info-center loghost source
Syntax
info-center loghost source interface-type interface-number
undo info-center loghost source
View
System view
Default level
2: System level
Parameters
interface-type interface-number: Specifies the egress interface for log information by the interface type and interface number.
Description
Use the info-center loghost source command to specify the source IP address for log information.
Use the undo info-center loghost source command to restore the default.
By default, the interface for sending log information is determined by the matched route, and the primary IP address of this interface is the source IP address of the log information.
After the source IP address of log information is specified, no matter which physical interface is used to output the log information, the source IP address of the log information is the primary IP address of the specified interface. If you want to display the source IP address in the log information, you can configure it by using this command.
Note that:
· The info-center loghost source command takes effect only after the information center is enabled with the info-center enable command.
· The IP address of the specified source interface must be configured; otherwise, although the info-center loghost source command can be configured successfully, the log host will not receive any log information.
Examples
# If VLAN-interface 1 goes up when no source IP address is configured for log information, the following message appears.
<187>Jul 22 05:58:06 2010 Sysname %%10IFNET/3/LINK UPDOWN(l): Vlan-interface 1 link status is UP.
# Specify the IP address of loopback 0 as the source IP address of log information.
<Sysname> system-view
[Sysname] interface loopback 0
[Sysname-LoopBack0] ip address 2.2.2.2 32
[Sysname-LoopBack0] quit
[Sysname] info-center loghost source loopback 0
# If VLAN-interface 1 goes up after the above configuration, the following message appears, showing the configured source IP address 2.2.2.2.
<187>Jul 22 06:11:31 2008 Sysname %%10IFNET/3/LINK UPDOWN(l):-DevIP=2.2.2.2; Vlan-interface 1 link status is UP.
info-center monitor channel
Syntax
info-center monitor channel { channel-number | channel-name }
undo info-center monitor channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center monitor channel command to configure the channel to output system information to the monitor.
Use the undo info-center monitor channel command to restore the default channel to output system information to the monitor.
By default, output of system information to the monitor is enabled with a default channel name of monitor and a default channel number of 1.
|
NOTE: The info-center monitor channel command takes effect only after the information center is enabled with the info-center enable command. |
Examples
# Output system information to the monitor through channel 0.
<Sysname> system-view
[Sysname] info-center monitor channel 0
info-center snmp channel
Syntax
info-center snmp channel { channel-number | channel-name }
undo info-center snmp channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center snmp channel command to configure the channel to output system information to the SNMP module.
Use the undo info-center snmp channel command to restore the default channel to output system information to the SNMP module.
By default, output of system information to the SNMP module is enabled with a default channel name of snmpagent and a default channel number of 5.
For more information, see the display snmp-agent command in the chapter “SNMP configuration commands.”
Examples
# Output system information to the SNMP module through channel 6.
<Sysname> system-view
[Sysname] info-center snmp channel 6
info-center source
Syntax
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 } * ] *
undo info-center source { module-name | default } channel { channel-number | channel-name }
View
System view
Default level
2: System level
Parameters
module-name: Specifies the output rules of the system information of the specified modules. For instance, if information on ARP module is to be output, you can configure this argument as ARP. You can use the info-center source ? command to view the modules supported by the device.
default: Specifies the output rules of the system information of all the modules allowed to output the system information, including all the modules displayed by using the info-center source ? command.
debug: Debugging information.
log: Log information.
trap: Trap information.
level severity: Specifies the severity of system information. For more information, see Table 4. With this keyword, you can specify the severity level of the information allowed/denied to output.
state state: Configures whether to output the system information, which could be on (enabled) or off (disabled). With this keyword, you can specify whether to output the specified system information.
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center source command to specify the output rules of the system information.
Use the undo info-center source command to remove the specified output rules.
By default, the output rules for the system information are listed in Table 9.
This command can be used to set the filter and redirection rules of log, trap and debugging information.
For example, the user can set to output log information with severity higher than warning to the log host, and information with severity higher than informational to the log buffer. The user can also set to output trap information of the IP module to a specified output destination.
Note that:
· If you do not use the module-name argument to set output rules for a module, the module uses the default output rules or the output rules set by the default keyword; otherwise the module uses the output rules separately set for it.
· If you use the default keyword to set the output rules for all the modules without specifying the debug, log, and trap keywords, the default output rules for the modules are used. See Table 9 for more information.
· If you use the module-name argument to set the output rules for a module without specifying the debug, log, and trap keywords, the default output rules for the module are as follows: the output of log and trap information is enabled, with severity being informational; the output of debugging information is disabled, with severity being debug. For example, if you execute the command info-center source snmp channel 5, the command is actually equal to the command info-center source snmp channel 5 debug level debugging state off log level informational state on trap level informational state on.
· If you repeatedly use the command to set the output rules for a module or for all the modules with the default keyword, the last configured output rules take effect
· After you separately set the output rules for a module, you must use the module-name argument to modify or remove the rules. The new configuration by using the default keyword is invalid on the module.
· You can configure to output the log, trap and debugging information to the trap buffer, but the trap buffer only receives the trap information and discards the log and debugging information.
· You can configure to output the log, trap and debugging information to the log buffer, but the log buffer only receives the log and debugging information and discards the trap information.
· You can configure to output the log, trap and debugging information to the SNMP module, but the SNMP module only receives the trap information and discards the log and debugging information.
Table 9 Default output rules for different output destinations
Output destination |
Modules allowed |
LOG |
TRAP |
DEBUG |
|||
Enabled/disabled |
Severity |
Enabled/disabled |
Severity |
Enabled/disabled |
Severity |
||
Console |
default (all modules) |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
default (all modules) |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Log host |
default (all modules) |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
default (all modules) |
Disabled |
Informational |
Enabled |
Informational |
Disabled |
Debug |
Log buffer |
default (all modules) |
Enabled |
Informational |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
default (all modules) |
Disabled |
Debug |
Enabled |
Informational |
Disabled |
Debug |
Log file |
default (all modules) |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
Examples
# Set the output channel for the log information of VLAN module to snmpagent and to output information with severity being emergency. Log information of other modules cannot be output to this channel; other types of information of this module may or may not be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent log state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
# Set the output channel for the log information of VLAN module to snmpagent and to output information with severity being emergency. Log information of other modules and all the other system information cannot be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent debug state off log state off trap state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
info-center synchronous
Syntax
info-center synchronous
View
System view
Default level
2: System level
Parameters
None
Description
Use the info-center synchronous command to enable synchronous information output.
Use the undo info-center synchronous command to disable the synchronous information output.
By default, the synchronous information output is disabled.
|
NOTE: · If system information, such as log information, is output before you input any information under a current command line prompt, the system will not display the command line prompt after the system information output. · If system information is output when you are inputting some interactive information (non Y/N confirmation information), then after the system information output, the system will not display the command line prompt but your previous input in a new line. |
Examples
# Enable the synchronous information output function, and then input the display interface gigabitethe command to view the current configuration of the interface.
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] display interface gigabitethe
At this time, the system receives log messages, and it then displays the log messages first. After the system displays all the log messages, it displays the user’s previous input, which is display interface gigabitethe in this example.
%Apr 29 08:12:44:71 2007 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is UP
After the above information is displayed, you can input rnet to complete your input of the display interface gigabitethernet command, and then press Enter to execute the command.
# Enable the synchronous information output function, and then save the current configuration (input interactive information).
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] save
The current configuration will be written to the device. Are you sure? [Y/N]:
At this time, the system receives the log information, and it then displays the log information first. After the system displays all the log information, it displays [Y/N].
%May 21 14:33:19:425 2007 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Y/N]:
After the above information is displayed, you can input Y or N to complete your input before the output of the log information.
info-center syslog channel
Syntax
info-center syslog channel { channel-number | channel-name }
undo info-center syslog channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. You need to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center syslog channel command to enable the output of system information to the Web interface.
Use the undo info-center syslog channel command to restore the default.
By default, system information is output to the Web interface with the default channel of channel 6.
Examples
# Configure the system to output information to the Web interface through channel 7.
<Sysname> system-view
[Sysname] info-center syslog channel 7
info-center timestamp
Syntax
info-center timestamp { debugging | log | trap } { boot | date | none }
undo info-center timestamp { debugging | log | trap }
View
System view
Default level
2: System level
Parameters
debugging: Sets the time stamp format of the debugging information.
log: Sets the time stamp output format of the log information.
trap: Sets the time stamp output format of the trap information.
boot: The time taken to boot up the system, in the format of xxxxxx.yyyyyy, in which xxxxxx represents the most significant 32 bits of the time taken to boot up the system (in milliseconds) whereas yyyyyy is the least significant 32 bits. For example, 0.21990989 equals Jun 25 14:09:26:881 2007.
date: The current system date and time, in the format of “Mmm dd hh:mm:ss:sss yyyy”.
· Mmm: The abbreviations of the months in English, which could be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.
· dd: The date, starting with a space if less than 10, for example “ 7”.
· hh:mm:ss:sss: The local time, with hh ranging from 00 to 23, mm and ss ranging from 00 to 59, and sss ranging from 0 to 999.
· yyyy: Represents the year.
none: Indicates no time information is provided.
Description
Use the info-center timestamp command to configure the time stamp format of the system information sent to all destinations except log host.
Use the undo info-center timestamp command to restore the default.
By default, the time stamp format of the system information sent to a log host is set by the info-center timestamp loghost command, and the format of log, trap and debugging information sent to other destinations is date.
Related commands: info-center timestamp loghost.
Examples
# Configure the time stamp format for log information as boot.
<Sysname> system-view
[Sysname] info-center timestamp log boot
# If you execute the shutdown command on the up interface GigabitEthernet1/0/1, the following information appears.
%0.1382605158 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN.
# Configure the time stamp format for log information as date.
<Sysname> system-view
[Sysname] info-center timestamp log date
# If you execute the shutdown command on the up interface GigabitEthernet1/0/1, the following information appears.
%Sep 29 17:19:11:188 2010 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN.
# Configure the time stamp format for log information as none.
<Sysname> system-view
[Sysname] info-center timestamp log none
# If you execute the shutdown command on the up interface GigabitEthernet1/0/1, the following information appears.
% Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN
info-center timestamp loghost
Syntax
info-center timestamp loghost { date | iso | no-year-date | none }
undo info-center timestamp loghost
View
System view
Default level
2: System level
Parameters
date: Indicates the current system date and time, in the format of "Mmm dd hh:mm:ss:ms yyyy". However, the display format depends on the log host.
iso: Sets the time stamp to ISO 8601 format, for example, 2009-09-21T15:32:55.
no-year-date: Indicates the current system date and time (year exclusive).
none: Indicates that no time stamp information is provided.
Description
Use the info-center timestamp loghost command to configure the time stamp format of the system information sent to the log host.
Use the undo info-center timestamp loghost command to restore the default.
By default, the time stamp format for system information sent to the log host is date.
Related commands: info-center timestamp.
Examples
# Configure that the system information output to the log host does not include the year information.
<Sysname> system-view
[Sysname] info-center timestamp loghost no-year-date
info-center trapbuffer
Syntax
info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center trapbuffer [ channel | size ]
View
System view
Default level
2: System level
Parameters
size buffersize: Specifies the maximum number of trap messages in a trap buffer, which ranges from 0 to 1,024, and defaults to 256.
channel-number: Specifies a channel number, which ranges from 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The user needs to specify a channel name first before using it as a self-defined channel name. For more information, see the info-center channel name command.
Description
Use the info-center trapbuffer command to enable information output to the trap buffer and set the corresponding parameters.
Use the undo info-center trapbuffer command to disable information output to the trap buffer.
By default, information output to the trap buffer is enabled with channel 3 (trapbuffer) as the default channel and a maximum buffer size of 256.
Note that the info-center trapbuffer command takes effect only after the information center is enabled with the info-center enable command.
Examples
# Configure the system to output information to the trap buffer through the default channel, and set the trap buffer size to 30.
<Sysname> system-view
[Sysname] info-center trapbuffer size 30
logfile save
Syntax
logfile save
View
Any view
Default level
2: System level
Parameters
None
Description
Use the logfile save command to save all the contents in the log file buffer into the log file.
By default, the system automatically saves the log file based on a frequency configured by the info-center logfile frequency command into a directory configured by the info-center logfile switch-directory command.
Note that all contents in the log file buffer will be cleared after they are successfully saved into the log file automatically or manually.
Examples
# Save the contents in the log file buffer into the log file.
<Sysname> logfile save
reset logbuffer
Syntax
reset logbuffer
View
User view
Default level
3: Manage level
Parameters
None
Description
Use the reset logbuffer command to reset the log buffer contents.
Examples
# Reset the log buffer contents.
<Sysname> reset logbuffer
reset trapbuffer
Syntax
reset trapbuffer
View
User view
Default level
3: Manage level
Parameters
None
Description
Use the reset trapbuffer command to reset the trap buffer contents.
Examples
# Reset the trap buffer contents.
<Sysname> reset trapbuffer
terminal debugging
Syntax
terminal debugging
undo terminal debugging
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the terminal debugging command to enable the display of debugging information on the current terminal.
Use the undo terminal debugging command to disable the display of debugging information on the current terminal.
By default, the display of debugging information on the current terminal is disabled.
Note that:
· To display the debugging information, you need to execute the terminal monitor and terminal debugging commands, then enable information center (enabled by default), and finally use a debugging command to enable the related debugging.
· The configuration of this command is valid for only the current connection between the terminal and the device. If a new connection is established, the display of debugging information on the terminal restores the default.
Examples
# Enable the display of debugging information on the current terminal.
<Sysname> terminal debugging
Info: Current terminal debugging is on.
terminal logging
Syntax
terminal logging
undo terminal logging
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the terminal logging command to enable the display of log information on the current terminal.
Use the undo terminal logging command to disable the display of log information on the current terminal.
By default, the display of log information on the current terminal is disabled.
Note that:
· To display the log information, you need to execute the terminal monitor and terminal logging commands, and then enable information center (enabled by default).
· The configuration of this command is valid for only the current connection between the terminal and the device. If a new connection is established, the display of log information on the terminal restores the default.
Examples
# Disable the display of log information on the current terminal.
<Sysname> undo terminal logging
Info: Current terminal logging is off.
terminal monitor
Syntax
terminal monitor
undo terminal monitor
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the terminal monitor command to enable the monitoring of system information on the current terminal.
Use the undo terminal monitor command to disable the monitoring of system information on the current terminal.
By default, monitoring of the system information on the console is enabled and that on the monitor terminal is disabled.
Note that:
· You need to configure the terminal monitor command before you can display the log, trap, and debugging information.
· Configuration of the undo terminal monitor command automatically disables the monitoring of log, trap, and debugging information.
· The configuration of this command is valid for only the current connection between the terminal and the device. If a new connection is established, the monitoring of system information on the terminal restores the default.
Examples
# Enable the monitoring of system information on the current terminal.
<Sysname> terminal monitor
Info: Current terminal monitor is on.
terminal trapping
Syntax
terminal trapping
undo terminal trapping
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use the terminal trapping command to enable the display of trap information on the current terminal.
Use the undo terminal trapping command to disable the display of trap information on the current terminal.
By default, the display of trap information on the current terminal is enabled.
Note that:
· To display the trap information, you need to execute the terminal monitor and terminal trapping commands, and then enable information center (enabled by default).
· The configuration of this command is valid for only the current connection between the terminal and the device. If a new connection is established, the display of trap information on the terminal restores the default.
Examples
# Enable the display of trap information on the current terminal.
<Sysname> terminal trapping
Info: Current terminal trapping is on.