- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
03-Information center configuration commands | 179.97 KB |
Information center configuration commands
info-center logfile size-quota
info-center logfile switch-directory
display channel
Use display channel to display channel information.
Syntax
display channel [ channel-number | channel-name ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
channel-number: Specifies a channel by its number in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
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 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, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no channel is specified, the command displays information about all channels.
Examples
# Display information about 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 output shows that the system is allowed to output log information with a severity from 0 to 4, trap information with a severity from 0 to 7, and debug information with a severity from 0 to 7 to the console. The information source modules are all modules (default).
Table 2 Command output
Field |
Description |
channel number |
Channel number in the range 0 to 9. |
channel name |
Channel name. For more information, see info-center channel name. |
MODU_ID |
ID of the module to which the information permitted to pass through the current channel belongs. |
NAME |
Name of the source module. "default" means all modules are allowed to output system information. |
ENABLE |
Indicates whether log output is enabled, Y or N. |
LOG_LEVEL |
Log information severity. See Table 4 for details. |
ENABLE |
Indicates whether trap output is enabled. |
TRAP_LEVEL |
Trap information severity. See Table 4 for details. |
ENABLE |
Indicates whether debug output is enabled. |
DEBUG_LEVEL |
Debug information severity. See Table 4 for details. |
display info-center
Use display info-center to display information center configuration information.
Syntax
display info-center [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
Examples
# Display information center configuration information.
<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 Command output
Field |
Description |
Information Center |
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 for 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 for the console destination, including the channel number and channel name used. |
Monitor: channel number : 1, channel name : monitor |
Configurations for the monitor terminal destination, including the channel number and channel name used. |
SNMP Agent: channel number : 5, channel name : snmpagent |
Configurations for 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 for 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 for 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 for the log file destination, including the channel number, and channel name used. |
syslog: channel number:6, channel name:channel6 |
Configurations for the Web interface destination, including the channel number, and channel name used. |
Information timestamp setting |
Timestamp configurations, including the timestamp format for log, trap, debug, and log host information. |
display logbuffer
Use display logbuffer to display the state of the log buffer and the log information in the log buffer. Without size buffersize, the command displays all log information in the log buffer.
Syntax
display logbuffer [ reverse ] [ level severity | size buffersize ] * [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
reverse: Displays log entries chronologically, with the most recent entry at the top. Without this keyword, the command displays log entries chronologically, with the oldest entry at the top.
level severity: Specifies a severity level in the range of 0 to 7. The system displays system information of at least the specified level.
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 condition. |
critical |
Error |
3 |
Error condition. |
errors |
Warning |
4 |
Warning condition. |
warnings |
Notification |
5 |
Normal but significant condition. |
notifications |
Informational |
6 |
Informational message. |
informational |
Debug |
7 |
Debug message. |
debugging |
size buffersize: Specifies the number of latest log messages to be displayed, in the range of 1 to 1024.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
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 2013 Sysname IC/7/SYS_RESTART:
System restarted –
…
Table 5 Command output
Field |
Description |
Logging buffer configuration and contents |
State of the log buffer, enabled or disabled. |
Allowed max buffer size |
Maximum number of messages that can be stored in the log buffer. |
Actual buffer size |
Actual buffer size. |
Channel number |
Channel number of the log buffer. The default channel number is 4. |
Channel name |
Channel name of the log buffer. The default channel name is logbuffer. |
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 current messages. |
display logbuffer summary
Use display logbuffer summary to display the summary of the log buffer.
Syntax
display logbuffer summary [ level severity ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
level severity: Specifies a severity level in the range of 0 to 7.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
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 7 0 34 38 0
Table 6 Command output
Field |
Description |
SLOT |
Device ID. |
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
Use display logfile buffer to display contents of the log file buffer.
Syntax
display logfile buffer [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The system clears the log file buffer after saving logs from the buffer to 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 2012 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
…
display logfile summary
Use display logfile summary to display the log file configuration.
Syntax
display logfile summary [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
Examples
# Display the log file configuration.
<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 Command output
Field |
Description |
Log file is |
State of the log file feature, enabled or disabled. |
Channel number |
Channel number of the log file, which defaults to 9. |
Log file size quota |
Maximum storage space reserved for a log file. |
Log file directory |
Log file directory. |
Writing frequency |
Log file writing frequency. |
display trapbuffer
Use display trapbuffer to display the state and the trap information of the trap buffer. Without the size buffersize argument, the command displays all trap information.
Syntax
display trapbuffer [ reverse ] [ size buffersize ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command 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: Specifies the number of latest trap messages to be displayed, in the range of 1 to 1024.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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, a case-sensitive string of 1 to 256 characters.
Examples
# Display the state and trap information of the trap buffer.
<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 2012 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 2012 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 2012 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 2012 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 2012 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 2012 Sysname SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.2012.10.2.2.1.1.3.0.1<h3cLogIn>: login from VTY
#Aug 7 08:43:25:583 2012 Sysname CFGMAN/4/TRAP:
1.3.6.1.4.1.2012.10.2.4.2.1<h3cCfgManEventlog> configure changed:
EventIndex=1,CommandSource=2,ConfigSource=4,ConfigDestination=2
Table 8 Command output
Field |
Description |
Trapping buffer configuration and contents |
State of the trap buffer, enabled or disabled. |
Allowed max buffer size |
Maximum buffer size allowed. |
Actual buffer size |
Actual buffer size. |
Channel number |
Channel number of the trap buffer. The default channel number is 3. |
channel name |
Channel name of the trap buffer. The default channel name is 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 current messages. |
enable log updown
Use enable log updown to allow a port to generate link up/down logs when the port state changes.
Use undo enable log updown to disable a port from generating link up/down logs upon port state changes.
Syntax
enable log updown
undo enable log updown
Default
All the ports are allowed to generate port link up/down logs upon port state changes.
Views
Layer 2 Ethernet interface view, VLAN interface view
Default command level
2: System level
Examples
# Disable port GigabitEthernet1/0/1 from generating link up/down logs.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo enable log updown
info-center channel name
Use info-center channel name to name a channel.
Use undo info-center channel to command to restore the default name for a channel.
Syntax
info-center channel channel-number name channel-name
undo info-center channel channel-number
Default
See Table 1 for information about default channel names and channel numbers.
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number in the range of 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.
Examples
# Name channel 0 as abc.
<Sysname> system-view
[Sysname] info-center channel 0 name abc
info-center console channel
Use info-center console channel to specify the console output channel. The system uses this channel to output information to the console.
Use undo info-center console channel to restore the default console output channel.
Syntax
info-center console channel { channel-number | channel-name }
undo info-center console channel
Default
The console output channel is channel 0 (console).
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
Usage guidelines
The info-center console channel command takes effect only after the information center is enabled with the info-center enable command.
Examples
# Specify the console output channel as channel 0.
<Sysname> system-view
[Sysname] info-center console channel 0
info-center enable
Use info-center enable to enable the information center.
Use undo info-center enable to disable the information center.
Syntax
info-center enable
undo info-center enable
Default
The information center is enabled.
Views
System view
Default command level
2: System level
Usage guidelines
The switch can output system information only after 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
Use info-center format unicom to set the UNICOM format for system information sent to a log host.
Use undo info-center format to restore the default.
Syntax
info-center format unicom
undo info-center format
Default
The format for the system information sent to a log host is H3C.
Views
System view
Default command level
2: System level
Usage guidelines
System information can be sent to a log host in H3C or UNICOM format. For more information, see Network Management and Monitoring Configuration Guide.
Examples
# Set the UNICOM format for system information sent to a log host.
<Sysname> system-view
[Sysname] info-center format unicom
info-center logbuffer
Use info-center logbuffer to configure information output to the log buffer.
Use undo info-center logbuffer to disable information output to the log buffer.
Syntax
info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center logbuffer [ channel | size ]
Default
The system outputs information to the log buffer through channel 4 (logbuffer) and the default buffer size is 512.
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
buffersize: Specifies the maximum number of log messages that can be stored in a log buffer, in the range of 0 to 1024.
Usage guidelines
The info-center logbuffer command takes effect only after the information center is enabled with the info-center enable command.
Examples
# Output system 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
Use info-center logfile enable to enable the log file feature.
Use undo info-center logfile enable to disable the log file feature.
Syntax
info-center logfile enable
undo info-center logfile enable
Default
The log file feature is enabled.
Views
System view
Default command level
2: System level
Examples
# Enable the log file feature.
<Sysname> system-view
[Sysname] info-center logfile enable
info-center logfile frequency
Use info-center logfile frequency to configure the interval for saving system information to the log file.
Use undo info-center logfile frequency to restore the default saving interval.
Syntax
info-center logfile frequency freq-sec
undo info-center logfile frequency
Default
The default saving interval is 86400 seconds.
Views
System view
Default command level
2: System level
Parameters
freq-sec: Specifies a saving interval in the range of 1 to 86400 seconds. The default is 86400 seconds.
Examples
# Configure the log file saving interval as 60000 seconds.
<Sysname> system-view
[Sysname] info-center logfile frequency 60000
info-center logfile size-quota
Use info-center logfile size-quota to set the maximum storage space reserved for the log file.
Use undo info-center logfile size-quota to restore the default maximum storage space reserved for the log file.
Syntax
info-center logfile size-quota size
undo info-center logfile size-quota
Default
The maximum storage space reserved for the log file is 10 MB.
Views
System view
Default command level
2: System level
Parameters
size: Specifies the maximum storage space reserved for the log file, in the range of 1 to 10 MB.
Examples
# Set the maximum storage space reserved for the log file to 6 MB.
<Sysname> system-view
[Sysname] info-center logfile size-quota 6
info-center logfile switch-directory
Use info-center logfile switch-directory to configure the directory where a log file is saved.
Syntax
info-center logfile switch-directory dir-name
Default
The log file is saved in the root directory of the flash.
Views
System view
Default command level
2: System level
Parameters
dir-name: Specifies a directory by its name, a string of 1 to 64 characters.
Usage guidelines
The specified directory must have been created.
The configuration made by this command cannot survive a system reboot.
Examples
# 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
Use info-center loghost to specify a log host and configure output parameters.
Use undo info-center loghost to restore the default.
Syntax
info-center loghost host-ipv4-address [ port port-number ] [ dscp dscp-value ] [ channel { channel-number | channel-name } | facility local-number ] *
undo info-center loghost host-ipv4-address
Default
No log host is specified.
Views
System view
Default command level
2: System level
Parameters
host-ipv4-address: Specifies the IPv4 address of a log host.
port port-number: Specifies the port number of the log host, in the range of 1 to 65535. The default value is 514. It must be the same as the value configured on the log host. Otherwise, the log host cannot receive system information.
dscp dscp-value: Specifies the DSCP value for packets sent to a log host, in the range of 0 to 63. The default is 0.
channel: Specifies the channel through which system information is output to the log host.
channel-number: Specifies a channel by its number in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
facility local-number: Specifies a logging facility from local0 to local7 for the log host. The default value is local7. Logging facilities are used to mark different logging sources, and query and filer logs.
Usage guidelines
The info-center loghost command takes effect only after the information center is enabled with the info-center enable command.
Enter a correct log host IP address. The system prompts an invalid address if the loopback address 127.0.0.1 is entered.
The switch supports up to four log hosts.
If you enable system information output to a log host without specifying a channel, the system uses channel 2 (loghost) by default.
Examples
# Output log information to the log host 1.1.1.1.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
info-center loghost source
Use info-center loghost source to specify the source IP address for log information.
Use undo info-center loghost source to restore the default.
Syntax
info-center loghost source interface-type interface-number
undo info-center loghost source
Default
The source IP address of output log information is the primary IP address of the matching route's egress interface.
Views
System view
Default command level
2: System level
Parameters
interface-type interface-number: Specifies the egress interface for log information by the interface type and interface number.
Usage guidelines
The system uses the primary IP address of the specified egress interface as the source IP address of log information no matter which physical interface is used to output the log information. If you want to display the source IP address in the log information, you can configure it by using this command.
The info-center loghost source command takes effect only when the information center has been enabled with the info-center enable command.
The IP address of the specified egress interface must have been configured. Otherwise, although the info-center loghost source command can be configured successfully, the log host cannot receive any log information.
Examples
When no source IP address is specified for log information, log in to the FTP server using the username ftp. The following log information is displayed on the log host:
<189>May 31 05:37:52 2013 Sysname %%10FTPD/5/FTPD_LOGIN(l): User ftp (192.168.1.23) has logged in successfully.
# Specify the IP address of interface 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
# Specify the IP address of the VLAN interface as the source IP address of log information.
<Sysname> system-view
[Sysname] vlan 100
[Sysname-vlan100] interface vlan-interface 100
[Sysname-Vlan-interface100] ip address 2.2.2.2 24
[Sysname-Vlan-interface100] quit
[Sysname] info-center loghost source Vlan-interface 100
After the above configuration, log in to the FTP server by using the username ftp. The log information in the following format is displayed on the log host (the -DevIP=2.2.2.2 identifies the source IP address):
<189>May 31 05:38:14 2013 Sysname %%10FTPD/5/FTPD_LOGIN(l): -DevIP=2.2.2.2; User ftp (192.168.1.23) has logged in successfully.
info-center monitor channel
Use info-center monitor channel to configure the monitor channel. The system uses this channel to output information to the monitor.
Use undo info-center monitor channel to restore the default monitor output channel.
Syntax
info-center monitor channel { channel-number | channel-name }
undo info-center monitor channel
Default
The system outputs information to the monitor through channel 1 (monitor).
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
Usage guidelines
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
Use info-center snmp channel to configure the SNMP output channel. The system uses this channel to output information to the SNMP module.
Use undo info-center snmp channel to restore the default SNMP output channel.
Syntax
info-center snmp channel { channel-number | channel-name }
undo info-center snmp channel
Default
The system outputs information to the SNMP module through channel 5 (snmpagent).
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number, in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see the info-center channel name command.
Examples
# Output system information to the SNMP module through channel 6.
<Sysname> system-view
[Sysname] info-center snmp channel 6
Related commands
display snmp-agent
info-center source
Use info-center source to configure an information output rule for a module.
Use undo info-center source to remove the specified output rule.
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 }
Default
The default output rules are listed in Table 9.
Views
System view
Default command level
2: System level
Parameters
module-name: Specifies a module. For instance, to output ARP information, specify this argument as ARP. You can use the info-center source ? command to view the modules supported by the device.
default: Specifies all the modules, which can be displayed by using the info-center source ? command.
debug: Specifies debug information.
log: Specifies log information.
trap: Specifies trap information.
level severity: Specifies a severity level. For more information, see Table 4.
state state: Specifies whether to output the specified system information, on (enabled) or off (disabled).
channel-number: Specifies a channel by its number, in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
Usage guidelines
This command sets an output rule for a specified module or all modules. For example, you can output IP log information with a severity higher than warning to the log host, and output IP log information with a severity higher than informational to the log buffer.
If you do not set an output rule for a module, the module uses the default output rule or the output rule set by using the default keyword.
If you use the default keyword to set an output rule 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 about default output rules.
If you use the module-name argument to set the output rule for a module without specifying the debug, log, and trap keywords, the default settings for the module are as follows: the output of log and trap information is enabled, with severity being informational. The output of debug 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 use the command multiple times, only the most recent output rule takes effect for the specified module.
After you set an output rule for a module, you must use the module-name argument to modify or remove the rule. A new output rule configured by using the default keyword does not take effect for the module.
The trap buffer only receives trap information and discards log and debug information.
The log buffer only receives log information and discards trap and debug information.
The SNMP module only receives trap information and discards log and debug information.
Destination |
Source modules |
Log |
Trap |
Debug |
|||
Output switch |
Severity |
Output switch |
Severity |
Output switch |
Severity |
||
Console |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Log host |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
All supported modules |
N/A |
N/A |
Enabled |
Informational |
N/A |
N/A |
Log buffer |
All supported modules |
Enabled |
Informational |
N/A |
N/A |
N/A |
N/A |
SNMP module |
All supported modules |
N/A |
N/A |
Enabled |
Informational |
N/A |
N/A |
Web interface |
All supported modules |
Enabled |
Debug |
N/A |
N/A |
N/A |
N/A |
Log file |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
Examples
# Output VLAN module's trap information with a severity level of at least emergency to the console channel. All other system information cannot be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel console debug state off log state off trap state off
[Sysname] info-center source vlan channel console trap level emergencies state on
info-center synchronous
Use info-center synchronous to enable synchronous information output.
Use undo info-center synchronous to disable synchronous information output.
Syntax
info-center synchronous
Default
Synchronous information output is disabled.
Views
System view
Default command level
2: System level
Usage guidelines
If system information is output before you are entering information at a command line prompt, the system does not display the command line prompt after the system information output.
If system information is output when you are entering some interactive information (non Y/N confirmation information), the system displays your input in a new line after the system information output.
Examples
# Enable synchronous information output, and then execute the display current-configuration command to view the current configuration of the device.
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] display current-
At this time, the system receives log information. It displays the log information first, and then displays the user's previous input, which is display current- in this example.
%May 21 14:33:19:425 2013 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Sysname] display current-
Enter configuration to complete your execution of the display current-configuration command, and press the Enter key to execute the command.
# Enable the synchronous information output function, and then save the current configuration (enter 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. It displays the log information first and then displays [Y/N].
%May 21 14:33:19:425 2013 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Y/N]:
Enter Y or N to complete your input.
info-center syslog channel
Use info-center syslog channel to configure the Web output channel. The system uses this channel to output information to the Web interface.
Use undo info-center syslog channel to restore the default.
Syntax
info-center syslog channel { channel-number | channel-name }
undo info-center syslog channel
Default
The Web output channel is channel 6.
Views
System view
Default command level
2: System level
Parameters
channel-number: Specifies a channel by its number, in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
Examples
# Output system information to the Web interface through channel 7.
<Sysname> system-view
[Sysname] info-center syslog channel 7
info-center timestamp
Use info-center timestamp to configure the timestamp format for system information sent to all destinations except log host.
Use undo info-center timestamp to restore the default.
Syntax
info-center timestamp { debugging | log | trap } { boot | date | none }
undo info-center timestamp { debugging | log | trap }
Default
The timestamp format for system information sent to all destinations except log host is date.
Views
System view
Default command level
2: System level
Parameters
debugging: Sets the timestamp format for debug information.
log: Sets the timestamp format for log information.
trap: Sets the timestamp format for trap information.
boot: Sets the timestamp format as xxxxxx.yyyyyy, where xxxxxx is the most significant 32 bits (in milliseconds) and yyyyyy is the least significant 32 bits. For example, 0.21990989 equals Jun 25 14:09:26:881 2013. The boot time shows the time since system startup.
date: Sets the timestamp format as "Mmm dd hh:mm:ss:sss yyyy", such as Dec 8 10:12:21:708 2012. The date time shows the current system time.
· Mmm: Abbreviations of the months in English, which could be Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec.
· dd: Date, starting with a space if less than 10, for example " 7".
· hh:mm:ss:sss: 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: Year.
none: Indicates no time information is provided.
Examples
# Configure the timestamp format for log information as boot.
<Sysname> system-view
[Sysname] info-center timestamp log boot
At this time, if you log in to the FTP server using the username ftp, the log information generated is as follows:
%0.109391473 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully.
# Configure the timestamp format for log information as date.
<Sysname> system-view
[Sysname] info-center timestamp log date
At this time, if you log in to the FTP server using the username ftp, the log information generated is as follows:
%May 30 05:36:29:579 2013 Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully.
# Configure the timestamp format for log information as none.
<Sysname> system-view
[Sysname] info-center timestamp log none
At this time, if you log in to the FTP server using the username ftp, the log information generated is as follows:
% Sysname FTPD/5/FTPD_LOGIN: User ftp (192.168.1.23) has logged in successfully.
Related commands
info-center timestamp loghost
info-center timestamp loghost
Use info-center timestamp loghost to configure the timestamp format for system information sent to the log host.
Use undo info-center timestamp loghost to restore the default.
Syntax
info-center timestamp loghost { date | iso | no-year-date | none }
undo info-center timestamp loghost
Default
The timestamp format for system information sent to the log host is date.
Views
System view
Default command level
2: System level
Parameters
date: Sets the timestamp format as "Mmm dd hh:mm:ss:ms yyyy", such as Dec 8 10:12:21:708 2012. The actual format depends on the log host.
iso: Sets the ISO 8601 timestamp format. For example, 2012-09-21T15:32:55.
no-year-date: Sets the timestamp format as the current system date and time without year.
none: Indicates that no timestamp information is provided.
Examples
# Configure the timestamp format for system information sent to the log host as no-year-date.
<Sysname> system-view
[Sysname] info-center timestamp loghost no-year-date
Related commands
info-center timestamp
info-center trapbuffer
Use info-center trapbuffer to configure information output to the trap buffer.
Use undo info-center trapbuffer to disable information output to the trap buffer.
Syntax
info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center trapbuffer [ channel | size ]
Default
The system outputs information to the trap buffer through channel 3 (trapbuffer), and the maximum buffer size is 256.
Views
System view
Default command level
2: System level
Parameters
size buffersize: Specifies the maximum number of trap messages allowed in the trap buffer, in the range of 0 to 1024. The default value is 256.
channel-number: Specifies a channel by its number, in the range of 0 to 9.
channel-name: Specifies a channel by its name, a default name or a self-defined name. For information about how to configure a channel name, see info-center channel name.
Usage guidelines
The info-center trapbuffer command takes effect only after the information center is enabled with the info-center enable command.
Examples
# Output system 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
Use logfile save to manually save logs in the log file buffer into the log file.
Syntax
logfile save
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.
Views
Any view
Default command level
2: System level
Usage guidelines
The system clears the log file buffer after saving logs from the buffer to the log file automatically or manually.
Examples
# Save logs in the log file buffer into the log file.
<Sysname> logfile save
reset logbuffer
Use reset logbuffer to clear the log buffer.
Syntax
reset logbuffer
Views
User view
Default command level
3: Manage level
Examples
# Clear the log buffer.
<Sysname> reset logbuffer
reset trapbuffer
Use reset trapbuffer to clear the trap buffer.
Syntax
reset trapbuffer
Views
User view
Default command level
3: Manage level
Examples
# Clear the trap buffer.
<Sysname> reset trapbuffer
terminal debugging
Use terminal debugging to enable the display of debug information on the current terminal.
Use undo terminal debugging to disable the display of debug information on the current terminal.
Syntax
terminal debugging
undo terminal debugging
Default
The display of debug information on the current terminal is disabled.
Views
User view
Default command level
1: Monitor level
Usage guidelines
To view debug information, execute the terminal monitor and terminal debugging commands, enable information center (enabled by default), and finally use a debugging command to enable the related debugging.
The configuration of this command is only valid for the current connection between the terminal and the device. If a new connection is established, the display of debug information on the terminal restores the default.
Examples
# Enable the display of debug information on the current terminal.
<Sysname> terminal debugging
Info: Current terminal debugging is on.
terminal logging
Use terminal logging to enable the display of log information on the current terminal.
Use undo terminal logging to disable the display of log information on the current terminal.
Syntax
terminal logging
undo terminal logging
Default
The display of log information on the current terminal is disabled.
Views
User view
Default command level
1: Monitor level
Usage guidelines
To view log information, execute the terminal monitor and terminal logging commands, and then enable the information center (enabled by default).
The configuration of this command is only valid for 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
Use terminal monitor to enable the monitoring of system information on the current terminal.
Use undo terminal monitor to disable the monitoring of system information on the current terminal.
Syntax
terminal monitor
undo terminal monitor
Default
The monitoring of system information is enabled on the console and disabled on the monitor terminal.
Views
User view
Default command level
1: Monitor level
Usage guidelines
Configure the terminal monitor command before you can display the log, trap, and debug information.
The undo terminal monitor command automatically disables the monitoring of log, trap, and debug information.
The configuration of this command is only valid for 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
Use terminal trapping to enable the display of trap information on the current terminal.
Use undo terminal trapping to disable the display of trap information on the current terminal.
Syntax
terminal trapping
undo terminal trapping
Default
The display of trap information on the current terminal is enabled.
Views
User view
Default command level
1: Monitor level
Usage guidelines
To view the trap information, execute the terminal monitor and terminal trapping commands, and then enable the information center (enabled by default).
The configuration of this command is only valid for 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.