Table Of Contents
Logging Services Commands on Cisco IOS XR Software
archive-length
archive-size
clear logging internal
device
file-size
frequency (logging)
logging
logging archive
logging buffered
logging console
logging disable
logging events link-status
logging events link-status (interface)
logging facility
logging history
logging history size
logging hostnameprefix
logging localfilesize
logging monitor
logging source-interface
logging suppress deprecated
logging suppress duplicates
logging trap
service timestamps
severity
show logging
show logging history
terminal monitor
Logging Services Commands on Cisco IOS XR Software
This chapter describes the Cisco IOS XR commands to configure system logging (syslog) for system monitoring.
For detailed information about logging concepts, configuration tasks, and examples, see the Implementing Logging Services on Cisco IOS XR Software module in Cisco IOS XR System Monitoring Configuration Guide.
For alarm management and logging correlation commands, see the Alarm Management and Logging Correlation Commands on Cisco IOS XR Software module in Cisco IOS XR System Monitoring Command Reference. For detailed information about alarm and logging correlation concepts, configuration tasks, and examples, see the Implementing Alarm Logs and Logging Correlation on Cisco IOS XR module in Cisco IOS XR System Monitoring Configuration Guide.
archive-length
To specify the length of time that logs are maintained in the logging archive, use the archive-length command in logging archive configuration mode. To return to the default, use the no form of this command.
archive-length weeks
no archive-length
Syntax Description
weeks
|
Length of time (in weeks) that logs are maintained in the archive. Range is from 0 to 4294967295.
|
Defaults
weeks: 4 weeks
Command Modes
Logging archive configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the archive-length command to specify the maximum number of weeks that the archive logs are maintained in the archive. Any logs older than this number are automatically removed from the archive.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to set the log archival period to 6 weeks:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# archive-length 6
archive-size
To specify the amount of space allotted for syslogs on a device, use the archive-size command in logging archive configuration mode. To return to the default, use the no form of this command.
archive-size size
no archive-size
Syntax Description
size
|
Amount of space (in MB) allotted for syslogs. The range is from 0 to 4294967295.
|
Defaults
size: 20 MB
Command Modes
Logging archive configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the archive-length command to specify the maximum total size of the syslog archives on a storage device. If the size is exceeded then the oldest file in the archive is deleted to make space for new logs.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to set the allotted space for syslogs to 50 MB:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# archive-size 50
clear logging internal
To clear system logging (syslog) messages from the logging buffer, use the clear logging command in EXEC mode.
clear logging internal
Defaults
All system logging messages are cleared from the logging buffer.
Command Modes
EXEC
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the clear logging command to empty the contents of the logging buffer. When the logging buffer becomes full, new logged messages overwrite old messages.
Use the internal keyword to stop internal syslog message floods triggered by debugging messages maintained by the syslog process.
Use the logging buffered command to specify the logging buffer as a destination for syslog messages, set the size of the logging buffer, and limit syslog messages sent to the logging buffer based on severity.
Use the show logging command to display syslog messages stored in the logging buffer.
Task ID
Task ID
|
Operations
|
logging
|
execute
|
Examples
The following example shows how to clear the logging buffer:
RP/0/RP0/CPU0:router# clear logging
Clear logging buffer [confirm] [y/n] :y
Related Commands
Command
|
Description
|
logging buffered
|
Specifies the logging buffer as a destination for syslog messages, sets the size of the logging buffer, and limits syslog messages sent to the logging buffer based on severity.
|
show logging
|
Displays syslog messages stored in the logging buffer.
|
device
To specify the device to be used for logging syslogs, use the device command in logging archive configuration mode. To return to the default, use the no form of this command.
device {disk0 | disk1 | harddisk}
no device
Syntax Description
disk0
|
Uses disk0 as the archive device.
|
disk1
|
Uses disk1 as the archive device.
|
harddisk
|
Uses the harddisk as the archive device.
|
Defaults
No default behavior or values
Command Modes
Logging archive configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the device command to specify where syslogs are logged. The logs are created under the directory <device>/var/log. If the device is not configured, then all other logging archive configurations are rejected. Similarly, the configured device cannot be removed until the other logging archive configurations are removed.
We recommend that syslogs be archived to the harddisk because it has more capacity.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to specify disk1 as the device for logging syslog messages:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# device disk1
file-size
To specify the maximum file size for a log file in the archive, use the file-size command in logging archive configuration mode. To return to the default, use the no form of this command.
file-size size
no file-size
Syntax Description
size
|
Maximum file size (in MB) for a log file in the logging archive. The range is from 0 to 4294967295.
|
Defaults
size: 1 MB
Command Modes
Logging archive configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the file-size command to specify the maximum file size that a single log file in the archive can grow to. Once this limit is reached, a new file is automatically created with an increasing serial number.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to set the maximum log file size to 10 MB:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# file-size 10
frequency (logging)
To specify the collection period for logs, use the frequency command in logging archive configuration mode. To return to the default, use the no form of this command.
frequency {daily | weekly}
no frequency
Syntax Description
daily
|
Logs are collected daily.
|
weekly
|
Logs are collected weekly.
|
Defaults
Logs are collected daily.
Command Modes
Logging archive configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the frequency command to specify if logs are collected daily or weekly.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to specify that logs are collected weekly instead of daily:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# frequency weekly
logging
To specify a system logging (syslog) server host as the recipient of syslog messages, use the logging command in global configuration mode. To remove the logging command from the configuration file and delete a syslog server from the list of syslog server hosts, use the no form of this command.
logging {ip-address | hostname}
no logging {ip-address | hostname}
Syntax Description
ip-address | hostname
|
IP address or hostname of the host to be used as a syslog server.
|
Defaults
No syslog server hosts are configured as recipients of syslog messages.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the logging command to identify a syslog server host to receive messages. By issuing this command more than once, you build a list of syslog servers that receive messages.
When syslog messages are sent to a syslog server, the Cisco IOS XR software includes a numerical message identifier in syslog messages. The message identifier is cumulative and sequential. The numerical identifier included in syslog messages sent to syslog servers provides a means to determine if any messages have been lost.
Use the logging source-interface command to enable logging to destinations other than the console terminal.
Use the logging trap command to limit the syslog messages sent to syslog servers based on severity.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to log messages to a host named host1:
RP/0/RP0/CPU0:router(config)# logging host1
Related Commands
Command
|
Description
|
logging disable
|
Disables logging of syslog messages.
|
logging trap
|
Limits the syslog messages sent to syslog servers based on severity.
|
logging archive
To configure attributes for archiving syslogs, use the logging archive command in global configuration mode. To exit the logging archive submode, use the no form of this command.
logging archive
no logging archive
Syntax Description
This command has no arguments or keywords.
Defaults
No default behavior or values
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the logging archive command to configure attributes for archiving syslogs. This command enters logging archive configuration mode and allows you to configure the following commands in Table 1:
Note
The configuration attributes must be explicitly configured in order to use the logging archive feature.
Table 1 Configuring Command Attributes For Archiving Syslogs
Command
|
Range
|
Recommended Setting
|
archive-length
|
<0-4294967295> Number of weeks
|
4 weeks
|
archive-size
|
<0-4294967295> Size in MB
|
20 MB
|
device
|
<disk0 | disk1 | harddisk> Use configured devices as the archive device.
|
harddisk
|
file size
|
<0-4294967295> Size in MB
|
1 MB
|
frequency
|
<daily | weekly>
|
daily
|
severity
|
<alerts | critical | debugging | emergencies | errors | informational | notifications | warnings>
|
informational
|
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to enter logging archive configuration mode and change the device to be used for logging syslogs to disk1:
RP/0/RP0/CPU0:router(config)# logging archive
RP/0/RP0/CPU0:router(config-logging-arch)# device disk1
logging buffered
To specify the logging buffer as a destination for system logging (syslog) messages, use the logging buffered command in global configuration mode. To remove the logging buffered command from the configuration file and cancel the use of the buffer, use the no form of this command.
logging buffered {size | severity}
no logging buffered [size | severity]
Syntax Description
size
|
Size of the buffer from 4096 to 2147483647 bytes. The default is 4096 bytes.
|
severity
|
Severity level of messages that display on the console. Possible severity levels and their respective system conditions are listed under Table 2 in the "Usage Guidelines" section. The default is debugging.
|
Defaults
size: 4096 bytes
severity: debugging
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the logging buffered command to copy messages to the logging buffer. The logging buffer is circular, so newer messages overwrite older messages after the buffer is filled.
The value specified for the severity argument causes messages at that level and at numerically lower levels to be displayed on the console terminal. See Table 2 for a list of the possible severity level keywords for the severity argument.
Use the logging source-interface command to enable logging to destinations other than the console terminal.
Table 2 describes the acceptable severity levels for the severity argument.
Table 2 Severity Levels for Messages
Level Keywords
|
Level
|
Description
|
Syslog Definition
|
emergencies
|
0
|
Unusable system
|
LOG_EMERG
|
alerts
|
1
|
Need for immediate action
|
LOG_ALERT
|
critical
|
2
|
Critical condition
|
LOG_CRIT
|
errors
|
3
|
Error condition
|
LOG_ERR
|
warnings
|
4
|
Warning condition
|
LOG_WARNING
|
notifications
|
5
|
Normal but significant condition
|
LOG_NOTICE
|
informational
|
6
|
Informational message only
|
LOG_INFO
|
debugging
|
7
|
Debugging message
|
LOG_DEBUG
|
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to set the severity level of syslog messages logged to the buffer to notifications:
RP/0/RP0/CPU0:router(config)# logging buffered notifications
Related Commands
logging console
To enable logging of system logging (syslog) messages logged to the console by severity level, use the logging console command in global configuration mode. To return console logging to the default setting, use the no form of this command.
logging console {severity | disable}
no logging console
Syntax Description
severity
|
Severity level of messages logged to the console, including events of a higher severity level (numerically lower). The default is informational. Settings for the severity levels and their respective system conditions are listed in Table 2 under the "Usage Guidelines" section for the logging buffered command.
|
disable
|
Removes the logging console command from the configuration file and disables logging to the console terminal.
|
Defaults
By default, logging to the console is enabled.
severity: informational
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
Added the disable keyword.
The command no logging console was changed to reset console logging to the default setting.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the logging console command to prevent debugging messages from flooding your screen.
The value specified for the severity argument causes messages at that level and at numerically lower levels (higher severity levels) to be displayed on the console terminal.
Use the logging console disable command to disable console logging completely.
Use the no logging console command to return the configuration to the default setting.
Use the show logging command to display syslog messages stored in the logging buffer.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to change the level of messages displayed on the console terminal to alerts (1), which means that alerts (1) and emergencies (0) are displayed:
RP/0/RP0/CPU0:router(config)# logging console alerts
The following example shows how to disable console logging:
RP/0/RP0/CPU0:router(config)# logging console disable
The following example shows how to return console logging to the default setting (the console is enabled, severity: informational):
RP/0/RP0/CPU0:router(config)# no logging console
Related Commands
Command
|
Description
|
show logging
|
Displays syslog messages stored in the logging buffer.
|
logging disable
To disable logging of system logging (syslog) messages, use the logging disable command in global configuration mode. To return logging to the default setting, use the no form of this command.
logging disable
no logging disable
Syntax Description
This command has no arguments or keywords.
Defaults
By default, logging is enabled.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 3.3.0
|
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.5.2
|
The no form was introduced to replace the logging on command.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Use the logging disable command to disable logging completely.
Use the no logging disable command to return the configuration to the default setting.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to disable syslog messages:
RP/0/RP0/CPU0:router(config)# logging disable
logging events link-status
To enable the logging of link-status system logging (syslog) messages for logical and physical links, use the logging events link-status command in global configuration mode. To disable the logging of link status messages, use the no form of this command.
logging events link-status {disable | software-interfaces}
no logging events link-status [disable | software-interfaces]
Syntax Description
disable
|
Disables the logging of link-status messages for all interfaces, including physical links.
|
software-interfaces
|
Enables the logging of link-status messages for logical links as well as physical links.
|
Defaults
The logging of link-status messages is enabled for physical links.
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
The logical and physical keywords were replaced by the software-interfaces and disable keywords.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When the logging of link-status messages is enabled, the router can generate a high volume of link-status up and down system logging messages.
Use the no logging events link-status command to enable the logging of link-status messages for physical links only, which is the default behavior.
Note
Enabling the logging events link-status (interface) command on a specific interface overrides the global configuration set using the logging events link-status command described in this section.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to disable the logging of physical and logical link-status messages:
RP/0/RP0/CPU0:router(config)# logging events link-status disable
Related Commands
Command
|
Description
|
logging events link-status (interface)
|
Enables the logging of link-status system logging (syslog) messages on a specific interface for virtual interfaces and subinterfaces.
|
logging events link-status (interface)
To enable the logging of link-status system logging (syslog) messages on a specific interface for virtual interfaces and subinterfaces, use the logging events link-status command in the appropriate interface or subinterface mode. To disable the logging of link status messages, use the no form of this command.
logging events link-status
no logging events link-status
Syntax Description
This command has no arguments or keywords.
Defaults
The logging of link-status messages is disabled for virtual interfaces and subinterfaces.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
Release 3.2
|
This command was introduced on the Cisco CRS-1 and the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
When the logging of link-status messages is enabled, the router can generate a high volume of link-status up and down system logging messages. The logging events link-status command enables messages for virtual interfaces and subinterfaces only.
The logging events link-status command allows you to enable and disable logging on a specific interface for bundles, tunnels, and VLANs.
Use the no logging events link-status command to disable the logging of link-status messages.
Note
Enabling the logging events link-status command on a specific interface overrides the global configuration set using the logging events link-status command in global configuration mode.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows the results of turning on logging for a bundle interface:
RP/0/0/CPU0:router(config)# int bundle-pos 1
RP/0/0/CPU0:router(config-if)# logging events link-status
RP/0/0/CPU0:router(config-if)# no shutdown
RP/0/0/CPU0:router(config-if)# commit
LC/0/4/CPU0:Jun 29 12:51:26.887 : ifmgr[142]:
%PKT_INFRA-LINK-3-UPDOWN : Interface POS0/4/0/0, changed state to Up
LC/0/4/CPU0:Jun 29 12:51:26.897 : ifmgr[142]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
POS0/4/0/0, changed state to Up
RP/0/0/CPU0:router(config-if)#
RP/0/0/CPU0:router(config-if)# shutdown
RP/0/0/CPU0:router(config-if)# commit
LC/0/4/CPU0:Jun 29 12:51:32.375 : ifmgr[142]:
%PKT_INFRA-LINK-3-UPDOWN : Interface POS0/4/0/0, changed
state to Down
LC/0/4/CPU0:Jun 29 12:51:32.376 : ifmgr[142]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
POS0/4/0/0, changed state to Down
RP/0/0/CPU0:router(config-if)#
The following example shows a sequence of commands for a tunnel interface with and without logging turned on:
RP/0/0/CPU0:router(config)# int tunnel-te 1
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:router(config-if)# shutdown
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:router(config-if)# no shutdown
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:router(config-if)# logging events link-status
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:router(config-if)# shutdown
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:Jun 29 14:05:57.732 : ifmgr[176]:
%PKT_INFRA-LINK-3-UPDOWN : Interface tunnel-te1, changed
state to Administratively Down
RP/0/0/CPU0:Jun 29 14:05:57.733 : ifmgr[176]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
tunnel-te1, changed state to Administratively Down
RP/0/0/CPU0:router(config-if)# no shutdown
RP/0/0/CPU0:router(config-if)# commit
RP/0/0/CPU0:Jun 29 14:06:02.104 : ifmgr[176]:
%PKT_INFRA-LINK-3-UPDOWN : Interface tunnel-te1, changed
state to Down
RP/0/0/CPU0:Jun 29 14:06:02.109 : ifmgr[176]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
tunnel-te1, changed state to Down
The following example shows the same process for a subinterface:
RP/0/0/CPU0:router(config)# int gigabitEthernet 0/5/0/0.1
RP/0/0/CPU0:router(config-subif)# commit
RP/0/0/CPU0:router(config-subif)# shutdown
RP/0/0/CPU0:router(config-subif)# commit
RP/0/0/CPU0:router(config-subif)# no shutdown
RP/0/0/CPU0:router(config-subif)# commit
RP/0/0/CPU0:router(config-subif)# logging events link-status
RP/0/0/CPU0:router(config-subif)# commit
RP/0/0/CPU0:router(config-subif)# shutdown
RP/0/0/CPU0:router(config-subif)# commit
LC/0/5/CPU0:Jun 29 14:06:46.710 : ifmgr[142]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
GigabitEthernet0/5/0/0.1, changed state to Administratively Down
LC/0/5/CPU0:Jun 29 14:06:46.726 : ifmgr[142]:
%PKT_INFRA-LINK-3-UPDOWN : Interface
GigabitEthernet0/5/0/0.1, changed state to Administratively Down
RP/0/0/CPU0:router(config-subif)# no shutdown
RP/0/0/CPU0:router(config-subif)# commit
LC/0/5/CPU0:Jun 29 14:06:52.229 : ifmgr[142]:
%PKT_INFRA-LINK-3-UPDOWN : Interface
GigabitEthernet0/5/0/0.1, changed state to Up
LC/0/5/CPU0:Jun 29 14:06:52.244 : ifmgr[142]:
%PKT_INFRA-LINEPROTO-6-UPDOWN : Line protocol on Interface
GigabitEthernet0/5/0/0.1, changed state to Down
RP/0/0/CPU0:router(config-subif)#
logging facility
To configure the type of syslog facility in which system logging (syslog) messages are sent to syslog servers, use the logging facility command in global configuration mode. To remove the logging facility command from the configuration file and disable the logging of messages to any facility type, use the no form of this command.
logging facility [type]
no logging facility
Syntax Description
type
|
(Optional) Syslog facility type. The default is local7. Possible values are listed under Table 3 in the "Usage Guidelines" section.
|
Defaults
type: local7
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Table 3 describes the acceptable options for the type argument.
Table 3 Facility Type Descriptions
Facility Type
|
Description
|
auth
|
Authorization system
|
cron
|
Cron/at facility
|
daemon
|
System daemon
|
kern
|
Kernel
|
local0
|
Reserved for locally defined messages
|
local1
|
Reserved for locally defined messages
|
local2
|
Reserved for locally defined messages
|
local3
|
Reserved for locally defined messages
|
local4
|
Reserved for locally defined messages
|
local5
|
Reserved for locally defined messages
|
local6
|
Reserved for locally defined messages
|
local7
|
Reserved for locally defined messages
|
lpr
|
Line printer system
|
mail
|
Mail system
|
news
|
USENET news
|
sys9
|
System use
|
sys10
|
System use
|
sys11
|
System use
|
sys12
|
System use
|
sys13
|
System use
|
sys14
|
System use
|
syslog
|
System log
|
user
|
User process
|
uucp
|
UNIX-to-UNIX copy system
|
Use the logging command to specify a syslog server host as a destination for syslog messages.
Task ID
Task ID
|
Operations
|
logging
|
read, write
|
Examples
The following example shows how to configure the syslog facility to the kern facility type:
RP/0/RP0/CPU0:router(config)# logging facility kern
Related Commands
Command
|
Description
|
logging
|
Specifies a syslog server host as a destination for syslog messages.
|
logging history
To change the severity level of system logging (syslog) messages sent to the history table on the router and a Simple Network Management Protocol (SNMP) network management station (NMS), use the logging history command in global configuration mode. To remove the logging history command from the configuration and return the logging of messages to the default level, use the no form of this command.
logging history severity
no logging history
Syntax Description
severity
|
Severity level of messages sent to the history table on the router and an SNMP NMS, including events of a higher severity level (numerically lower). Settings for the severity levels and their respective system conditions are listed in Table 2 under the "Usage Guidelines" section for the logging buffered command.
|
Defaults
severity: warnings
Command Modes
Global configuration
Command History
Release
|
Modification
|
Release 2.0
|
This command was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This command was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
No modification.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Usage Guidelines
To use this command, you must be in a user group associated with a task group that includes the proper task IDs. For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of the Cisco IOS XR System Security Configuration Guide.
Logging of messages to an SNMP NMS is enabled by the snmp-server enable traps command. Because SNMP traps are inherently unreliable and much too important to lose, at least one syslog message, the most recent message, is stored in a history table on the router.
Use the show logging history command to display the history table, which contains table size, message status, and message text data.
Use the logging history size command to change the number of messages stored in the history table.
The value specified for the severity argument causes messages at that severity level and at numerically lower levels to be stored in the history table of the router and sent to the SNMP NMS. Severity levels are numbered 0 to 7, with 1 being the most important message and 7 being the least important message (that is, the lower the number, the more critical the message). For example, specifying the level critical with the critical keyword causes messages at the severity level of critical (2), alerts (1), and emergencies (0) to be stored in the history table and sent to the SNMP NMS.
The no logging history command resets the history level to the default.
Task ID