Name

nnmtrapdump.ovpl — Print traps logged in the binary trap store to the console

SYNOPSIS

nnmtrapdump.ovpl [-u user] [-p password] [-t] [-from date] [-to date] [-source IP address] [-trapid Trap OID] [-last minutes] [-short] [-nodns] [-hexDump] [-javaDump]

DESCRIPTION

All incoming traps are logged in a binary trap store by the HP NNM Trap Service. nnmtrapdump.ovpl can be used to see the traps that have been logged. It can also be used to watch new incoming traps. When using trap tool any log or error messages are printed to the standard error. By redirecting the standard error to a different file, you can prevent these messages from getting mixed with the actual trap dump output.

Parameters

nnmtrapdump.ovpl supports the following parameters:

-u <username>

Supply the NNMi administrator username to run the script. This script requires the NNMi administrator username unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-p <password>

Supply the NNMi administrator password to run the script. This script requires the NNMi administrator password unless you use an nnm.properties file. See the nnm.properties.4 reference page for more information.

-t

Use -t to continuously print incoming traps. This option cannot be used with the -to option

-from date

Specifies the date from which traps are printed. The date is specified in ISO 8601 standard format: yyyy-mm-ddThh:mm:ss[+ or -]hh:mm. This option can be used to drill down from the analytics entries in the trapanalytics.0.0.log file. This option cannot be used with the -last option

-to date

Specifies the date till which traps are printed. The date is specified in ISO 8601 standard format: yyyy-mm-ddThh:mm:ss[+ or -]hh:mm. This option can be used to drill down from the analytics entries in the trapanalytics.0.0.log file.

-source IP address

Specifies the source IP address of the traps that should be printed. Only traps from the given source will be printed.

-trapid Trap OID

Specifies the trap OID of the traps that should be printed. Only traps with the given OID will be printed.

-last minutes

Specifies the age of the traps to be printed. The value is in minutes. Only traps are at the most this old will be printed. This option cannot be used along with the -from option.

-short

Use -short to print a short format of incoming traps. Only the trap OID, arrival time and source address are printed

-nodns

Use -nodns to prevent resolution of IP addresses to node names. This speeds up the printing of traps

-hexDump

Use -hexDump to print traps in hexadecimal format

-javaDump

Use -javaDump to print traps in java format

EXAMPLES

To print all the traps in the binary trap store to the console:

nnmtrapdump.ovpl

To wait in a loop and print all incoming traps:

nnmtrapdump.ovpl -t

To print traps within the 5 minute window from 9:00AM to 9:05AM MDT on July 31 2008:

nnmtrapdump.ovpl -from 2008-07-31T09:00:00-06:00 -to 2008-07-31T09:05:00-06:00

To print traps that came within the last 5 minutes and then wait for incoming traps:

nnmtrapdump.ovpl -last 5 -t

To print traps from IP address 192.168.0.1:

nnmtrapdump.ovpl -source 192.168.0.1

FILES

$NNM_DB/traps is the directory that contains the files that constitute the trap database.

$NNM_LOG/trapanalytics.0.0.log is the analytics log file containing information about the most frequent trapids and sources sending traps.

AUTHOR

nnmtrapdump.ovpl was developed by Hewlett Packard Enterprise.

Return to Reference Pages Index