- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
08-Information Center Commands | 148.71 KB |
Information center configuration commands
info-center logfile overwrite-protection
info-center logfile size-quota
info-center logfile switch-directory
Information center configuration commands
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 source module. |
NAME |
Name of the source module. default means all modules are allowed to output system information, but the actual modules depend on the device model. |
ENABLE |
Indicates whether log output is enabled: Y or N. |
LOG_LEVEL |
Log information severity. See Table 3 for details. |
ENABLE |
Indicates whether trap output is enabled: Y or N. |
TRAP_LEVEL |
Trap information severity. See Table 3 for details. |
ENABLE |
Indicates whether debug output is enabled: Y or N. |
DEBUG_LEVEL |
Debug information severity. See Table 3 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
Only devices that support the log file feature display the log file information after the execution of the display info-center command.
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: Displays log information of the specified level in the range of 0 to 7.
Severity |
Value |
Description |
Corresponding keyword in commands |
Emergency |
0 |
The system is unusable. |
emergencies |
Alert |
1 |
Action must be taken immediately. |
alerts |
Critical |
2 |
Critical 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 |
Debugging 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 : 718
Current messages : 512
%Jun 17 15:57:09:578 2006 Sysname IC/7/SYS_RESTART:
System restarted –
…
Table 4 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
EMERG ALERT CRIT ERROR WARN NOTIF INFO DEBUG
0 0 0 0 22 0 1 0
Table 5 Command output
Field |
Description |
EMERG |
Represents emergency. See Table 3 for details. |
ALERT |
Represents alert. See Table 3 for details. |
CRIT |
Represents critical. See Table 3 for details. |
ERROR |
Represents error. See Table 3 for details. |
WARN |
Represents warning. See Table 3 for details. |
NOTIF |
Represents notice. See Table 3 for details. |
INFO |
Represents informational. See Table 3 for details. |
DEBUG |
Represents debug. See Table 3 for details. |
display logfile buffer
Use display logfile buffer to display the 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
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
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 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
…
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.
Usage guidelines
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
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 6 Command output
Field |
Description |
Log file is |
State of the log file feature: enabled or disabled. |
Channel number |
Log file channel number, which defaults to 9. |
Log file size quota |
Maximum size of the 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. Without this keyword, the command displays trap entries 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 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983041 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:439 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983048 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:439 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983056 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:03:27:465 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 3277798 is Up, ifAdminStatus is 1, ifOperStatus is 1
#Aug 7 08:05:32:425 2009 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.3<linkDown>: Interface 983048 is Down, ifAdminStatus is 1, ifOperStatus is 2
#Aug 7 08:39:53:302 2009 Sysname SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.2011.10.2.2.1.1.3.0.1<h3cLogIn>: login from VTY
#Aug 7 08:43:25:583 2009 Sysname CFGMAN/4/TRAP:
1.3.6.1.4.1.2011.10.2.4.2.1<h3cCfgManEventlog> configure changed:
EventIndex=1,CommandSource=2,ConfigSource=4,ConfigDestination=2
Table 7 Command output
Field |
Description |
Trapping buffer configuration and contents |
State of the trap buffer: enabled or disabled. |
Allowed max buffer size |
Maximum capacity of the trap buffer. |
Actual buffer size |
Actual capacity of the trap buffer. |
Channel number |
Channel number of the trap buffer, which defaults to 3. |
channel name |
Channel name of the trap buffer, which 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 current messages. |
enable log updown
Use enable log updown to allow a port to generate link up or link down logs when the port state changes.
Use undo enable log updown to disable a port from generating link up or link down logs when the port state changes.
Syntax
enable log updown
undo enable log updown
Default
All the ports are allowed to generate port link up or link down logs when the port state changes.
Views
Interface view
Default command level
2: System level
Examples
# Disable port GigabitEthernet 1/0/1 from generating link up or link 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 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 name for the channel, 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 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.
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 when the information center has been 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 device 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 filter channel
Use info-center filter channel to configure a regular expression for a channel to filter system information output to that channel.
Use undo info-center filter channel to remove the configuraiton.
Syntax
info-center filter channel channelNum { exclude | include } regular-expression
undo info-center filter channel channelNum
Default
No regular expression is configured for a channel.
Views
System view
Default command level
3: Manage level
Parameters
channelNum: Specifies a channel by its number in the range of 0 to 9.
exclude: Outputs information that does not match the specified regular expression to the channel.
include: Outputs information that matches the specified regular expression to the channel.
regular-expression: Specifies a regular expression, a string of 1 to 257 characters.
Usage guidelines
This command is supported only in FIPS mode.
Do not configure complicated regular expressions such as .*.*.*/. for a channel. Otherwise, system information filtering might fail, and the performance of the information center will be afffected.
You cannot configure regular expressions for channels that output system information to the SNMP module, Web interface, or the NETCONF module.
Examples
# Output only system information that contains abc to channel 2.
<Sysname> system-view
[Sysname] info-center filter channel 2 include abc
# Remove the regular expression configuration for channel 2.
<Sysname> system-view
[Sysname] undo info-center filter channel 2
info-center format
Use info-center format 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 { cmcc | unicom }
undo info-center format
Default
System information is sent to a log host in H3C format.
Views
System view
Default command level
2: System level
Parameters
cmcc: Specifies the CMCC format. The CMCC format is complicant with the log formatting standards of China Mobile and China Telecom.
unicom: Specifies the UNICOM format.
Usage guidelines
System information can be sent to a log host in H3C, UNICOM, or CMCC format. For more information, see Network Management and Monitoring Configuration Guide.
Examples
# Specify 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 the log buffer. The value range is 0 to 1024 and the default is 512.
Usage guidelines
The info-center logbuffer command takes effect only after the information center has been 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
Usage guidelines
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
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 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 the saving interval in the range of 1 to 86400 seconds.
Usage guidelines
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
Examples
# Configure the interval for saving system information to the log file as 60000 seconds.
<Sysname> system-view
[Sysname] info-center logfile frequency 60000
info-center logfile overwrite-protection
Use info-center logfile overwrite-protection to enable log file overwrite-protection. When the log file is full or the storage device runs out of space, the device stops saving logs into the log file.
Use undo info-center logfile overwrite-protection to disable log file overwrite-protection. When the log file is full or the storage device runs out of space, the device overwrites the oldest logs in the log file with new logs.
Syntax
info-center logfile overwrite-protection [ all-port-powerdown ]
undo info-center logfile overwrite-protection
Default
Log file overwrite-protection is disabled.
Views
System view
Predefined user roles
network-admin
mdc-admin
Parameters
all-port-powerdown: Shuts down all the service ports on the device when the log file is full or the storage device runs out of space.
Usage guidelines
This command is supported only in FIPS mode.
Support for the command on the device model. For more information, see About the H3C Access Controllers Command References.
Examples
# Enable log file overwrite-protection.
<Sysname> system-view
[Sysname] info-center logfile overwrite-protection
info-center logfile size-quota
Use info-center logfile size-quota to set the maximum size of the log file.
Use undo info-center logfile size-quota to restore the default.
Syntax
info-center logfile size-quota size
undo info-center logfile size-quota
Default
The maximum size of the log file depends on the device model. For more information, see About the H3C Access Controllers Command References.
Views
System view
Default command level
2: System level
Parameters
size: Specifies the maximum size of the log file, in the range of 1 to 10 MB.
Usage guidelines
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
Examples
# Set the maximum size of 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 the log file is saved.
Syntax
info-center logfile switch-directory dir-name
Default
The log file is saved in the logfile directory under the root directory of the storage device.
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
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
The specified directory must have been created.
The configuration made by this command cannot survive a system restart.
Examples
# Create a directory named test under the flash root directory.
<Sysname> mkdir test
%Created dir caf0:/test.
# Set the directory to save the log file to caf0:/test.
<Sysname> system-view
[Sysname] info-center logfile switch-directory caf0:/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 | host-name | ipv6 host-ipv6-address } [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] *
undo info-center loghost { host-ipv4-address | ipv6 host-ipv6-address }
Default
No log host is specified.
Views
System view
Default command level
2: System level
Parameters
ipv6 host-ipv6-address: Specifies the IPv6 address of a log host.
host-ipv4-address: Specifies the IPv4 address of a log host.
host-name: Specifies the name of the log host.
port port-number: Specifies the port number of the log host. The value range is 1 to 65535 and the default is 514. The value must be the same as that configured on the log host. Otherwise, the log host cannot receive system information.
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 filter logs.
Usage guidelines
If you configure this command without specifying a channel, the system specifies channel 2 (loghost) by default.
The info-center loghost command takes effect only after the information center has been enabled with the info-center enable command.
Enter a correct log host IP address. The system prompts an invalid address you enter an incorrect IP address, such as an IPv6 loopback address or a broadcast address.
The device supports up to four log hosts.
Examples
# Output log information to the IPv4 log host 1.1.1.1.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
# Output log information to the IPv6 log host 1::1.
<Sysname> system-view
[Sysname] info-center loghost ipv6 1::1
info-center loghost source
Use info-center loghost source to specify the source IP address for output 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 by using the username ftp. The following log information is displayed on the log host:
<189>May 31 05:37:52 2003 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 the 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
After the configuration, log in to the FTP server by using the username ftp. The following log information is displayed on the log host (the -DevIP=2.2.2.2 field identifies the source IP address):
<189>May 31 05:38:14 2003 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.
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 has been 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 "info-center channel name."
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 8.
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 3.
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 8 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 execute this 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 and debug information and discards trap information.
The SNMP module only receives trap information and discards log and debug information.
Destination |
Source modules |
Log |
Trap |
Debug |
|||
Status |
Severity |
Status |
Severity |
Status |
Severity |
||
Console |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Monitor terminal |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Enabled |
Debug |
Log host |
All supported modules |
Enabled |
Informational |
Enabled |
Debug |
Disabled |
Debug |
Trap buffer |
All supported modules |
Disabled |
Informational |
Enabled |
Informational |
Disabled |
Debug |
Log buffer |
All supported modules |
Enabled |
Informational |
Disabled |
Debug |
Disabled |
Debug |
SNMP module |
All supported modules |
Disabled |
Debug |
Enabled |
Informational |
Disabled |
Debug |
Web interface |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
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 channel console. 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 enter 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-
Now, the system receives log information. It displays the log information first, and then displays your previous input, which is display current- in this example.
%May 21 14:33:19:425 2007 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Sysname] display current-
Enter configuration to complete the display current-configuration command, and press the Enter key to execute the command.
# Enable synchronous information output, 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]:
Now, the system receives the log information. It displays the log information first and then displays [Y/N].
%May 21 14:33:19:425 2007 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 default 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 the 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 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 to 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 2007. The boot time shows the time since system startup.
date: Sets the timestamp format to Mmm dd hh:mm:ss:sss yyyy, for example, Dec 8 10:12:21:708 2007. 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 it is 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 that no time information is provided.
Examples
# Set the timestamp format to boot.
<Sysname> system-view
[Sysname] info-center timestamp log boot
Now, if you log in to the FTP server by 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
Now, if you log in to the FTP server by using the username ftp, the log information generated is as follows:
%May 30 05:36:29:579 2003 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
Now, if you log in to the FTP server by 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 a 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 a log host is date.
Views
System view
Default command level
2: System level
Parameters
date: Sets the timestamp format to Mmm dd hh:mm:ss:ms yyyy, for example, Dec 8 10:12:21:708 2007. The actual format depends on the log host.
iso: Specifies the ISO 8601 timestamp format. For example, 2009-09-21T15:32:55.
no-year-date: Sets the timestamp format to the current system date and time without the year.
none: Indicates that no timestamp information is provided.
Examples
# Set the timestamp format to no-year-date for system information sent to a log host.
<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. The value range is 0 to 1024 and the default 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 has been 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 logs from the log buffer to the log file at the interval configured by the info-center logfile frequency command. The directory for the log file can be specified by using the info-center logfile switch-directory command.
Views
Any view
Default command level
2: System level
Usage guidelines
Support for the command depends on the device model. For more information, see About the H3C Access Controllers Command References.
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 is disabled both on the console and the current terminal.
Views
User view
Default command level
1: Monitor level
Usage guidelines
To view debug information, execute the terminal monitor and terminal debugging commands, enable the information center (enabled by default), and 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 default is restored.
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 is enabled both on the console and the current terminal.
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 default is restored.
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
Monitoring of the 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 default is restored.
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 is enabled on both the console and the current terminal.
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.