- Table of Contents
-
- 13-Network Management and Monitoring Command Reference
- 00-Preface
- 01-System Maintenance and Debugging Commands
- 02-NQA Commands
- 03-NTP Commands
- 04-Clock Monitoring Commands
- 05-IPC Commands
- 06-SNMP Commands
- 07-RMON Commands
- 08-CWMP Commands
- 09-Sampler Commands
- 10-Mirroring Commands
- 11-Protocol Packet Statistics Commands
- 12-sFlow Commands
- 13-Information Center Commands
- 14-Packet Capture Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
13-Information Center Commands | 201.07 KB |
Contents
Information center configuration commands
display security-logfile buffer
display security-logfile summary
info-center logfile overwrite-protection
info-center logfile size-quota
info-center logfile switch-directory
info-center security-logfile alarm-threshold
info-center security-logfile enable
info-center security-logfile frequency
info-center security-logfile size-quota
The switch supports the FIPS mode that complies with NIST FIPS 140-2 requirements. Support for features, commands, and parameters might differ in FIPS mode and non-FIPS mode. For more information about FIPS mode, see Security Configuration Guide.
display channel
Syntax
display channel [ channel-number | channel-name ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
channel-number: 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 |
Cahnnel6 |
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.
Description
Use display channel to display channel information.
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. |
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 permitted modules depend on the switch 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
Syntax
display info-center [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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.
Description
Use display info-center to display the information of each output destination.
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
Sent messages = 8331, Received messages = 25582
IO Reg messages = 0 IO Sent messages = 17252
Syntax
Standalone mode:
display logbuffer [ reverse ] [ level severity | size buffersize | slot slot-number] * [ | { begin | exclude | include } regular-expression ]
IRF mode:
display logbuffer [ reverse ] [ level severity | size buffersize | chassis chassis-number slot slot-number ] * [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
reverse: Displays log entries chronologically, with the most recent entry at the top. 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.
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.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument specifies the IRF member switch ID, and the slot-number argument specifies the slot number of the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
|: 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.
Description
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.
Examples
# Display the state and log information of the log buffer (in standalone mode).
<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 2008 Sysname IC/7/SYS_RESTART:
System restarted --
…
# Display the state of the log buffer and the log information recorded in the log buffer (in IRF mode).
<Sysname> display logbuffer chassis 1 slot 0
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 : 168
%Feb 16 16:58:31:528 2011 h3c IC/6/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 capacity of the log buffer. |
Actual buffer size |
Actual capacity of the log buffer. |
Channel number |
Log buffer channel number, which defaults to 4. |
Channel name |
Log buffer channel name, which defaults to 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
Syntax
Standalone mode:
display logbuffer summary [ level severity | slot slot-number] * [ | { begin | exclude | include } regular-expression ]
IRF mode:
display logbuffer summary [ level severity | chassis chassis-number slot slot-number ] * [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
level severity: Specifies a severity level in the range of 0 to 7.
slot slot-number: Specifies a card by its slot number. Use this option when your switch is operating in standalone (the default) mode.
chassis chassis-number slot slot-number: Specifies a card on an IRF member switch. The chassis-number argument specifies the ID of the IRF member switch, and the slot-number argument specifies the slot number of the card. Use this option when your switch is operating in IRF mode. For more information about IRF, see IRF Configuration Guide.
|: 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.
Description
Use display logbuffer summary to display the summary of the log buffer.
Examples
# Display the summary of the log buffer (in standalone mode).
<Sysname> display logbuffer summary
SLOT EMERG ALERT CRIT ERROR WARN NOTIF INFO DEBUG
0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
3 0 0 0 0 16 0 1 0
# Display the summary of the log buffer (in IRF mode).
<Sysname> display logbuffer summary
CHASSIS SLOT EMERG ALERT CRIT ERROR WARN NOTIF INFO DEBUG
1 0 0 0 0 1 238 0 1 0
1 1 0 0 0 0 0 0 0 0
1 2 0 0 0 0 1 0 0 0
2 0 0 0 0 0 5 0 0 0
2 1 0 0 0 0 1 0 0 0
Table 5 Command output
Field |
Description |
CHASSIS |
IRF member switch ID. |
SLOT |
Slot number of the card. |
EMERG |
Represents emergency. See Table 3 for more information. |
ALERT |
Represents alert. See Table 3 for more information. |
CRIT |
Represents critical. See Table 3 for more information. |
ERROR |
Represents error. See Table 3 for more information. |
WARN |
Represents warning. See Table 3 for more information. |
NOTIF |
Represents notice. See Table 3 for more information. |
INFO |
Represents informational. See Table 3 for more information. |
DEBUG |
Represents debug. See Table 3 for more information. |
display logfile buffer
Syntax
display logfile buffer [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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.
Description
Use display logfile buffer to display contents of the log file buffer.
The system clears the logfile buffer after saving logs from the log file buffer to the log file.
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
Syntax
display logfile summary [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see 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.
Description
Use display logfile summary to display the log file configuration.
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 storage space of a log file. |
Log file directory |
Directory where the log file is saved. |
Writing frequency |
Interval at which the system writes logs from the log file buffer to the log file. |
display security-logfile buffer
Syntax
display security-logfile buffer [ | { begin | exclude | include } regular-expression ]
View
User view
Default 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.
Description
Use display security-logfile buffer to display the contents of the security log file buffer.
A local user can use this command only after being authorized as the security log administrator by the system administrator through the authorization-attribute user-role security-audit command. For more information about the authorization-attribute command, see Security Command Reference.
The system buffers security logs into the security log file buffer temporarily. When a saving operation is performed (automatically or manually), the system saves the security logs from the security log file buffer into the security log file, and then clears the security log file buffer.
Related commands: info-center security-logfile frequency and security-logfile save.
Examples
# Display the contents of the security log file buffer.
<Sysname> display security-logfile buffer
%@1 Sep 17 11:13:16:609 2009 Sysname SHELL/5/SHELL_LOGIN: Console logged in from con0.
…
display security-logfile summary
Syntax
display security-logfile summary [ | { begin | exclude | include } regular-expression ]
View
Security log management view
Default 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.
Description
Use display security-logfile summary to display the summary of the security log file.
A local user can use this command only after being authorized as the security log administrator by the system administrator through the authorization-attribute user-role security-audit command. For more information about the authorization-attribute command, see Security Command Reference.
Examples
# Display the summary of the security log file.
<Sysname> display security-logfile summary
Security log file is enabled
Security log file size quota: 6MB
Security log file directory: flash:/seclog
Alarm-threshold: 80%
Current usage: 30%
Writing frequency: 1 hour 0 min 0 sec
Table 7 Command output
Field |
Description |
Security log file is |
State of the security log file: enabled or disabled. |
Security log file size quota |
Maximum storage space reserved for the security log file. |
Security log file directory |
Directory where the security log file is saved. |
Alarm-threshold |
Alarm threshold of the security log file usage. |
Current usage |
Current usage of the security log file. |
Writing frequency |
Security log file writing frequency. |
display trapbuffer
Syntax
display trapbuffer [ reverse ] [ size buffersize ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
reverse: Displays trap entries chronologically, with the most recent entry at the top. 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.
Description
Use display trapbuffer to display the state and the trap information of the trap buffer. Without size buffersize, the command displays all trap information.
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 8 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 |
Trap buffer channel number, which defaults to 3. |
channel name |
Trap buffer channel name, 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
Syntax
enable log updown
undo enable log updown
View
Interface view
Default level
2: System level
Parameters
None
Description
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 when the port state changes.
By default, all the ports are allowed to generate port link up/down logs when the port state changes.
Examples
# Disable port GigabitEthernet 3/0/1 from generating link up/down logs.
<Sysname> system-view
[Sysname] interface GigabitEthernet 3/0/1
[Sysname-GigabitEthernet3/0/1] undo enable log updown
info-center channel name
Syntax
info-center channel channel-number name channel-name
undo info-center channel channel-number
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel 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.
Description
Use info-center channel name to name a channel.
Use undo info-center channel to command to restore the default name for a channel.
See Table 1 for more information about default channel names and channel numbers.
Examples
# Name channel 0 as abc.
<Sysname> system-view
[Sysname] info-center channel 0 name abc
info-center console channel
Syntax
info-center console channel { channel-number | channel-name }
undo info-center console channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel 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.
Description
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.
By default, the system outputs information to the console through channel 0 (console).
The info-center console channel command takes effect only after 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
Syntax
info-center enable
undo info-center enable
View
System view
Default level
2: System level
Parameters
None
Description
Use info-center enable to enable the information center.
Use undo info-center enable to disable the information center.
By default, the information center is enabled.
The system outputs information to the log host or the console only after the information center has been enabled.
Examples
# Enable the information center.
<Sysname> system-view
[Sysname] info-center enable
Info: Information center is enabled.
info-center format unicom
Syntax
info-center format unicom
undo info-center format
View
System view
Default level
2: System level
Parameters
None
Description
Use 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.
By default, system information is sent to a log host in H3C format.
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
Syntax
info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center logbuffer [ channel | size ]
View
System view
Default level
2: System level
Parameters
channel-number: 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, in the range of 0 to 1024. The default value is 512.
Description
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.
By default, the system outputs information to the log buffer through channel 4 (logbuffer), and the maximum buffer size is 512.
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
Syntax
info-center logfile enable
undo info-center logfile enable
View
System view
Default level
2: System level
Parameters
None
Description
Use info-center logfile enable to enable the log file feature.
Use undo info-center logfile enable to disable the log file feature.
By default, the log file feature is enabled.
Examples
# Enable the log file feature.
<Sysname> system-view
[Sysname] info-center logfile enable
info-center logfile frequency
Syntax
info-center logfile frequency freq-sec
undo info-center logfile frequency
View
System view
Default level
2: System level
Parameters
freq-sec: Specifies the saving interval, in seconds. The value range is 1 to 86400 and the default is 60.
Description
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.
The default saving interval is 86400 seconds.
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
Syntax
info-center logfile overwrite-protection [ all-port-powerdown ]
undo info-center logfile overwrite-protection
View
System view
Default level
2: System level
Parameters
all-port-powerdown: Shuts down all the physical ports except for the console port, the aux port, the management Ethernet ports, and physical ports that are bound to an IRF port when the number of log files reaches the upper limit or the storage device runs out of space.
Description
Use info-center logfile overwrite-protection to enable log file overwrite-protection. When the number of log files reaches the upper limit or the storage device runs out of space, new logs cannot be written into the log files.
Use undo info-center logfile overwrite-protection to disable the log file overwrite-protection function. When the number of log files reaches the upper limit or the storage device runs out of space, the device deletes the earliest logs and writes new logs into the log files.
This command is supported only in FIPS mode.
By default, log file overwrite-protection is disabled.
Examples
# Enable log file overwrite-protection.
<Sysname> system-view
[Sysname] info-center logfile overwrite-protection
info-center logfile size-quota
Syntax
info-center logfile size-quota size
undo info-center logfile size-quota
View
System view
Default level
2: System level
Parameters
size: Specifies the maximum storage space reserved for a log file, in MB. The value range is 1 to 10.
Description
Use info-center logfile size-quota to set the maximum storage space reserved for a log file.
Use undo info-center logfile size-quota to restore the default maximum storage space reserved for a log file.
By default, the storage space reserved for a log file is 5 MB.
Examples
# Set the maximum storage space reserved for a log file to 6 MB.
<Sysname> system-view
[Sysname] info-center logfile size-quota 6
info-center logfile switch-directory
Syntax
info-center logfile switch-directory dir-name
View
System view
Default level
2: System level
Parameters
dir-name: Specifies a directory by its name, a string of 1 to 64 characters.
Description
Use info-center logfile switch-directory to specify the directory to save the log file. Make sure the specified directory must have been created.
By default, the log file is saved in the logfile directory under the root directory of the storage device. If the device has been partitioned, the log file is usually saved in the logfile directory in the second partition of the storage device.
The configuration made by the info-center logfile switch-directory command cannot survive a reboot or an active/standby switchover.
Examples
# Create a directory with the name test under flash root directory.
<Sysname> mkdir test
%Created dir flash:/test.
# Set the directory to save the log file to flash:/test.
<Sysname> system-view
[Sysname] info-center logfile switch-directory flash:/test
info-center loghost
Syntax
info-center loghost [ vpn-instance vpn-instance-name ] { host-ipv4-address | ipv6 host-ipv6-address } [ port port-number ] [ channel { channel-number | channel-name } | facility local-number ] *
undo info-center loghost [ vpn-instance vpn-instance-name ] { host-ipv4-address | ipv6 host-ipv6-address }
View
System view
Default level
2: System level
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN by its name, a case-sensitive string of 1 to 31 characters. If the log host is on the public network, do not specify this option.
ipv6 host-ipv6-address: Specifies the IPv6 address of a log host.
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.
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 setting is local7. Logging facilities are used to mark different logging sources, and query and filer logs.
Description
Use info-center loghost to specify a log host and to configure the output parameters.
Use undo info-center loghost to restore the default.
By default, no log host is specified.
If you configure this command without specifying a channel, the system uses channel 2 (loghost) by default.
Enter a correct log host IP address. The system prompts an invalid address if you enter an incorrect IP address, such as an IPv6 loopback address or a broadcast address.
The switch supports up to four log hosts.
Examples
# Output log information to the log host 1.1.1.1.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
# Output log information to the log host 1.1.1.2 in vpn1.
<Sysname> system-view
[Sysname] info-center loghost vpn-instance vpn1 1.1.1.2
# Output log information to the log host with the IPv6 address of 1::1.
<Sysname> system-view
[Sysname] info-center loghost ipv6 1::1
info-center loghost source
Syntax
info-center loghost source interface-type interface-number
undo info-center loghost source
View
System view
Default level
2: System level
Parameters
interface-type interface-number: Specifies the egress interface for log information by the interface type and interface number.
Description
Use info-center loghost source to specify the source IP address for output log information.
Use undo info-center loghost source to restore the default.
By default, the source IP address of output log information is the primary IP address of the matching route's egress interface.
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 after the information center is 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 log information. (Layer 3 mode)
<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. (Layer 2 mode)
<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 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
Syntax
info-center monitor channel { channel-number | channel-name }
undo info-center monitor channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel 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.
Description
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.
By default, the system outputs information to the monitor through channel 1 (monitor).
The info-center monitor channel command takes effect only when 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 security-logfile alarm-threshold
Syntax
info-center security-logfile alarm-threshold usage
undo info-center security-logfile alarm-threshold
View
System view
Default level
2: System level
Parameters
usage: Specifies an alarm threshold. The value must be an integer in the range of 1 to 100.
Description
Use info-center security-logfile alarm-threshold to set the alarm threshold for security log file usage.
Use undo info-center security-logfile alarm-threshold to restore the default.
The default alarm threshold for security log file usage is 80. That is, when the usage of the security log file reaches 80%, the system outputs a message to inform the administrator.
When the size of the security log file reaches the upper limit, the system deletes the oldest information and then writes the new information into the security log file buffer. This feature can avoid security log loss by setting an alarm threshold. When the threshold is reached, the system outputs log information to inform the administrator. The administrator can log in to the device as the security log administrator, and back up the security log file.
Related commands: info-center security-logfile size-quota
Examples
# Set the alarm threshold for security log file usage to 90%.
<Sysname> system-view
[Sysname] info-center security-logfile alarm-threshold 90
info-center security-logfile enable
Syntax
info-center security-logfile enable
undo info-center security-logfile enable
View
System view
Default level
2: System level
Parameters
None
Description
Use info-center security-logfile enable to enable the saving of security logs into the security log file.
Use undo info-center security-logfile enable to restore the default.
By default, the saving of security logs into the security log file is disabled.
This feature enables the system to output security logs into the security log file buffer, and saves the security logs from the buffer to the security log file at a specific interval.
Examples
# Enable the saving of the security logs into the security log file.
<Sysname> system-view
[Sysname] info-center security-logfile enable
info-center security-logfile frequency
Syntax
info-center security-logfile frequency freq-sec
undo info-center security-logfile frequency
View
System view
Default level
2: System level
Parameters
freq-sec: Specifies the interval at which the system saves security logs from the security log file buffer to the security log file, in the range of 10 to 86400 seconds.
Description
Use info-center security-logfile frequency to configure the interval for saving security logs to the security log file.
Use undo info-center security-logfile frequency to restore the default saving interval.
The default saving interval is 600 seconds.
Related commands: info-center security-logfile enable.
Examples
# Save security logs to the security log file every 600 seconds.
<Sysname> system-view
[Sysname] info-center security-logfile frequency 600
info-center security-logfile size-quota
Syntax
info-center security-logfile size-quota size
undo info-center security-logfile size-quota
View
System view
Default level
2: System level
Parameters
size: Specifies the maximum storage space reserved for the security log file, in the range of 1 to 10 MB.
Description
Use info-center security-logfile size-quota to set the maximum storage space reserved for the security log file.
Use undo info-center security-logfile size-quota to restore the default.
The default storage space reserved for the security log file is 1 MB.
Related commands: info-center security-logfile alarm-threshold.
Examples
# Set the maximum storage space reserved for the security log file to 6 MB.
<Sysname> system-view
[Sysname] info-center security-logfile size-quota 6
info-center snmp channel
Syntax
info-center snmp channel { channel-number | channel-name }
undo info-center snmp channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel 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.
Description
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.
By default, the system outputs information to the SNMP module through channel 5 (snmpagent). For more information about SNMP, see "SNMP configuration commands."
Examples
# Output system information to the SNMP module through channel 6.
<Sysname> system-view
[Sysname] info-center snmp channel 6
info-center source
Syntax
info-center source { module-name | default } channel { channel-number | channel-name } [ debug { level severity | state state } * | log { level severity | state state } * | trap { level severity | state state } * ] *
undo info-center source { module-name | default } channel { channel-number | channel-name }
View
System view
Default level
2: System level
Parameters
module-name: Specifies 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. See Table 3 for more information.
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.
Description
Use info-center source to specify the output rules of the system information.
Use undo info-center source to remove the specified output rules.
The default output rules are listed in Table 9.
This command can be used to set the filter and redirection rules of log, trap and debug information.
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.
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 debugging information is disabled, with severity being debug. For example, if you execute the command info-center source snmp channel 5, the command is actually equal to the command info-center source snmp channel 5 debug level debugging state off log level informational state on trap level informational state on.
If you 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 and debug information and discards trap information.
The SNMP module only receives trap information and discards log and debug information.
Table 9 Default output rules for different output destinations
Destination |
System information source |
Log |
Trap |
Debug |
|||
Enabled/disabled |
Severity |
Enabled/disabled |
Severity |
Enabled/disabled |
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 |
Log file |
All supported modules |
Enabled |
Debug |
Enabled |
Debug |
Disabled |
Debug |
Examples
# Output VLAN module's log information with a severity of at least emergency to channel snmpagent. Log information of other modules cannot be output to this channel; other types of information of this module may or may not be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent log state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
# Output VLAN module's log information with a severity of at least emergency to channel snmpagent. All other system information cannot be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent debug state off log state off trap state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
info-center synchronous
Syntax
info-center synchronous
View
System view
Default level
2: System level
Parameters
None
Description
Use info-center synchronous to enable synchronous information output.
Use undo info-center synchronous to disable synchronous information output.
By default, synchronous information output is disabled.
If system information, such as log information, is output before you input any information under a current command line prompt, the system will not display the command line prompt after the system information output.
If system information is output when you are inputting some interactive information (non Y/N confirmation information), then after the system information output, the system will not display the command line prompt but your previous input in a new line.
Examples
# Enable synchronous information output, and then issue the display current-configuration command to view the current configuration of the switch.
<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 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]:
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 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
Syntax
info-center syslog channel { channel-number | channel-name }
undo info-center syslog channel
View
System view
Default level
2: System level
Parameters
channel-number: Specifies a channel 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.
Description
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.
By default, the system outputs information to the Web interface through channel 6.
Examples
# Output system information to the Web interface through channel 7.
<Sysname> system-view
[Sysname] info-center syslog channel 7
info-center timestamp
Syntax
info-center timestamp { debugging | log | trap } { boot | date | none }
undo info-center timestamp { debugging | log | trap }
View
System view
Default level
2: System level
Parameters
debugging: Sets the 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 2007. The boot time shows the time elapsed since system startup.
date: Sets the timestamp format as "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 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.
Description
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.
By default, the timestamp format for system information sent to all destinations except the log host is date.
Related commands: info-center timestamp loghost.
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 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
At this time, 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
At this time, 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.
info-center timestamp loghost
Syntax
info-center timestamp loghost { date | iso | no-year-date | none }
undo info-center timestamp loghost
View
System view
Default level
2: System level
Parameters
date: Sets the timestamp format as "Mmm dd hh:mm:ss:ms yyyy", such as Dec 8 10:12:21:708 2007. The actual format depends on the log host.
iso: Sets the ISO 8601 timestamp format. For example, 2009-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.
Description
Use info-center timestamp loghost to configure the timestamp format of the system information sent to the log host.
Use undo info-center timestamp loghost to restore the default.
By default, the timestamp format for system information sent to the log host is date.
Related commands: info-center timestamp.
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
info-center trapbuffer
Syntax
info-center trapbuffer [ channel { channel-number | channel-name } | size buffersize ] *
undo info-center trapbuffer [ channel | size ]
View
System view
Default level
2: System level
Parameters
size buffersize: Specifies the maximum number of trap messages 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.
Description
Use info-center trapbuffer to enable information output to the trap buffer and set the output parameters.
Use undo info-center trapbuffer to disable information output to the trap buffer.
By default, the system outputs information to the trap buffer through channel 3 (trapbuffer), and the maximum buffer size is 256.
The info-center trapbuffer command takes effect only when 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
Syntax
logfile save
View
Any view
Default level
2: System level
Parameters
None
Description
Use logfile save to manually save logs from the log file buffer into the log file.
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 using the info-center logfile switch-directory command.
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 logfile buffer into the log file.
<Sysname> logfile save
reset logbuffer
Syntax
reset logbuffer
View
User view
Default level
3: Manage level
Parameters
None
Description
Use reset logbuffer to clear the log buffer.
Examples
# Clear the log buffer.
<Sysname> reset logbuffer
reset trapbuffer
Syntax
reset trapbuffer
View
User view
Default level
3: Manage level
Parameters
None
Description
Use reset trapbuffer to clear the trap buffer.
Examples
# Clear the trap buffer.
<Sysname> reset trapbuffer
terminal debugging
Syntax
terminal debugging
undo terminal debugging
View
User view
Default level
1: Monitor level
Parameters
None
Description
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.
By default, the display of debug information on the current terminal is disabled.
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 switch. If a new connection is established, the display of debugging 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
Syntax
terminal logging
undo terminal logging
View
User view
Default level
1: Monitor level
Parameters
None
Description
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.
By default, the display of log information on the current terminal is disabled.
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 switch. If a new connection is established, the display of log information on the terminal restores the default.
Examples
# Disable the display of log information on the current terminal.
<Sysname> undo terminal logging
Info: Current terminal logging is off.
terminal monitor
Syntax
terminal monitor
undo terminal monitor
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use 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.
By default, the monitoring of system information is enabled on the console and disabled on the monitor terminal.
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 switch. If a new connection is established, the monitoring of system information on the terminal restores the default.
Examples
# Enable the monitoring of system information on the current terminal.
<Sysname> terminal monitor
Info: Current terminal monitor is on.
terminal trapping
Syntax
terminal trapping
undo terminal trapping
View
User view
Default level
1: Monitor level
Parameters
None
Description
Use 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.
By default, the display of trap information on the current terminal is enabled.
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 switch. 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