OP5 Monitor ["OP5 Monitor"]
["Technical Reference"]

Using command line tools


Handlers and bindings are managed by a tool called traped (TRAPper EDitor), which is located in /opt/trapper/bin. It takes a command as its first argument, then optional additional arguments.


traped list modules

# traped list modules

Prints a list of all modules.

traped list handlers

# traped list handlers

Prints a list of all handlers.

traped list matches

# traped list matches

Prints a list of matches in format <trap_oid> <handler_name>.

traped create module

# traped create module <name>

Creates empty module <name>.


# traped create module test

traped create handler

# traped create handler <name>

Creates empty handler <name>.


# traped create handler test

traped read

# traped read <name>

Prints handler/module <name> to stdout.


# traped read test > test.lua

traped update

# traped update <name>

Updates handler/module <name> with a script passed through stdin.


# traped update test < test.lua

traped delete

# traped delete <name>

Deletes handler/module <name>.

traped bind

# traped bind { <oid> | "<pattern>" | fallback } <name>

Binds handler <name> to trap <oid>, or to all traps with OIDs that match <pattern>, or to all traps that were not processed by any other handler.


# traped bind . test
# traped bind ".1.2.3*" test
# traped bind fallback test


  • * in a pattern means a substring of any length consisting of any symbols.
  • You must enclose patterns in quotes.

traped unbind

# traped unbind { <oid> | "<pattern>" | fallback } <name>

Unbinds handler <name>, essentially reverting to the same bind command.

traped move

# traped move up|down { <oid> | "<pattern>" | fallback } <name>

Moves match to trap and handler higher in the list, so that it can be processed sooner.


# traped list matches
.1.2.3* test1 . test2

If a trap has OID ., test1 will be processed first, then test2.

# traped move up . test
# traped list matches
. test2 .1.2.3* test1

If a trap has OID ., test2 will be processed first, then test1.