Options for sm_trapd lists and describes available options for sm_trapd.

Table 1. Options for sm_trapd

Option

Description

--ascii

If “--ascii” is not specified on the commandline for starting sm_trapd, sm_trapd converts the entire value of that OID into a printable UTF-8 coding string, such as a varbind. For example, .1.3.6.1.4.1.333.1 -> "abcd012" is converted into .1.3.6.1.4.1.333.1 -> "61 62 63 64 C3 96 30 31 32".

If “--ascii” is specified on the commandline for starting sm_trapd, sm_trapd converts only the non-printable characters into a HEX string using the UTF coding for these characters. The remaining printable characters of the original value (octet-string) remain unchanged, such as the varbind. For example, .1.3.6.1.4.1.333.1 -> "abcd012" is then converted into .1.3.6.1.4.1.333.1 -> "abcdXC3X96012."

--broker

Alternate broker location as host:port. For example: --broker AM_HOST-NAME:AM-PORT. Also -b <location>.

--community

Stream the trap community string to the parser. Writes the community string to the sm_trapd.log file.

Note:

This option is required in the sm_trapd command line when using a community string in a hookscript or the $C$ variable.

--config=<cfg>

Name of trap configuration directory where the trapd.conf is located. The trapd.conf file is loaded from one of the following directories:

  • BASEDIR/smarts/local/conf/<cfg> or

  • BASEDIR/smarts/conf/<cfg>

The file in the local directory takes precedence if the configuration is present in both places.

Note:

Default is --config=trapd.

--limitQueueMegs=<num>

Size limit of internal trap queue. When the limit is reached, discard incoming traps from the most active sources.

--model=<model>

Name of the model library that you want to load. For example: -model=sm_actions. Also -m <model>.

--name=<name>

Registered server name you want to start. Also -name <name>.

--output

Data transfer.

--port=<port>

Alternate port number for receiving traps. Also -p <port>.

Note:

Default value is --port=162.

--reloadConfig

Reload, rather than restart, the trap configuration file for an already-running SNMP trap adapter.

For example: -s <adaptername> --reloadConfig.

--rules=<name>

Name of the rules set for parsing traps. For example: --rules=icoi-trapd/trap_mgr_parse.asl.

--rules=default

Name of the default rules set for parsing traps.

Note:

Default is --rules=BASEDIR/smarts/rules/trapd/trapParse.asl.

--seed=<file>

Get SNMPv3/USM credentials from the seed file.

For example: --seed=seedfile.

The seed file has a path that is relative to the conf directory.

--server=<name>

Name of the server. For example: --server=INCHARGE-OI. Also -s <name>.

--source

Forward the source address of the trap to the trap processor and make this address available to configuration files and ASL scripts.

--sport=<port>

Alternate registration port. Use with --name. For example: --sport=9180. Also -P <port>.

--tag

Tag each varbind value with its type.

--window=<num>

Window size for duplication. Also -w <num>.

Trace options

--traceSNMP

Trace incoming SNMP messages.

--traceRules

Trace rule compilation.

--traceServer

Trace interactions with the back-end server.

--traceParse

Trace rule matching.

Standard options

--accept=<host-list>

Accept connections only from hosts on <host-list>, which is a comma-separated list of hostnames and IP addresses. The any option for <host-list> allows any host to connect.

Note:

Default is --accept=any.

--daemon

Run process as a daemon.

--errlevel=<level>

Minimum error printing level.

Note:

Default is --errlevel=Warning.

--help

Print help and exit.

--loglevel=<level>

Minimum system logging level.

Note:

Default is --loglevel=Error.

--logname=<name>

Use <name> to identify sender in the system log.

Note:

Default is the name of a program.

--output[=<file>

Redirect server output (stdout and stderr). The filename is <file>, or the --logname value if <file> is omitted. Log files are in $SM_LOGFILES or $SM_WRITEABLE/logs.

--tracelevel=<level>

Minimum stack trace level. Options for <level> include: One of None, Emergency, Alert, Critical, Error, Warning, Notice, Informational, or Debug. Fatal is a synonym for Critical. For example: --tracelevel=Informational.

Note:

Default is --tracelevel=Fatal.

--version

Print program version and exit.

--useif=<ip-address>

Use this IP address as the source or destination interface address.

--

Stop scanning for options.

--trailingNulls

This option allows for printing trailing NULL bytes in an octet string of varbind value as 00 or \X00. By default trailing null octets are ignored.

For example:

Device data: 41 00 00 00 00

sm_adapter data: 41

If sm_adapter is started with option --trailingNulls, then the adapter will print the octet string as it is, that is, the way it is coming from the trap device, including the trailing null octets.

For example:

sm_adapter started with --trailingNulls option:

Device data: 41 00 00 00 00

sm_adapter data: 41 00 00 00 00