03-Information Center Commands
Chapters Download (124.66 KB)
Table of Contents
1 Information Center Configuration Commands
Information Center Configuration Commands
info-center logfile size-quota
info-center logfile switch-directory
Syntax
display channel [ channel-number | channel-name ]
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, in the range 0 to 9.
channel-name: Displays information of the channel with a specified name, where channel-name represents the channel name, which can be a default name or a self-defined name. Specify a channel name first before using it as a self-defined channel name. For more information, refer to the info-center channel name command.
Table 1-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 |
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 warnings Y debugging Y debugging
The above information shows 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 1-2 display channel command 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, refer to 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, refer to Table 1-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, refer to Table 1-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, refer to Table 1-4 for details. |
Syntax
display info-center
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display info-center command to display information about 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 : local2,
channel number : 8, channel name : channel8
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 1-3 display info-center command output description
Field |
Description |
Information Center |
The current state of the information center, which can 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. |
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 are displayed chronologically, with the oldest entry at the top.
level severity: Displays information of the log with specified level, where severity represents information level, in the range 0 to 7.
Table 1-4 Severity description
Severity |
Value |
Description |
Emergency |
0 |
The system is unusable. |
Alert |
1 |
Action must be taken immediately |
Critical |
2 |
Critical conditions |
Error |
3 |
Error conditions |
Warning |
4 |
Warning conditions |
Notice |
5 |
Normal but significant condition |
Informational |
6 |
Informational messages |
Debug |
7 |
Debug-level messages |
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, in the range 1 to 1,024.
slot slot-number: Member number.
|: Uses a regular expression to filter the output information. For detailed information about regular expression, see CLI Configuration in the Configuration Guide - Part 1 - Login.
l begin: Displays the line that matches the regular expression and all the subsequent lines.
l exclude: Displays the lines that do not match the regular expression.
l include: Displays the lines that match the regular expression.
regular-expression: Regular expression, a case-sensitive string of 1 to 256 characters, with spaces included.
Description
Use the display logbuffer command to display the state of the log buffer and the log information recorded. If size buffersize is not provided, all log information recorded in the log buffer is displayed.
Examples
# Display the state of the log buffer and the log information recorded.
<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 : 718
Current messages : 512
%Jun 17 15:57:09:578 2006 Sysname IC/7/SYS_RESTART:
System restarted --
The rest is omitted here.
Table 1-5 display logbuffer command 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 |
Syntax
display logbuffer summary [ level severity | slot slot-number ] *
View
Any view
Default Level
1: Monitor level
Parameters
level severity: Displays the summary of the log buffer, where severity represents information level, in the range 0 to 7.
slot slot-number: Specifies the member number.
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 6 3 296 0 1 0
2 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0
Table 1-6 display logbuffer summary command output description
Field |
Description |
SLOT |
Number of the Member |
EMERG |
Represents emergency, refer to Table 1-4 for details |
ALERT |
Represents alert, refer to Table 1-4 for details |
CRIT |
Represents critical, refer to Table 1-4 for details |
ERROR |
Represents error, refer to Table 1-4 for details |
WARN |
Represents warning, refer to Table 1-4 for details |
NOTIF |
Represents notice, refer to Table 1-4 for details |
INFO |
Represents informational, refer to Table 1-4 for details |
DEBUG |
Represents debug, refer to Table 1-4 for details |
Syntax
display logfile buffer
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display logfile buffer command to display contents of the log file buffer.
Note that all contents in the log file buffer are cleared when they are saved into the log file, either 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.
Syntax
display logfile summary
View
Any view
Default Level
1: Monitor level
Parameters
None
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:
Writing frequency : 24 hour 0 min 10 sec
Table 1-7 display logfile summary command 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 |
Syntax
display trapbuffer [ reverse ] [ size buffersize ]
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 are 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, in the range 1 to 1,024.
Description
Use the display trapbuffer command to display the state and the trap information recorded.
If size buffersize is not provided, all trap information is displayed.
Examples
# Display the state of the trap buffer and the trap information recorded.
<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 : 2
#Aug 7 14:47:35:636 2008 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.3<linkDown>: Interface 983041 is Down, ifAdminStatus is 2, ifOperStatus is 2
#Aug 7 14:47:47:724 2008 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
Table 1-8 display trapbuffer command 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 |
Number of dropped messages |
Overwritten messages |
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 |
Number of the current messages |
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 ports are allowed to generate port link up/down logging information when the port state changes.
Examples
# Disable VLAN-interface1 from generating link up/down logging information.
<Sysname> system-view
[Sysname] interface vlan-interface1
[Sysname-Vlan-interface1] undo enable log updown
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, in the range 0 to 9.
channel-name: Specifies a channel name, a case insensitive string of 1 to 30 characters. It must be a combination of letters and numbers, and start with a letter.
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.
Refer to Table 1-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
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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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 when the information center is enabled 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
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 when the information center is enabled.
By default, the information center is enabled.
Examples
# Enable the information center.
<Sysname> system-view
[Sysname] info-center enable
Info: Information center is enabled.
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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to the info-center channel name command.
buffersize: Specifies the maximum number of log messages that can be stored in a log buffer, in the range 0 to 1,024 with 512 as the default value.
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 when 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
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 logfile feature.
<Sysname> system-view
[Sysname] info-center logfile enable
Syntax
info-center logfile frequency freq-sec
undo info-center logfile frequency
View
System view
Default Level
2: System level
Parameters
freq-sec: Frequency with which the system saves the log file, in the range 1 to 86,400 seconds. The default is 864,00 seconds.
Description
Use the info-center logfile frequency command to configure the frequency with which the system saves the log file.
Use the undo info-center logfile frequency command to restore the default frequency.
By default, the frequency with which the system saves the log file is 86,400 seconds.
Examples
# Configure the frequency with which the system saves the log file as 60,000 seconds.
<Sysname> system-view
[Sysname] info-center logfile frequency 60000
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 ranges from 1 to 10 MB.
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 10 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
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, 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 before saving a log file into it.
By default, the directory to save a log file is the log file directory in the root directory of the flash.
Note that this command can be used to configure the directory to which a log file can be saved. The configuration is at a system restart or active/standby switchover of the main control boards.
Examples
# Create a directory with the name test in 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
Syntax
info-center loghost [ vpn-instance vpn-instance-name ] host-ipv4-address [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] *
undo info-center loghost [ vpn-instance vpn-instance-name ] host-ipv4-address
View
System view
Default Level
2: System level
Parameters
vpn-instance vpn-instance-name: Specifies VPN instance name, where vpn-instance-name represents the instance name, a case-insensitive string of 1 to 31 characters.
host-ip: The IP 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 must 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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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 is loghost and the default channel number is 2.
Note that:
l The info-center loghost command takes effect only when the information center is enabled with the info-center enable command.
l Make sure to input a correct IP address while using the info-center loghost command to configure the IP address for a log host. The system prompts an invalid address if the loopback address (127.0.0.1) is input.
l A maximum number of 4 hosts (different) can be designated as the log host.
Examples
# Output log information to a Unix station with IP address 1.1.1.1/16.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
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.
When the source IP address of log information is specified, no matter through which physical interface the log information is actually output, the source IP address of the log information is the primary IP address of the specified interface. To display the source IP address in the log information, configure it by using this command.
Note that:
l The info-center loghost source command takes effect only when the information center is enabled with the info-center enable command.
l 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
By default, the log information in the following format is displayed on the log host:
<188>Jul 22 05:58:06 2008 Sysname %%10IFNET/4/LINK UPDOWN(l): Vlan-interface3: link status is UP
# Specify the primary IP address of VLAN-interface 3 as the source IP address of log information.
<Sysname> system-view
[Sysname] interface vlan-interface3
[Sysname-Vlan-interface3] ip address 2.2.2.2 24
[Sysname-Vlan-interface3] quit
[Sysname] info-center loghost source vlan-interface3
After the above configuration, the log information in the following format is displayed on the log host (compared with the default format, the following format has the -DevIP=2.2.2.2 field):
<188>Jul 22 06:11:31 2008 Sysname %%10IFNET/4/LINK UPDOWN(l):-DevIP=2.2.2.2;Vlan-interface3: link status is UP
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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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 that the info-center monitor channel command takes effect only when 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
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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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, refer to the display snmp-agent command in SNMP Commands in the Command Reference - Part 12 - System Monitoring.
Examples
# Output system information to the SNMP module through channel 6.
<Sysname> system-view
[Sysname] info-center snmp channel 6
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, configure this argument as ARP. To view the modules supported by the device, use the info-center source ? command.
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, refer to Table 1-4 for details. 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 can 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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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 1-9.
This command can be used to set the filter and redirection rules of log, trap and debugging information.
For example, you 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. You can also set to output trap information of the IP module to a specified output destination.
Note that:
l 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.
l 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. Refer to Table 1-9 for details.
l 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 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.
l 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
l 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.
l 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.
l 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.
l 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 1-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 |
Warning |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
default (all modules) |
Enabled |
Warning |
Enabled |
Debug |
Enabled |
Debug |
Log host |
default (all modules) |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
default (all modules) |
Disabled |
Informational |
Enabled |
Warning |
Disabled |
Debug |
Log buffer |
default (all modules) |
Enabled |
Warning |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
default (all modules) |
Disabled |
Debug |
Enabled |
Warning |
Disabled |
Debug |
Examples
# Set the output channel for the log information of VLAN module to snmpagent and to output information with severity 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 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
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 synchronous information output.
By default, synchronous information output is disabled.
l If the system information, such as log information, is output before you input any information under a current command line prompt, the system does not display the command line prompt upon completion of the system information output.
l If the system information is output when you are inputting some interactive information (non Y/N confirmation information), then the system does not display the command line prompt but your previous input in a new line when the system information output is completed.
Examples
# Enable the synchronous information output function, and then input the display interface gigabitethe command to view Ethernet interface information.
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] display interface gigabitethe
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
[Sysname] display interface gigabitethe
To complete your input of the display interface gigabitethernet command after the above information is displayed, input rnet; to execute the command, press the Enter key.
# 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]:
The system receives the log information, and it then displays the log information first. After the system displays all the log information, it displays the user’s previous input, which is [Y/N] in this example.
%May 21 14:33:19:425 2007 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Y/N]:
To complete your input before the output of the log information after the above information is displayed, input Y or N.
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, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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
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”.
l Mmm: The abbreviations of the months in English, which could be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.
l dd: The date, starting with a space if less than 10, for example “ 7”.
l 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.
l yyyy: Represents the year.
none: Indicates no time information is provided.
Description
Use the info-center timestamp command to configure the time stamp format.
Use the undo info-center timestamp command to restore the default.
By default, the time stamp format of log, trap and debugging information is date.
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 GigabitEthernet 1/0/1 that is in the UP state, the log information generated is as follows:
%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 GigabitEthernet1/0/1 that is in the UP state, the log information generated is as follows:
%Sep 29 17:19:11:188 2007 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 GigabitEthernet1/0/1 that is in the UP state, the log information generated is as follows:
% Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN
Syntax
info-center timestamp loghost { date | 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.
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.
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
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, in the range 0 to 1,024 with 256 as the default value.
channel-number: Specifies a channel number, in the range 0 to 9.
channel-name: Specifies a channel name, which can be a default name or a self-defined name. Specify a channel name before using it as a self-defined channel name. For more information, refer to 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 when 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
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 are cleared when they are saved into the log file, either automatically or manually.
Examples
# Save the contents in the log file buffer into the log file.
<Sysname> logfile save
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
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
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:
l The debugging information is displayed (by using the terminal debugging command) only when the monitoring of system information is enabled on the current terminal (by using the terminal monitor command).
l 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 to the default.
Examples
# Enable the display of debugging information on the current terminal.
<Sysname> terminal debugging
Info: Current terminal debugging is on.
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:
l To display the log information, execute the terminal monitor and terminal logging commands, and then enable information center (enabled by default).
l 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.
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:
l Configure the terminal monitor command before displaying the log, trap, and debugging information.
l Configuration of the undo terminal monitor command automatically disables the monitoring of log, trap, and debugging information of the current terminal.
l 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.
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:
l To display the log information, execute the terminal monitor and terminal logging commands, and then enable information center (enabled by default).
l 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