Banner
HomeTOCPrevNextGlossSearchHelp

PDF

Table of Contents

Managing LightStream 2020 Traps

Managing LightStream 2020 Traps

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.


Managing Individual Traps

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 trap filter level settings for individual traps by instructing the master management agent (MMA) to forward traps that would be normally be discarded or discard traps that would normally be forwarded.

The procedures 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."


Note The console port transmits all traps that are recorded in the trap log. The disabling of individual traps does not prevent them from being displayed on the console.


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. When a trap is set to off, the trap is passed to the MMA only if its trap filter level is equal to or higher than the trap filter level setting of the process filter.

To turn a trap on or off, perform the following steps:

Step 1 Enter protected mode:


cli> protected

Step 2 Enter the protected mode password:


Enter password: password

Step 3 Verify that the target switch is correct:


* cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 4 Set the SNMP community to a read/write community:


* cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 5 If you want to turn the trap on or off for a particular process:


* cli> walksnmp lwmaTrapCliAlias

Find the process you want in the resulting list. Figure 2-1 shows the typical output from this command.

Step 6 Turn a trap on or off using either of the following procedures:

If you want the trap on for a single process:

* cli> set trap pid{<#|alias>} {on|off} <trap#> [<group name>]

If you want the trap on for all processes:

* cli> set trap global {on|off} <trap#> [<group name>]

Where

Step 7 To display the status of the trap for a single process, enter


* cli> show trap pid {<#>|<alias>} "*"

To display the status of the trap for all processes: :

* cli> show trap "*"

The status display shows whether a trap is on, off, or disabled. If the status is either on or off, the trap is enabled. Otherwise, the trap is disabled.

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. Traps that are turned off pass to the MMA only if they have a priority level equal to or higher than that for the process filter.


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 the display device, though it will still go into the traps log. 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:

Step 1 Enter protected mode:


cli> protected

Step 2 Enter the protected mode password:


Enter password: password

Step 3 Verify that the target switch is correct:


* cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 4 Set the SNMP community to a read/write community:


* cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 5 Enable or disable the trap:


* cli> set trap {enable|disable} <trap#> [<group name>]

Where

Step 6 Display the status of each trap in the MMA:


* cli> show trap "*"

The status display shows whether a trap is on, off, or disabled. If the status is either on or off, the trap is enabled. Otherwise, the trap is disabled. See the section "Procedure for Turning an Individual Trap On or Off" for a more detailed description of trap handling in a specific process.

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.


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


Note Increasing the number of traps being reported could result in flooding the node with traps, which could degrade its performance. It is preferable to use the procedures in the section "Managing Individual Traps."

To set the trap filter level for one or more processes, perform the following steps:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide for instructions.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 3 Display a list of the processes:


cli> walksnmp lwmaTrapCliAlias

This command lists the process identification (PID) numbers and alias names of all the processes running on this LS2020 switch (see Figure 2-1). Select the process you want from the list in the display.

Figure 2-1 : Typical Walksnmp Display

h3463.gif

Step 4 Set the trap filter level for a selected process:


cli> set pid {<#>|<alias>} traplevel <value>

where:

{<#>|<alias>} is the process number or alias name.

<value> is oper, info (default), trace, or debug

Step 5 Verify the process trap filter level:


cli> show pid {<#>|<alias>} traplevel

As a consequence of this procedure, the trap filter level 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.


Viewing 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.


Note Disabling individual traps by using the set trap disable command does not prevent them from being displayed on the console because the console port displays all traps that reach the traps log.

To set the trap filter level for the local console, perform the following steps:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 3 Set the trap filter level for the console or turn off the console display:


cli> set chassis consoletraplevel <value>

Where

<value> is off (displays no traps), oper, info (default), trace, or debug.

Step 4 Verify that the console trap filter level has been changed:


cli> show chassis general

When you perform this procedure, the trap filter level for the console is changed to the specified level. Subsequently, the console displays all traps at that level (and higher). Using this procedure, you can also turn off the traps display on the console.


Viewing Traps on the NMS and on the Terminal Running the CLI Session

The trap filter level for the chassis determines which traps are passed from the MMA to the CLI process and the NMS. The default trap filter level is operational, meaning that, at most, only operational and SNMP traps can pass through the chassis.

The traps passed to the CLI process from the MMA must also pass the CLI session filter in order to be displayed (see the following section entitled, "Additional Steps for Customizing Which Traps Are Viewed on the Terminal Running the CLI Session"). Traps passed to the NMS from the MMA are displayed on the NMS, unless the NMS has its own filtering capabilities.

The following procedure temporarily changes the configured trap filter level setting; the change is lost when the switch is rebooted. To make the change permanent, use the LS-Configurator to edit the configuration and update the appropriate node (see the LightStream 2020 Configuration Guide).

To temporarily change the configured setting for the chassis trap filter level, perform the following steps:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> means the SNMP read/write community that you want to access.

Step 3 Set the trap filter level for the chassis filter:


cli> set chassis traplevel <trap value>

Where

<value> is oper (default), info, trace, or debug.

Step 4 Verify that the trap filter level has been changed:


cli> show chassis agent

As a consequence of this procedure, the trap filter level 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.


Additional Steps for Customizing Which Traps Are Viewed 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 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 for most applications.

To set the trap filter level for a CLI session, perform the following steps:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the trap filter level for the CLI:


cli> set cli traplevel <value>

Where

<value> is off (displays no traps), oper, info, trace, or debug (default).

Step 3 Verify that the trap filter level for the CLI has been changed:


cli> show cli traplevel

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 at that level (and higher).


Logging Traps

You can log the traps that occur on each LS2020 switch. The traps are stored on the network processor (NP) card 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.


Note The following procedure temporarily changes the trap log status attribute; any change is lost when the switch is rebooted. To make the change permanent, use the LS-Configurator to edit the configuration (see the LightStream 2020 Configuration Guide).

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:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 3 Enable or disable the trap log for a particular chassis:


cli> set chassis traplog <value>

Where

<value> is on (enables the trap log) or off (disables the trap log)

Step 4 Verify that the trap log has been enabled or disabled for a particular LS2020 switch:


cli> show chassis agent

After you perform this procedure, the trap log for the specified chassis is enabled or disabled.


Viewing the Trap Log

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 the following at the prompt:

LSnode:2$   cbufpr [-hv] [-all] [-tail] -<number> [-f] [-stat] -<level> /usr/tmp/mma/mma.traplog | more

where:

  • [h] displays a help message. Other arguments with the -h argument are ignored.

  • [v] displays cbufpr (traps 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.

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:

cli> show file traplog

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.


Note Before attempting to move the trap log from one NP to another, obtain a user name and password for an account on the workstation or host where you intend to place the trap log file.

To move the trap log file to another NP for viewing, perform the following steps:

Step 1 Set CLI protected mode (required for execution of the shell command):


cli> protected

Step 2 Enter the protected mode password:


Enter password: password

Step 3 Unwind the circular log file:


* cli> shell "cbufpr /usr/tmp/mma/mma.traplog > tmp/traplog"

The trap log file is a temporary file.

Step 4 Shell out of CLI:


* cli> shell "ftp <IP address of destination workstation or host>"

You are prompted to log in to the workstation or host.

Step 5 Log in to the workstation or host.

Step 6 You can place the trap log file in any directory other than the login directory on the workstation or host. Enter cd <directory name> to change to the appropriate working directory.

Step 7 Place the log file in the directory:


ftp> put /tmp/traplog [<new name>]

where:

[<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.

This command sends the log file to the specified workstation or host. The system tells you when the file transfer is complete.

Step 8 Exit FTP:


ftp> quit

Use any more or cat command or a screen editor such as emacs or vi to view the mma.traplog file on the workstation or host.

Step 9 Remove the temporary trap log file:


*cli> shell "rm /tmp/traplog"

Figure 2-2 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-2 : Trap Log Example

h3468.gif


Displaying the Trap Status

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:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 3 View the status of one or more traps for the process:


cli> show trap pid {<#>|<alias>} <trap#> [<group name>]

Where

  • {<#>|<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 "To create the cli.groups file, perform the following steps:," later in this chapter, for instructions on creating the cli.groups file.


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:

Step 1 Verify that the target switch is correct:


cli> show chassis general

If you need instructions on changing the target switch, refer to the LightStream 2020 Network Operations Guide.

Step 2 Set the SNMP community to a read/write community:


cli> set snmp community <community name>

Where

<community name> is the SNMP read/write community that you want to access.

Step 3 View the status of one or more traps for the MMA:


cli> show trap <trap#> [<group name>]

Where

  • <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 "To create the cli.groups file, perform the following steps:," later in this chapter, for instructions on creating the cli.groups file.

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-3).

Figure 2-3 : Sample Status Display for Specific Traps

h3471.gif

If you enter the command show trap "*", the status of all traps in the MMA is displayed (see Figure 2-4). Figure 2-4 shows a partial display; several screens of traps are displayed when you issue this command.


Creating cli.groups File

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.

Figure 2-4 : Sample Status Display for All Traps

h3472.gif

To create the cli.groups file, perform the following steps:

Step 1 Enter protected mode:


cli> protected

Step 2 Enter the protected mode password:


Enter password: password

Step 3 Escape from the CLI to the LynxOS bash shell:


*cli> shell bash

Step 4 Move to the /usr/app/base/config directory:


LSnode:2# cd /usr/app/base/config

Step 5 Invoke the vi editor:


LSnode:2# vi cli.groups

When the editor opens the file, enter the group names and trap numbers in the format shown below. Each group definition begins with a colon.

:<groupname> <trap#> <trap#> ...
:<groupname> <trap#> <trap#> ...

Where

  • <groupname> is a name that defines the group of traps.

  • <trap#> is the trap numbers within the group.

The contents of your file will be similar to this:

:nd_group NDD_1 NDD_2 NDD_3
:lcc_group LCC_3000 LCC_3002

Step 6 When you have finished entering the group names and trap numbers in the file, exit the vi editor by pressing the Esc key or ^[, and entering ZZ .

Step 7 Return to the CLI:


LSnode:2# exit

Step 8 Exit protected mode:


*cli> exit


Summary of Trap Commands

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

h4873.gif

HomeTOCPrevNextGlossSearchHelp
-

Copyright 1988-1996 © Cisco Systems Inc.