|
|
Managing LightStream 2020 Traps
This chapter allows you to customize the way your LightStream 2020 multiservice ATM switch (LS2020 switch) displays and logs traps. The procedures in this chapter provide significant flexibility in trap management. For example, you can
Figure 2-1, Figure 2-2, and Figure 2-3 show how traps flow through an LS2020 node. These illustrations also show the CLI commands that you can use to affect trap flow. Each CLI command is explained in greater detail in this chapter.
Figure 2-1 : Passing Traps Through LightStream 2020 System
Figure 2-2 : Passing Traps Through LightStream 2020 System (continued)
Figure 2-3 : Passing Traps Through LightStream 2020 System (concluded)
You can determine which traps are to be displayed by setting the trap reporting threshold (also called the trap level). There are four settings for the trap reporting threshold: operational (oper), informational (info), trace, and debug.
Table 2-1 shows the effect of setting the trap reporting threshold at different levels. As indicated in the table, if you enable a certain trap level, traps at and above that priority level are reported. For example, if you set the trap reporting threshold to trace, trace traps and all higher priority traps (informational and operational) will be reported, while debug traps will not be reported.
Table 2-1 : Trap Reporting Thresholds
|
Trap Reporting Threshold |
Trap Type | ||||
|---|---|---|---|---|---|
| OPER | INFO | TRACE | DEBUG | SNMP | |
| Operational
Informational Trace Debug |
x | x | |||
| x | x | x | |||
| x | x | x | x | ||
| x | x | x | x | x | |
Figure 2-4 identifies the paths in an LS2020 system where you can set the trap reporting threshold. By setting the trap reporting threshold at a particular trap filter, you can prevent traps from being passed to the next process. As shown in Figure 2-4, you can establish filter traps for the following LS2020 entities:
In effect, setting a trap reporting threshold creates a trap filter that either passes the trap to the next process in the system or drops the trap altogether. At each trap filter, you can set the trap reporting threshold (the trap level) to the operational, informational, trace, or debug state.
Figure 2-4 : Setting Trap Reporting Thresholds in LightStream 2020 System
The following sections describe how you can change the trap reporting threshold for processes, the LS2020 chassis, a CLI session, or the local console to suit your particular operating requirements. Note, however, that the default settings for these LS2020 entities are appropriate for most networks.
Trap Reporting Threshold for Processes
Setting the trap reporting threshold for a particular process determines which traps generated by that process will be passed to the MMA. Traps that are passed from the processes into the MMA are, by default, logged in the trap log. The default trap reporting threshold for all processes is informational. This level is appropriate for most applications. (Note that the console port transmits all traps that are recorded in the trap log.)
Traps of all priority levels are generated by the software process. However, only SNMP, operational, and informational traps are passed to the MMA. Figure 2-5 shows trap processing when a process filter is set to the informational (default) state.
Figure 2-5 : Trap Generation by Software Process Under Default Condition
Setting Trap Reporting Threshold for Processes
To set the trap reporting threshold for processes, perform the following steps:
Figure 2-6 : Typical Walksnmp Display
Select the process(es) you want from the list in the display.
As a consequence of this procedure, the trap reporting threshold for the specified process filter is changed to the specified level. Subsequently, all traps at that level (and higher) are passed from the process to the MMA.
Trap Reporting Threshold for Chassis
The trap reporting threshold for the chassis determines which traps are passed from the MMA to the CLI process and the NMS. The default trap reporting threshold for the chassis is operational. This setting is appropriate for most networks.
Figure 2-7 shows trap processing when the chassis filter is set to the operational default and the process filter is set to the informational default. Although SNMP, operational, and informational traps are received by the MMA, only SNMP and operational traps are passed to the CLI process and the NMS because the chassis filter is set to operational.
Figure 2-7 : Trap Processing During Chassis Filter Operational Default State
Setting Trap Reporting Threshold for Chassis
To temporarily change the configured setting for the chassis trap reporting threshold, perform the following steps:
As a consequence of this procedure, the trap reporting threshold for the chassis filter is changed to the specified level. Subsequently, all traps at that level (and higher) are sent to the CLI and the NMS.
Trap Reporting Threshold for CLI Session
The trap reporting threshold setting for the CLI session determines which traps are displayed by the terminal running the CLI session. The default trap reporting threshold for the CLI is debug. This level is appropriate for most applications.
Figure 2-8 shows trap processing when the CLI session filter is set to the debug default and the process and chassis filters are likewise set to their default states.
All traps reported to the MMA are displayed in the CLI. Setting the default to debug ensures that any trap (regardless of its level) is displayed in the CLI. This is important because you can override the filter setting for an individual trap (by turning it on) using the procedure later in this chapter entitled "Managing Individual Traps."
Figure 2-8 : Trap Processing with CLI Session Filter in Debug State
Setting Trap Reporting Threshold for CLI Session
To set the trap reporting threshold for a CLI session, perform the following steps:
After you perform this procedure, the trap reporting threshold for the CLI session filter is changed to the specified level. Subsequently, all traps at that level (and higher) are displayed by the CLI.
Trap Reporting Threshold for Local Console
The trap reporting threshold setting for the console filter in each LS2020 switch determines which traps are displayed on the local console (if the LS2020 node has a local console). By default, traps are displayed automatically whenever a console is started up. The default trap reporting threshold for the console filter is informational. This level is appropriate for most applications. (Note that the console port transmits all traps that are recorded in the trap log; disabling individual traps does not prevent them from being displayed on the console.)
Figure 2-9 shows trap processing when the console filter is set to the informational default and the process filter is likewise set to its informational default state. Under these conditions, all SNMP, operational, and informational traps passed to the MMA are displayed on the local console.
Figure 2-9 : Displaying Traps Passed to MMA on Local Console
Setting Trap Reporting Threshold for Local Console
To set the trap reporting threshold for the local console, perform the following steps:
After performing this procedure, the trap reporting threshold for the console is changed to the specified level. Subsequently, all traps at that level (and higher) are displayed by the console.
In an LS2020 network, you can view traps in three places:
On the LS2020 console or in the CLI, traps are displayed in the format described in the section "Types of Traps" in the chapter entitled "About LightStream 2020 Traps." Trap messages may be interleaved with other information displayed by the CLI, depending on how your system is set up. Figure 2-10 shows a typical CLI display that incorporates a trap message.
If you use an NMS, the message format may vary from the format described earlier, but the content will be identical.
Figure 2-10 : Typical CLI Traps Display
You can log the traps that occur on each LS2020 switch. The traps are stored on the NP of the switch in a file called mma.traplog in the /usr/tmp/mma directory. This circular file can store approximately 6000 traps before the oldest trap is overwritten by the latest trap. Which traps are logged is determined by the trap reporting thresholds set for each process. This section tells you how to enable or disable the trap log.
Enabling or Disabling Trap Log
You can enable or disable the trap log for a particular LS2020 switch. Traps cannot be logged unless the trap log is enabled.
The default setting for the trap log is enabled (on). This setting is appropriate for most networks.
Ordinarily, whether the trap log is enabled or disabled is specified during network configuration. However, if you want to temporarily change the configured setting, you can use the procedure below. (Note, however, that such a change is lost if the system is rebooted.)
If you want to make a permanent change to the trap log status attribute, use the LS-Configurator to edit the configuration and update the appropriate node, as described in the LightStream 2020 Configuration Guide.
If a node's trap log file is moved or deleted, trap logging is effectively disabled. If the file /usr/tmp/mma/mma.traplog is not present, you can use this procedure to re-enable trap logging.
Procedure for Enabling or Disabling Trap Log
To enable or disable the trap log for a particular LS2020 switch, perform the following steps:
After you perform this procedure, the trap log for the specified chassis is enabled or disabled.
Any traps passed from the software processes to the MMA are recorded in a circular file named /usr/tmp/mma/mma.traplog. This section tells you how to:
Viewing Trap Log from LynxOS Shell
If you are working in the LynxOS shell, you can view the trap log file by entering the following at the prompt:
where:
For more information on the cbufpr command, refer to the LightStream 2020 NP O/S Reference Manual.
If you are working in the CLI, you can view the trap log by entering the following at the CLI prompt:
You can use the optional -tail argument with the show file command to display the last 20 (or so) lines of the traplog file. For more information on the show file command, refer to the LightStream 2020 CLI Reference Manual.
If you are working in the CLI, you can use the following procedure to move the trap log to another NP for viewing on that system. If you are working in the LynxOS shell, note that you can just use the ftp command.
To move the trap log file to another NP for viewing, perform the following steps:
Figure 2-11 shows an example of a trap log. Traps without a switch name have been generated by the local node. Traps that include a switch name have been generated by another LS2020 node and reported to the local node.
Figure 2-11 : Trap Log Example
You can control the reporting of individual traps. This gives you greater flexibility in choosing which traps are reported. Using the capabilities provided in this regard, you can
These capabilities are especially useful for advanced debugging and troubleshooting by experienced users. However, the commands associated with individual traps must be executed from the CLI in protected mode.
Turning Trap On or Off in Specific Process
This section tells you how to turn a particular trap on or off in a specific process. Turning a trap on in a particular process allows it to be passed to the MMA, even if it has a severity level below the trap reporting threshold set for the process. This allows you to report a particular trap without reporting all traps at that level. This procedure is especially important during troubleshooting and debugging.
Figure 2-12 shows the effect of turning a trap on when the process filter is set to the informational default.
Figure 2-12 : Trap Processing With Process Filter Set to Default State
In some cases you may have multiple instances of the same process running. Therefore, you can also turn a trap on globally, affecting the trap in each instance of the process.
The default for all traps in all processes is off. When a trap is set to off, the trap is passed to the MMA only if its severity level is equal to or higher than the trap reporting threshold setting of the process filter.
Procedure for Turning Trap On or Off in Specific Process
To turn a trap on or off in a specific process, perform the following steps:
At the conclusion of this procedure, the trap(s) that you have turned on pass to the MMA whenever that trap is generated in the selected process. Traps that are turned off pass to the MMA only if they have an equal or higher severity level than the process filter.
Enabling/Disabling Trap for All Processes
This section tells you how to enable or disable individual traps for all processes, in contrast to the previous procedure, which lets you enable or disable a trap for a particular process. When you disable a trap in an LS2020 switch, the MMA discards it rather than passing it on to the display device. You may want to disable a trap if it recurs frequently and you feel that its display is unnecessary.
Figure 2-13 shows trap processing when traps are enabled (the default case). The MMA checks to see if the trap is enabled or disabled. If the trap is enabled and its severity level is equal to or greater than the CLI session and console filters, the trap is passed to the CLI and the NMS. If the trap is disabled, it is dropped altogether.
Figure 2-13 : Enabling Traps for All Processes
Procedure for Enabling/Disabling Trap for All Processes
To enable or disable a trap for all processes, perform the following steps:
After you perform this procedure, the disabled trap for the selected node is not passed to the CLI nor is it displayed on a third-party NMS. The status display shows traps as either on, off, or disabled. If the status is either on or off, the trap is enabled. Otherwise, the trap is disabled. See the section "Turning Trap On or Off in Specific Process" earlier in this chapter for a more detailed description of trap handling in a specific process.
This section tells you how to view the status of every trap within a particular process or for an MMA. The status display shows traps as either on or off and enabled or disabled. See the section "Turning Trap On or Off in Specific Process" earlier in this chapter for a description of the on/off state. See the section "Enabling/Disabling Trap for All Processes" earlier in this chapter for a description of the enabled/disabled state.
View Status of One or More Traps for Process
To view the status of one or more traps for a process, perform the following steps:
View Status of One or More Traps for MMA
To view the status of one or more traps for an MMA, perform the following steps:
If you now enter the command show trap ndd_3 ndd_4 ndd_5 ndd_1001, the status of these traps will be displayed as shown in Figure 2-14.
Figure 2-14 : Sample Status Display for Specific Traps
If you enter the command show trap "*", the status of all traps in the MMA will be displayed as shown in Figure 2-15. Note that Figure 2-15 is a partial display; several screens of traps will be displayed when you issue this command.
Figure 2-15 : Sample Status Display for All Traps
The cli.groups file defines groups of traps. You can use this file as an argument for the commands described in the sections above entitled "View Status of One or More Traps for Process" and "View Status of One or More Traps for MMA." If you do not create and maintain this file, you must manually enter each trap number used with those commands.
Procedure for Creating cli.groups File
To create the cli.groups file, perform the following steps:
Copyright 1988-1996 © Cisco Systems Inc.
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt to display a list of the processes:
cli>
walksnmp lwmaTrapCliAlias
Name: lwmaTrapCliAlias
fields
,
and the alias names follow the
Value
fields, as shown in the sample display in Figure 2-6.
cli>
prompt:
cli>
set pid {<#>|<alias>} traplevel <value>
{<#>|<alias>}
= The process number or alias name.
<value>
= oper
info (default)
trace
debug
cli>
prompt:
show pid {<#>|<alias>} traplevel
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt:
cli>
set chassis traplevel <trap value>
<value>
= oper (default)
info
trace
debug
cli>
prompt:
cli>
show chassis agent
cli>
prompt:
cli>
show chassis general
cli>
prompt to set the trap reporting threshold for the CLI:
cli>
set cli traplevel <value>
<value>
= off --- displays no traps
oper
info
trace
debug (default)
cli>
prompt:
cli>
show cli traplevel
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt:
cli>
set chassis consoletraplevel <value>
<value>
= off --- displays no traps
oper
info (default)
trace
debug
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt:
cli>
set chassis traplog <value>
<value>
= on---enables the trap log (default)
off---disables the trap log
cli>
prompt:
cli>
show chassis agent
LSnode:2$ cbufpr [-hv] [-all] [-tail] -<number> [-f] [-stat] -<level>
/usr/tmp/mma/mma.traplog | more
[h]
= Displays a help message. Other arguments with the -h argument are ignored.
[v]
= Displays cbufpr version information. Other arguments with the -v argument are ignored (except the -h).
[all]
= Allows you to read files of all formats, including files that are not circular.
[tail]
= An optional argument that displays the last 20 lines of the file (the lines containing the most recent traps). If you do not enter this argument, the entire file is displayed.
<number>
= Specifies the number of lines to display. This switch can be used with the -tail switch to specify the number of lines displayed from the bottom of the file.
[f]
= Continues reading from the end of file rather than exiting. The switch allows you to display traps as they accumulate while you are viewing other parts of the file. Enter ^C (CTRL-C) to kill the process.
[stat]
= Reports the current position of the write pointer.
<level {snmp | oper | info | trace | debug}>
= Reports traps at and above the indicated level.
| more
= Displays one page at a time. Press the space bar to display the next page. If you do not use
| more
, the file will scroll across the screen.
cli> show file traplog
cli>
prompt:
cli>
protected
Enter password:
*cli>
prompt:
*
cli>
shell "cbufpr /usr/tmp/mma/mma.traplog/tmp/traplog"
*cli>
prompt, enter the following:
*
cli>
shell "ftp <IP address of destination workstation or host>"
ftp>
prompt:
ftp>
put /tmp/traplog [<new name>]
[<new name>]
= The file name identifying the chassis or the appropriate directory name for the file. For example, if you are moving a trap log for a switch called Light5, the new name could be mma_Light5.traplog.
ftp>
prompt:
ftp>
quit
*cli>
shell "rm /tmp/traplog"
cli>
prompt, enter:
cli>
protected
Enter password:
cli>
prompt:
*
cli>
show chassis general
*cli>
prompt:
*
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
*cli>
prompt:
*
cli>
walksnmp lwmaTrapCliAlias
*cli>
prompt, enter:
*
cli>
set trap pid{<#|alias>} {on|off} <trap#> [<group name>]
*cli>
prompt, enter:
*
cli>
set trap global {on|off} <trap#> [<group name>]
{<#>|<alias>}
= The process number or alias name.
{on|off}
Specifies whether the trap is on or off. The default is off.
<trap#>
= The trap(s) you want to turn on or off. Enter the symbolic trap name or trap number. You can set multiple trap numbers by specifying the trap numbers (ndd_3 ndd_14 lcc_5), or by using the wild card character
"
*
"
to specify all traps for a particular process. If you use
*
, you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you would type
show trap "ndd*"
.
[<group name>]
= An optional argument that defines a group of traps. For this argument to be used, the group must be defined in an ASCII file called cli.groups in the /usr/app/base/config directory. Refer to the section "Creating cli.groups File" later in this chapter for instructions on creating the cli.groups file.
cli>
prompt:
*
cli>
show trap pid {<#>|<alias>} "*"
cli>
prompt, enter
cli>
protected
Enter password:
cli>
prompt:
*
cli>
show chassis general
cli>
prompt:
*
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt, enter the following:
*
cli>
set trap {enable|disable} <trap#> [<group name>]
{enable|disable}
is an indication of whether the trap is enabled or disabled. The default is enabled.
<trap#>
identifies the trap(s) that you want to turn on or off. Enter the symbolic trap name or trap number. You can set multiple trap numbers by specifying the trap numbers (ndd_3 ndd_14 lcc_5), or by using the wild card character
*
to specify all traps for a particular process. If you use
*
, you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you would type
show trap "ndd*"
[<group name>]
is an optional argument used to define a group of traps that you want to turn on or off. For this argument to be used, the group must be defined in an ASCII file called cli.groups in the /usr/app/base/config directory. Refer to the section "Creating cli.groups File" later in this chapter for instructions on creating the cli.groups file.
cli>
prompt to display the status of each trap in the MMA:
*
cli>
show trap "*"
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt, enter the following:
cli>
show trap pid {<#>|<alias>} <trap#> [<group name>]
{<#>|<alias>}
=
The number or the alias name of the process. See the section "Trap Reporting Threshold for Processes" earlier in this chapter for information on obtaining pid numbers and aliases.
<trap#>
= The number of the trap(s). Enter the symbolic trap name or trap number. You can set multiple traps by specifying the trap numbers (ndd_3 ndd_14 lcc_5), or by using the wild card character
"
*
"
to specify all traps for a particular process. If you use
*
, you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you would type
show trap "ndd*"
.
[<group name>]
= An optional argument used to define a group of traps on which you want to show status. For this argument to be used, the group must be defined in an ASCII file called cli.groups in the /usr/app/base/config directory. Refer to the section "Creating cli.groups File" later in this chapter for instructions on creating the cli.groups file.
cli>
prompt:
cli>
show chassis general
cli>
prompt:
cli>
set snmp community <community name>
<community name>
= The SNMP read/write community that you want to access.
cli>
prompt, enter the following:
cli>
show trap <trap#> [<group name>]
<trap#>
= The number of the trap(s). Enter the symbolic trap name or trap number. You can set multiple trap numbers by specifying the trap numbers (ndd_3 ndd_14 lcc_5), or by using the wild card character
"
*
"
to specify all traps for a particular process. If you use
*
, you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you would type
show trap "ndd*"
.
[<group name>]
= An optional argument that defines a group of traps. For this argument to be used, the group must be defined in an ASCII file called cli.groups in the /usr/app/base/config directory. Refer to the section "Creating cli.groups File" later in this chapter for instructions on creating the cli.groups file.
cli>
prompt:
cli>
protected
Enter password:
*cli>
prompt:
*cli>
shell bash
LSnode:2#
cd /usr/app/base/config
LSnode:2#
vi cli.groups
:<groupname> <trap#> <trap#> ...
:<groupname> <trap#> <trap#> ...
<groupname>
= A name that defines the group of traps.
<trap#>
= The trap numbers within the group.
:nd_group NDD_1 NDD_2 NDD_3
:lcc_group LCC_3000 LCC_3002
ZZ
LSnode:2#
exit
*cli>
prompt:
*cli>
exit
![]()
![]()
![]()
![]()
![]()
![]()
![]()