|
|
Managing LightStream 2020 Traps
This chapter tells you how to customize the way your LightStream 2020 multiservice ATM switch (LS2020 switch) displays and logs traps. The procedures in this chapter tell you how to control the fate of individual traps or groups of traps. You can discard traps, store them in a log, or display them on the local console, in a command line interface (CLI) session, or on a network management system (NMS). If you are not familiar with trap filter levels, read the overview in the chapter entitled "About LightStream 2020 Traps."
This chapter provides procedures for
At the end of this chapter is a diagram (Figure 2-5) summarizing trap movement through the LS2020 system and the CLI commands that affect trap flow. Each of the CLI commands in this diagram is explained in detail in this chapter.
Trap reporting is controlled by trap filter level settings, as discussed in the chapter entitled "About LightStream 2020 Traps." The procedures in this section allow you to override process filter settings for individual traps. The process filter is the first filter a trap encounters, and it decides which traps to pass into the Master Management Agent (MMA). You can instruct the process filter to forward specific traps that it would normally discard. You can also tell it to prevent the MMA from sending specific traps to an NMS or a terminal running a CLI session.
The procedures in this section let you
Procedures for changing the way the system handles all traps belonging to a particular trap type are in the section entitled "Working with Trap Filter Levels."
Procedure for Turning an Individual Trap On or Off
This section tells you how to turn a particular trap on or off. Turning a trap on allows it to be passed to the MMA, even if it has a priority level below the trap filter level set for the process filter.
The default for all traps in all processes is off. The process filter determines which traps that are turned off pass to the MMA. For more information, see the section "Working with Trap Filter Levels."
To turn a trap on or off, perform the following steps:
Figure 2-1 : Typical Walksnmp Display At the conclusion of this procedure, each trap that you have turned on passes to the MMA whenever that trap is generated in the selected process. The process filter determines which traps that are turned off pass to the MMA. For more information, see the section "Working with Trap Filter Levels."
Procedure for Enabling/Disabling an Individual Trap
This section tells you how to enable or disable individual traps for all processes. When you disable a trap in an LS2020 switch, the MMA does not send it to an NMS or a terminal running the CLI session, though it will still go into the trap log and be displayed on the console. You may want to disable a trap if it appears frequently and you feel that its display is unnecessary.
To enable or disable a trap, perform the following steps:
After you perform this procedure, the disabled trap for the selected node is neither passed to the CLI nor displayed on a third-party NMS.
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 "Procedure for Turning an Individual Trap On or Off," earlier in this chapter, for a description of the on/off state. See the section "Procedure for Enabling/Disabling an Individual Trap," for a description of the enabled/disabled state.
View Status of One or More Traps for a 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:
For example, if you now enter the command show trap ndd_3 ndd_4 ndd_5 ndd_1001, the status of these traps is displayed (see Figure 2-2).
Figure 2-2 : Sample Status Display for Specific Traps If you enter the command show trap "*", the status of all traps in the MMA is displayed (see Figure 2-3). Figure 2-3 shows a partial display; several screens of traps are displayed when you issue this command.
Figure 2-3 : 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 a 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.
To create the cli.groups file, perform the following steps:
Working with Trap Filter Levels
This section explains how to set trap filter levels. Trap filters control which trap types are dropped, saved, or displayed. Because trap filters reside on a trap path, you might need to modify the settings of more than one filter in order to achieve your desired goal. For instance, if your system uses the default setting and you want to view a trace trap for a particular process on the console, you would need to modify the process filter as well as the console filter. For an overview of trap filter levels, refer to the chapter entitled "About LightStream 2020 Traps."
This section discusses the four trap filters:
By default, the trap filter levels are set so that SNMP and operational traps are displayed, and SNMP, operational, and informational traps are logged. Trace and debug traps are discarded. The default works well for most networks.
Passing Traps Through the Process Filter
Setting the trap filter level 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. (For more information, see the section entitled "Logging Traps.")
The default trap filter level for all processes is informational. This level transmits all SNMP, operational, and informational traps to the MMA. This level is appropriate for most applications. If the defaults have not been changed, you would use the following procedure to let in all trace or debug traps for a specific process or to exclude all info or oper traps for a specific process.
To set the trap filter level for one or more processes, perform the following steps:
As a consequence of this procedure, the trap filter level for the specified process filter is changed to the specified level. Subsequently, all traps encompassed by this level are passed from the process to the MMA.
Displaying Traps on the Local Console
The trap filter level setting for the console filter in each LS2020 switch determines which traps are displayed on the local console. The default trap filter level for the console filter is operational, meaning that only operational and SNMP traps can pass through the chassis. This level is appropriate for most applications.
To set the trap filter level for the LS2020 node's local console, perform the following steps:
When you perform this procedure, the trap filter level for the console is changed to the specified level. Subsequently, the console displays all traps encompassed by this level. Using this procedure, you can also turn off the traps display on the console.
The trap filter level for the chassis filter determines which traps are passed from the MMA to the NMS and the CLI process. The default trap filter level is operational, meaning that, at most, only operational and SNMP traps can pass through the chassis filter.
Traps passed to the NMS from the MMA are displayed on the NMS, unless the NMS has its own filtering capabilities. The traps passed to the CLI process from the MMA must also pass the CLI session filter in order to be displayed on the terminal running the CLI Session (see the following section, "Displaying Traps on the Terminal Running the CLI Session").
To temporarily change the configured setting for the chassis trap filter level, perform the following steps:
As a consequence of this procedure, the trap filter level for the chassis filter is changed to the specified level. Subsequently, all traps encompassed by this level are sent to the CLI and the NMS.
Displaying Traps on the Terminal Running the CLI Session
Use the following procedure if you wish to display different types of traps on the terminal running the CLI session than on the NMS.
The trap filter level setting for the CLI session filter determines which traps are displayed by the terminal running the CLI session. The default trap filter level for the CLI is debug. This means that all traps that passed through the chassis filter (operational and SNMP in the default state) can pass through the CLI session filter. This level is appropriate in most cases.
To set the trap filter level for a CLI session, perform the following steps:
After you perform this procedure, the trap filter level for the CLI session filter is changed to the specified level. Subsequently, the terminal running the CLI displays all traps encompassed by this level.
You can log the traps that occur on each LS2020 switch. The traps are stored on the hard disk of the switch in a file called mma.traplog in the /usr/tmp/mma directory. This file can store approximately 6000 traps before the oldest trap is overwritten by the latest trap. The trap filter levels set for each process determine which traps are logged. This section tells you how to enable or disable the trap log.
Enabling or Disabling the Trap Log
You can enable or disable the trap log for a particular LS2020 switch; however, 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.
If a node's trap log file is moved or deleted, trap logging is effectively disabled for that node. If the file /usr/tmp/mma/mma.traplog is not present, use this procedure to re-enable trap logging.
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 view the trap log from the LynxOS shell and view the trap log from the CLI.
Viewing the Trap Log from a LynxOS Shell
If you are working in the LynxOS shell, you can view the trap log file by entering a command of the following form:
Where
For more information on the cbufpr command, see the LightStream 2020 NP O/S Reference Manual.
Viewing the Trap Log from the CLI
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 trap log file. For more information on the show file command, refer to the LightStream 2020 CLI Reference Manual.
Moving the Trap Log from the NP
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, use the ftp command.
To move the trap log file to another NP for viewing, perform the following steps:
Figure 2-4 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-5 provides an overview of the trap movement and commands in the LS2020 system.
Figure 2-5 : Overview of Trap Movement and CLI commands
Copyright 1988-1996 © Cisco Systems Inc.
cli>
protected
Enter password:
*
cli>
show chassis general
*
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
*
cli>
walksnmp lwmaTrapCliAlias
*
cli>
set trap pid{<#|alias>} {on|off} <trap#> [<group name>]
*
cli>
set trap global {on|off} <trap#> [<group name>]
{<#>|<alias>}
is the process number or alias name.
{on|off}
specifies whether the trap is on or off. The default is off.
<trap#>
is 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 (for example, 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, type
show trap "ndd*"
.
[<group name>]
is 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 the cli.groups File" later in this chapter for instructions on creating the cli.groups file.
*
cli>
show trap pid {<#>|<alias>} "*"
*
cli>
show trap "*"
cli>
protected
Enter password:
*
cli>
show chassis general
*
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
*
cli>
set trap {enable|disable} <trap#> [<group name>]
{enable|disable}
indicates whether the trap is to be 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 the wild card character (
*
), you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you 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 the cli.groups File," later in this chapter, for instructions on creating the cli.groups file.
*
cli>
show trap "*"
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
cli>
show trap pid {<#>|<alias>} <trap#> [<group name>]
{<#>|<alias>}
is t
he number or the alias name of the process. See the section "Procedure for Turning an Individual Trap On or Off" earlier in this chapter for information on obtaining pid numbers and aliases.
<trap#>
is the number of the trap(s). Enter the symbolic trap name or trap number. You can set multiple traps by specifying the trap numbers (for example, ndd_3 ndd_14 lcc_5), or by using the wild card character
(
*
)
to specify all traps for a particular process. If you use the wild card character (
*
), you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you type
show trap "ndd*"
.
[<group name>]
is an optional argument used to define a group of traps for 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 the cli.groups File," later in this chapter, for instructions on creating the cli.groups file.
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
cli>
show trap <trap#> [<group name>]
<trap#>
is the number of the trap(s). Enter the symbolic trap name or trap number. You can set multiple trap by specifying the trap numbers (for example, ndd_3 ndd_14 lcc_5), or by using the wild card character
(
*
)
to specify all traps for a particular process. If you use the wild card character (
*
), you must enclose the expression in which it appears with quotes. For example, to specify all NDD traps, you type
show trap "ndd*"
.
[<group name>]
is 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 the cli.groups File," later in this chapter, for instructions on creating the cli.groups file.
cli>
protected
Enter password:
*cli>
shell bash
LSnode:2#
cd /usr/app/base/config
LSnode:2#
vi cli.groups
:<groupname> <trap#> <trap#> ...
:<groupname> <trap#> <trap#> ...
<groupname>
is a name that defines the group of traps.
<trap#>
is 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>
exit
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
cli>
walksnmp lwmaTrapCliAlias
cli>
set pid {<#>|<alias>} traplevel <value>
Where:
{<#>|<alias>}
is the process number or alias name.
<value>
is oper, info (default), trace, or debug
cli>
show pid {<#>|<alias>} traplevel
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
cli>
set chassis consoletraplevel <value>
<value>
is off (displays no traps), oper, info (default), trace, or debug.
cli>
show chassis general
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
means the SNMP read/write community that you want to access.
cli>
set chassis traplevel <trap value>
<value>
is oper (default), info, trace, or debug.
cli>
show chassis agent
cli>
show chassis general
cli>
set cli traplevel <value>
<value>
is off (displays no traps), oper, info, trace, or debug (default).
cli>
show cli traplevel
cli>
show chassis general
cli>
set snmp community <community name>
<community name>
is the SNMP read/write community that you want to access.
cli>
set chassis traplog <value>
<value>
is on (enables the trap log) or off (disables the trap log)
cli>
show chassis agent
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 (trap log) 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]
is 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 (Control-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 scrolls across the screen.
cli> show file traplog
cli>
protected
Enter password:
*
cli>
shell "cbufpr /usr/tmp/mma/mma.traplog > tmp/traplog"
*
cli>
shell "ftp <IP address of destination workstation or host>"
ftp>
put /tmp/traplog [<new name>]
[<new name>]
is 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>
quit
*cli>
shell "rm /tmp/traplog"
![]()
![]()
![]()
![]()
![]()
![]()
![]()