
IPriori's logging system records, collects, filters, and displays logging messages generated from Avici router subsystems and provides efficient system monitoring. Efficient logging systems give troubleshooters the necessary information to correct system errors when they occur. For example, subsystem logging messages provide:
- Reports to system administration of unexpected events for analysis.
- Program tracing and debugging aids in order to search and resolve problems.
- Appropriate indications to operations network management centers when critical errors generate.
For specific information regarding subsystem logging messages, refer to "IPriori Messages and Glossary" manual.
Introduction
IPriori supports two approaches to configure logging files, standard and enhanced. Standard logfile configuration creates one log file that contains all of the log messages generated from the operating subsystems on the router. Enhanced logfile configuration creates one log file containing multiple logfiles.
Enhanced configuration allows for simultaneously monitoring of multiple subsystem and events. In addition, users can define the name, size, and number of historical logging files for each individual logfile.
Common to both configuration types, log filtering options offer the ability to filter error messages by subsystem and/or severity. Logging files may be searched and sorted by any allowed filtering configuration, with the output sent either to the console, telnet session, or to a saved file. Subsystems, message severity levels, and message format are also common to both configuration choices.
NOTE When the term console is used, it is a reference to the console display directly attached to the local server where the logging messages are stored.
Each method has its own particular advantages and allows users to determine which method best suits their needs.
Logging Subsystems
All logging messages originate on subsystems and each subsystem operates on a specific platform: server, module, or bay controller. When configuring standard logging files, users must be in correct configuration mode (server, module, or bay controller) for the subsystems being monitored. Subsystems may be hardware or software related. Table 14-1 displays the platforms where subsystem messages originate.
Message Severity Levels
IPriori provides eight levels of severity used for logging messages as shown in Table 14-2:
When configuring message severity level, only messages with a severity level at or above the configured setting are sent to the server (see Figure 14-1).
NOTE Critical messages are immediately sent to the server.
Figure 14-1. Severity Set for Warning Level
![]()
Message Formats
There are five Avici router logging message fields. Figure 14-2 displays a sample logging message format. All logging messages follow this format.
Figure 14-2. Logging Message Format
![]()
Table 14-3 describes the five logging fields of each logging message.
Table 14-3. Logging Message Fields Field Description Platform
The specific platform that generates the message. There are three Avici router platforms: server, module, and bay controller.
Day, Date, and Time
A stamp indicating the system date and time the logging event occurred.
Severity Level
An indication of the severity of the message. See Table 14-2. There are eight message severity levels.
System
The subsystem that generated the message, for example IS-IS, BGP or SNMP. See Table 14-1
Message
The text of the message.
Configuring Standard Log Files
Standard logfile configuration creates one log file that contains all of the log messages generated from the operating subsystems on the router. Standard filtering options allow the filtering of messages by severity level at the time of message generation. The only messages forwarded to the server are those with a severity level at or above the configured setting. To setup input filtering on a platform, you must first enter the command mode for that platform. Entry is provided by three commands and these commands are server, module, and bay.
The logging-filter command sets the minimum severity level for messages logged to the logging system. When a platform generates a logging message, IPriori checks the severity of the message against the setting of the logging filter for that platform. If this check fails, indicating that the message severity is below the severity set in the filter command, the message is discarded; if the check passes, the message information is sent to the server.
NOTE Critical level messages can not be filtered. They are always sent to the server without any delay.
With these two considerations in mind, caution should be used when changing input filtering defaults. Users must be in the associated platform mode to configure input filtering. Platform mode commands are: server, module, and bay. For each platform, use the logging-filter command to change the minimum severity level of messages logged to the server.
For example, the logging-filter bgp major command sets input filtering to discard all BGP system messages at severity levels minor and below, with the end result that only messages with severity levels major and critical will be logged to the server:
Platform type determines the file names. Table 14-4 describes file names.
NOTE When a system first boots and the server ID has not been set using the server-id command, the server ID defaults to 0. If you see that the server files are named SRV0000.yyy, you will need to give the server a unique ID using the server-id command.
Log Files/Message Storage
The number of stored log files is 5 (default) or the maximum number of log files (1 to 199) set using the logging-max-history command. File names indicate the name of the log file and file number (from 0 up to one less than the configured maximum number of log files allowed). The default is 0-4.
Log files are saved on a cascading basis. The save file will roll-over to the next file in the file name extension sequence based upon the following criteria:
- At reset, the server places the log information in the file extension number "0." When log file "0" reaches its maximum capacity, the saved file increments the "0" logfile to "1." The cascading continues, with the log information in "0" being moved to "1" and the information in "1" being moved to "2," etc. The cascading continues until all log files are full. When maximum save value is reached, the information in "5" is deleted (see Figure 14-3). Logfile "0" always contains the most current logging information. The logging-max-history command is used to set the maximum saved files allowed.
- Maximum file size of 500K is reached. Log-file cascading continues when the maximum save file value is reached. See Figure 14-3 for an example of a log file rotation based upon a maximum save file value of 5.
Figure 14-3. Log File Cascading
![]()
PROCEDURE: The following example configures a log file named SRV10 to monitor major messages on the server and major error messages on all of the modules:
Step 1 Use the configure terminal command to enter configuration mode:
Step 2 Use the server command to enter config-server configuration mode.
Step 3 Use the logging-filter command with the subsystem type and message severity level to filter warning messages and above.
Step 4 Use the logging-max-history command to set the number of history files to 8.
Step 5 Use the end command to return to privileged mode.
Step 6 Use the show logging command to display configuration of SRV10.
router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#server 1
router(config-server)#logging-filter bgp warning
router(config-server)#logging-max-history 8
router(config-server)#end
router#show logging server 1
Logging file: <SRV10>
User Configuration Values:
Max History: 5
Max FileSize: 500
Current Values:
Total History Files: 8
Active Filters count <Maximum 10> : 2
Attached Filters:
#1 - [platform <server> 1] [system <bgp>] [level <warning>]
router#
Configuring Enhanced Logging Files
Enhanced logfile configuration creates one log file containing multiple logfiles. The first step in configuring log files is to name the log file. Use the logging-file filename command to configure the name of a logging file.
The next step is to configure the named log file by using the include command. The include command specifies which platforms, subsystems messages, and severity level of messages to include in the named log file. One log file may contain messages for more than one platform, with each platform filtering its own severity level.
Other optional commands available when configuring log files are the max-files history-file-ct and the size max-file-size commands. The max-files history-file-ct commands set the number of history files to retain for each log files. For storing multiple logging files, the default is 5 and the maximum number of history files is 15. The size max-file-size configures the size of the named log file. The default is 128K and the maximum size is 64MB.
PROCEDURE: The following example configures a log file named Log1 to monitor major messages on the server and major error messages on all of the modules: Use the configure terminal command to enter configuration mode:
Step 1 Use the logging-file filename command to name the log file Log1.
Step 2 Use the include command to configure major BGP messages on server 1.
Step 3 Use the include command to configure major SNMP trap messages on all modules.
Step 4 Use the max-files history-file-ct command to set the number of the log file history.
Step 5 Use the size max-file-size command to set the size of the log file.
Step 6 Use the show command to display configuration of Log1.
Step 7 Use the end command to return to privileged mode.
router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#logging-file Log1
router(config-logfile)#include platform server 1 bgp-events major
router(config-logfile)#include module all system snmp-traps level major
router(config-logfile)#max-files 8
router(config-logile)#size 128
router(config-logfile)#show
Logging file: <Log1>
User Configuration Values:
Max History: 8
Max FileSize: 128
Current Values:
Total History Files: 0
Active Filters count <Maximum 10> : 2
Attached Filters:
#1 - [platform <server 1]
#2 - [platform <module ALL]: [level <major>]
router(config-logfile)#end
router#
Configured Log Files/Message Storage
The number of stored log files is 5 (default) or the maximum number of log files (1 to 199) set using the max-files history-file-ct command. File names indicate the name of the log file and file number (from 0 up to one less than the configured maximum number of log files allowed). The default is 0-4).
Optionally, log file size may be set to a specified value range from 1 to 65535. The default for a configured log file size is 128K.
Log files are saved on a rotation basis. The save file will roll-over to the next file in the file name extension sequence based upon the following criteria:
- At reset, the server places the log information in the file extension number "0" and increments the "0" logfile to "1." The cascading continues, with the log information in "0" being moved to "1" and the information in "1" being moved to "2." The cascading continues until all log files are full. When maximum save value is reached, the information in "5" is deleted (see Figure 14-4). The logging-max-history command is used to set the maximum saved files allowed.
- Maximum file size of 500K is reached. Log-file cascading continues when the maximum save file value is reached. See Figure 14-4 for an example of a log file rotation based upon a maximum save file value of 5.
Figure 14-4. Log File Cascading
![]()
Display Options
Display filtering redirects log messages to the console, telnet, or SSH session or to a user created file, depending upon configured filtering criteria. Display filtering options are the same whether one or multiple log files are configured.
There are three types of display filtering:
- Logging to console or the current telnet session as the messages arrive.
- Logging to console or the current telnet session from the log files.
- Logging the contents of log files to a new file.
Logging to Console as Messages Arrive
The logging monitor command is used to display log messages to the console, a current telnet, or SSH session as they arrive and are processed at the server. These commands provide the quickest method of viewing events as they happen.
Options exist to select the platforms, subsystems, and levels to display to the console or monitor.
NOTE The displayed messages may not be in time order due to the delays associated with queueing and sending messages from the router modules and bay controllers, but all messages are date/time stamped.
Logging to Console from the Log Files
The show logging command displays log messages to the console, current telnet, or SSH session from all log files. This method offers the user the ability to coordinate among all the various platforms as well as view system-wide events in time order. The drawback to this command is that messages displayed are not in real-time (as messages arrive to the server.) The command is only capable of accessing messages up to the last message stored in the log files.
Options exist to select: platforms, subsystems, levels, and starting and ending time stamps.
Logging Contents of Log Files to New File
The copy logging command concatenates log messages from all log files to a user-created file. This command provides for the creation of a new file that contains a sub-set of the log messages from all log files, based upon the options selected. As with the show logging command, messages displayed are not in real-time.
Options exist to select: platforms, subsystems, levels, and starting and ending time stamps.
Logging Configuration Tasks
Setup is performed from the CLI prompt. You must be in the appropriate command mode for the task to configure IPriori for logging.
There are four logging steps to consider when configuring IPriori:
- Setup input filtering
- Configure the number of log files for each platform
- Configure remote host display of messages using syslogd
- Configure display filtering
For most users, the default settings for input filtering, display filtering and the number of log files per platform will be satisfactory. Remote host message display requires connection configuration for each host. The following sections address configuration considerations for each of the four areas.
Configuring for Remote Host Message Display
The logging command allows you to configure a remote host for logging message display (see Figure 14-5).
Figure 14-5. Syslog Configuration
![]()
You must be in the privileged command line mode to use the logging command. The command line requires the following:
- The syslog server IP address.
- The syslogd facility (IPriori supports local0 through local7, default of local7) used on the syslog server.
- Syslog server must be properly setup to accept remote messages.
Example: For example, the following command line enables a remote session on the host IP address 89.2.2.1 using facility local7 (default) for all platforms, to show all subsystem messages, at all severity levels:
router(config)#logging 89.2.2.1
Configuring for Display Filtering
Display filtering allows you to filter messages:
- As messages arrive at the server from the originating platform
- From the log file
Any messages that pass input filtering are written to the log files regardless of the display filtering setting. Display filtering further reduces the messages sent to the console or remote host.
NOTE Display filtering is a second level of filtering of logging messages. Even if you display all messages, you will not see messages that were filtered before they were stored to the disk.
Current Console or Telnet Session Monitor
Use the logging monitor command when setting up display filtering for the current console, telnet, or SSH session monitor. You must be in privileged mode when using the logging monitor command.
Specify a specific platform(s) or the command applies to all platforms. If you do not specify at least one subsystem, the command is applied to all subsystems. If you do not specify a minimum severity level, all levels are displayed for the subsystem specified.
For example, the logging monitor level minor command line will display log messages to the console from all platforms and for all subsystem messages from severity level minor and above:
Current Log File to the Console
Use the show logging command when setting up display filtering for log file messages to the console. You must be in privileged mode when using the show logging command.
You may specify a starting and ending date or default to all messages in the log file. You must specify:
- A specific platform(s) type.
- The command applies to all platforms of that type.
If you do not specify at least one subsystem, the command is applied to all subsystems. If you do not specify a minimum severity level, all levels are displayed for the subsystem.
Example: For example, the following command line searches the current log file and displays all messages between January 4th and January 12th for all platforms, for all subsystem messages at all severity levels:
router#show logging from January 04 1999 to January 12 1999
Entering User Comments into the Log File
IPriori supports the manual entering of comment lines directly into the log file. The logmsg command provides for the entering of any number of ASCI characters, including spaces and punctuation, terminated by pressing the ENTER key.
Example 1: The following command line uses the logmsg command to enter a comment line into the log file that the technician John Doe is now on duty:
router#logmsg Beginning of John Doe shift
router#show log
.
.
.
server0005:TUE MAR 18 20:02:18 2003: INFORMATION:user-commands:Session tConsole2:tsr1: logmsg Beginning of John Doe shift
server0005:TUE MAR 18 20:02:25 2003: INFORMATION:user-commands:Session tConsole2:tsr1: show log
Copyright © 2005
Avici Systems Inc.
Avici® and TSR®
is a registered trademark of Avici Systems Inc.
IPriori, Composite Links, SSR, QSR, and NSR® are
trademarks of Avici Systems Inc.
Source
File Name: Logging.fm
HTML File Name: Logging.html
Last Updated: 02/25/05 at 15:19:46