37-Information Center Command

Download


Chapter 1  Information Center Configuration Commands

 

&  Note:

The information center now supports to add the UTC time zone in the time stamp of the output information. See info-center timestamp utc for details.

 

1.1  Information Center Configuration Commands

1.1.1  display channel

Syntax

display channel [ channel-number | channel-name ]

View

Any view

Parameters

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

Description

Use the display channel command to display the settings of an information channel.

If no argument is specified in the command, the settings of all channels are displayed.

Examples

# Display the settings of information 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      warning       Y      debugging     Y      debugging 

1.1.2  display info-center

Syntax

display info-center [ unit unit-id ]

View

Any view

Parameters

unit-id: Unit ID of the device.

Description

Use the display info-center command to display the operation status of information center, the configuration of information channels, the format of time stamp and the information output in case of fabric.

Related commands: info-center enable, info-center loghost, info-center logbuffer, info-center console channel, info-center monitor channel, info-center trapbuffer, info-center snmp channel, info-center timestamp

Examples

# Display the operation status of information center, the configuration of information channels, the format of time stamp of the current system and the information output status in the IRF fabric.

<Sysname> display info-center

Information Center: enabled

Log host:

         the interface name of the source address : Vlan-interface1

         192.168.0.2, channel number : 2, channel name : loghost

         language : english, host facility local : 7

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, channel number : 4, channel name : logbuffer

         dropped messages : 0, overwritten messages : 586

Trap buffer:

         enabled,max buffer size : 1024, current buffer size : 256,

         current messages : 5, channel number : 3, channel name : trapbuffer

         dropped messages : 0, overwritten messages : 0

Information timestamp setting:

         log - date, trap - date, debug - boot

 

IRF SWITCH OF Device--Unit>1: LOG = enable; TRAP = enable; DEBUG = enable

Table 1-1 Description on the fields of the display info-center command

Field

Description

Information Center

Status of the information center: enabled/disabled

Log host

Information about the log host, including its IP address, name and number of information channel, language and level of the log host

Console

Information about the console port, including name and number of its information channel

Monitor

Information about the monitor port, including name and number of its information channel

SNMP Agent

Information about SNMP Agent, including name and number of its information channel

Log buffer

Information about the log buffer, including its state (enabled or disabled), its maximum size, current size, current messages, information channel name and number, number of dropped messages, and number of overwritten messages

Trap buffer

Information about the trap buffer, including its state (enabled or disabled), maximum size, current size, current messages, channel number and name, number of dropped messages, and number of overwritten messages

Information timestamp setting:

Information about the time stamp setting, showing the time stamp format of the log, trap and debugging information

IRF SWITCH OF Device--Unit>1

Information about the information output state of the device (enabled or disabled), showing whether the log, trap and debugging information output are enabled on the device

 

1.1.3  display logbuffer

Syntax

display logbuffer [ unit unit-id ] [ level severity | size buffersize ]* [ | { begin | exclude | include } regular-expression ]

View

Any view

Parameters

unit-id: Unit ID of the device.

level severity: Specifies an information severity level. The severity argument ranges from 1 to 8.

Table 1-2 Severity level defined in the information center

Severity

Severity value

Description

emergencies

1

The system is unavailable.

alerts

2

Information that demands prompt reaction

critical

3

Critical information

errors

4

Error information

warnings

5

Warnings

notifications

6

Normal information that needs to be noticed

informational

7

Informational information to be recorded

debugging

8

Information generated during debugging

 

size buffersize: Specifies the size of the log buffer (number of messages the log buffer holds) you want to display. The buffersize argument ranges from 1 to 1,024 and defaults to 512.

|: Filters output log information with a regular expression.

begin: Displays the line that matches the regular expression and all the subsequent lines.

exclude: Displays the log information excluding the specified characters.

include: Displays the log information including the specified characters.

regular-expression: Regular expression.

Description

Use the display logbuffer command to display the status of the log buffer and the records in the log buffer.

Examples

# Display the status of the log buffer and the records in the log buffer.

<Sysname> display logbuffer

Logging buffer configuration and contents:enabled

Allowed max buffer size : 1024

Actual buffer size : 512

Channel number : 4 , Channel name : logbuffer

Dropped messages : 0

Overwritten messages : 0

Current messages : 91

 

%Jun 19 18:03:24:55 2006 Sysname IC/7/SYS_RESTART:

System restarted --

The rest is omitted here.

Table 1-3 display logbuffer command output description

Field

Description

Logging buffer configuration and contents

Indicates the current state of the log buffer and its contents, which could be enabled or disabled.

Allowed max buffer size

The maximum buffer size allowed

Actual buffer size

The actual buffer size

Channel number

The channel number of the log buffer, defaults to 4.

Channel name

The channel name of the log buffer, defaults to logbuffer.

Dropped messages

The number of dropped messages

Overwritten messages

The number of overwritten messages (when the buffer size is not big enough to hold all messages, the latest messages overwrite the old ones).

Current messages

The number of the current messages

 

1.1.4  display logbuffer summary

Syntax

display logbuffer summary [ level severity ]

View

Any view

Parameters

Level severity: Specifies an information severity level. The severity argument ranges from 1 to 8.

Description

Use the display logbuffer summary command to display the statistics of the log buffer.

Examples

# Display the summary of the log buffer.

<Sysname> display logbuffer summary

 EMERG ALERT  CRIT ERROR  WARN NOTIF  INFO DEBUG

     0     0     0     0    94     0     1     0

The above information indicates that there are 94 warnings and one informational information in the log buffer.

1.1.5  display trapbuffer

Syntax

display trapbuffer [ unit unit-id ] [ size buffersize ]

View

Any view

Parameters

unit-id: Unit ID of the device.

size buffersize: Specifies the size of the trap buffer (number of messages the buffer holds) you want to display. The buffersize argument ranges from 1 to 1,024 and defaults to 256.

Description

Use the display trapbuffer command to display the status of the trap buffer and the records in the trap buffer.

Absence of the size buffersize argument indicates that all trap information is displayed.

Examples

# Display the status of the trap buffer and the records in 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 : 19

 

#Apr  1 23:55:35:859 2006 Sysname L2INF/2/PORT LINK STATUS CHANGE:- 1 -

 Trap 1.3.6.1.6.3.1.1.5.4(linkUp): portIndex is 4227762, ifAdminStatus is 1, ifOperStatus is 1

 

#Apr  1 23:55:36:059 2006 Sysname L2INF/2/PORT LINK STATUS CHANGE:- 1 -

 Trap 1.3.6.1.6.3.1.1.5.4(linkUp): portIndex is 4227794, ifAdminStatus is 1, ifOperStatus is 1

……

<Omitted>

1.1.6  info-center channel name

Syntax

info-center channel channel-number name channel-name

undo info-center channel channel-number

View

System view

Parameters

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, up to 30 characters in length. The name must start with an English letter, containing no special character but numbers and English letters only.

Description

Use the info-center channel name command to name the channel whose number is channel-number as channel-name.

Use the undo info-center channel command to restore the default name of the channel whose number is channel-number.

By default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

Do not configure two different channels with the same name.

Examples

# Name channel 0 as “execconsole”.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center channel 0 name execconsole

1.1.7  info-center console channel

Syntax

info-center console channel { channel-number | channel-name }

undo info-center console channel

View

System view

Parameters

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

Description

Use the info-center console channel command to set the channel through which information is output to the console.

Use the undo info-center console channel command to restore the default channel through which system information is output to the console.

By default, output of information to the console is enabled with channel 0 as the default channel (known as console).

This command works only when the information center is enabled.

Related commands: info-center enable and display info-center.

Examples

# Configure to output information to the console through channel 0.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center console channel 0

1.1.8  info-center enable

Syntax

info-center enable

undo info-center enable

View

System view

Parameters

None

Description

Use the info-center enable command to enable the information center.

Use the undo info-center enable command to disable the information center.

The switch can output system information to the log host, the console, and other destinations only when the information center is enabled.

By default, the information center is enabled.

Related commands: display info-center, info-center loghost, info-center logbuffer, info-center console channel, info-center monitor channel, info-center trapbuffer, info-center snmp channel.

Examples

# Enable the information center.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center enable

1.1.9  info-center logbuffer

Syntax

info-center logbuffer [ channel { channel-number | channel-name } | size buffersize ]*

undo info-center logbuffer [ channel | size ]

View

System view

Parameters

channel: Sets the channel through which information outputs to the log buffer.

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

size buffersize: Specifies the size of the log buffer (number of messages the buffer holds) you want to display. The buffersize argument ranges from 0 to 1,024 and defaults to 512.

Description

Use the info-center logbuffer command to enable information output to the log buffer.

Use the undo info-center logbuffer command to disable information output to the log buffer.

By default, information output to the log buffer is enabled with channel 4 (logbuffer) as the default channel and a maximum buffer size of 512.

This command works only when the information center is enabled.

Related commands: info-center enable, display info-center.

Examples

# Configure the system to output information to the log buffer with the size of 50.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center logbuffer size 50

1.1.10  info-center loghost

Syntax

info-center loghost host-ip-addr [ channel { channel-number | channel-name } | facility local-number ]*

undo info-center loghost host-ip-addr

View

System view

Parameters

host-ip-addr: IP address of a log host.

channel: Sets the information channel for the log host.

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

facility local-number: The logging facility of the log host. The local-number argument ranges from local0 to local7, with the corresponding value ranging from 16 to 23. The default logging facility is local7, with the value being 23.

Description

Use the info-center loghost command to enable information output to a log host through specifying the IP address of the log host.

Use the undo info-center loghost command to disable information output to the log host.

By default, the switch does not output information to the log host. When it is enabled, the default channel name will be loghost and the default channel number will be 2.

This command works only when the information center is enabled.

 

&  Note:

Be sure to set the correct IP address in the info-center loghost command. A loopback IP address will cause an error message, prompting that the address is invalid.

 

Related commands: info-center enable, display info-center.

Examples

# Configure the system to output system information to the Unix log host whose IP address is 202.38.160.1.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center loghost 202.38.160.1

1.1.11  info-center loghost source

Syntax

info-center loghost source interface-type interface-number

undo info-center loghost source

View

System view

Parameters

interface-type: Specifies an interface type.

interface-number: Specifies an interface number.

Description

Use the info-center loghost source command to configure the source interface through which information is sent to the log host.

Use the undo info-center loghost source command to cancel the source interface configuration.

Related commands: info-center enable, display info-center.

Examples

# Configure VLAN-interface 1 as the source interface through which information is sent to the log host.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center loghost source Vlan-interface 1

1.1.12  info-center monitor channel

Syntax

info-center monitor channel { channel-number | channel-name }

undo info-center monitor channel

View

System view

Parameters

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

Description

Use the info-center monitor channel command to set the channel through which information is output to user terminals.

Use the undo info-center monitor channel command to restore the default channel through which information is output to user terminals.

By default, output of system information to the monitor is enabled with a default channel name of monitor and a default channel number of 1.

This command works only when the information center is enabled.

Related commands: info-center enable, display info-center.

Examples

# Set the system to output information to user terminals through channel 0.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center monitor channel 0

1.1.13  info-center snmp channel

Syntax

info-center snmp channel { channel-number | channel-name }

undo info-center snmp channel

View

System view

Parameters

channel-number: Channel number, ranging from 0 to 9, corresponding to the 10 channels of the system.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

Description

Use the info-center snmp channel command to set the channel through which information is output to the SNMP agent.

By default, output of system information to the SNMP NMS is enabled with a default channel name of snmpagent and a default channel number of 5.

Related commands: snmp-agent, display info-center.

Examples

# Set the switch to output information to the SNMP agent through channel 6.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname] info-center snmp channel 6

1.1.14  info-center source

Syntax

info-center source { modu-name | default } channel { channel-number | channel-name } [ { log | trap | debug } { level severity | state state } ]*

undo info-center source { modu-name | default } channel { channel-number | channel-name }

View

System view

Parameters

modu-name: Module name.

default: Defaults the settings of all modules.

channel-number: Number of information channel to be used.

channel-name: Channel name, by default, the name of channel 0 to channel 9 is (in turn) console, monitor, loghost, trapbuffer, logbuffer, snmpagent, channel6, channel7, channel8, channel9.

log: Specifies to output log information.

trap: Specifies to output trap information.

debug: Specifies to output debugging information.

level severity: Specifies an information severity level. For the value of severity, refer to Table 1-2.

state state: Configures whether to output the system information. The value of state can be on (enabled) or off (disabled).

Description

Use the info-center source command to specify the output rules of the system information.

Use the undo info-center source command to remove the specified output rules.

By default, the output rules for the system information are listed in Table 1-4.

This command can be used to set the filter and redirection rules of log, trap and debugging information.

For example, the user can set to output log information with severity higher than warnings to the log host, and information with severity higher than informational to the log buffer. The user can also set to output trap information of the IP module to a specified output destination.

Note that:

l           If you do not use the module-name argument to set output rules for a module, the module uses the default output rules or the output rules set by the default keyword; otherwise, the module uses the output rules separately set for it.

l           If you use the module-name argument to set the output rules for a module without specifying the debug, log, and trap keywords, the default output rules for the module are as follows: the output of log and trap information is enabled, with severity being informational; the output of debugging information is disabled, with severity being debugging. For example, if you execute the command info-center source snmp channel 5, the command is actually equal to the command info-center source snmp channel 5 debug level debugging state off log level informational state on trap level informational state on.

l           After you separately set the output rules for a module, you must use the module-name argument to modify or remove the rules. The new configuration by using the default keyword is invalid on the module.

l           You can configure to output the log, trap and debugging information to the trap buffer, but the trap buffer only receives the trap information and discards the log and debugging information.

l           You can configure to output the log, trap and debugging information to the log buffer, but the log buffer only receives the log and debugging information and discards the trap information.

l           You can configure to output the log, trap and debugging information to the SNMP module, but the SNMP module only receives the trap information and discards the log and debugging information.

Table 1-4 Default output rules for different output destinations

Output destination

Modules allowed

LOG

TRAP

DEBUG

Enabled/disabled

Severity

Enabled/disabled

Severity

Enabled/disabled

Severity

Console

default (all modules)

Enabled

warnings

Enabled

debugging

Enabled

debugging

Monitor terminal

default (all modules)

Enabled

warnings

Enabled

debugging

Enabled

debugging

Log host

default (all modules)

Enabled

informational

Enabled

debugging

Disabled

debugging

Trap buffer

default (all modules)

Disabled

informational

Enabled

warnings

Disabled

debugging

Log buffer

default (all modules)

Enabled

warnings

Disabled

debugging

Disabled

debugging

SNMP module

default (all modules)

Disabled

debugging

Enabled

warnings

Disabled

debugging

Log file

default (all modules)

Enabled

debugging

Enabled

debugging

Disabled

debugging

 

Examples

# Set the output channel for the log information of VLAN module to snmpagent and to output information with severity being emergencies. Log information of other modules cannot be output to this channel.

<Sysname> system-view

[Sysname] info-center source default channel snmpagent log state off

[Sysname] info-center source vlan channel snmpagent log level emergencies state on

# Set the output channel for the log information of VLAN module to snmpagent and to output information with severity being emergencies. Log information of other modules and all the other system information cannot be output to this channel.

<Sysname> system-view

[Sysname] info-center source default channel snmpagent debug state off log state off trap state off

[Sysname] info-center source vlan channel snmpagent log level emergencies state on

1.1.15  info-center synchronous

Syntax

info-center synchronous

undo info-center synchronous

View

System view

Parameters

None

Description

Use the info-center synchronous command to enable synchronous information output, so that if system information (such as log information) is output when the user is inputting information, the command prompt and the input information are echoed after the output (note that, the command prompt is echoed in command edit state but is not echoed in interactive state).

Use the undo info-center synchronous command to disable synchronous information output.

By default, the synchronous information output function is disabled.

 

&  Note:

l      The synchronous information output function is used in the case that your input is interrupted by a large amount of system output. With this function enabled, the system echoes your previous input and you can continue your operations from where you were stopped.

l