# Launching oamcfg

To launch oamcfg, enter oamcfg on the command line, followed by zero or more command line options. Precede each option with a hyphen (-) or slash (/). If the option includes data, specify the data directly after the option on the command line. Valid options are described in the following table.

Note: To use oamcfg, ctdaemon must be running. To learn how to start ctdaemon, refer to Starting the Natural Access Server.

## Command line options

Use the -b, -g, -l, -m, and/or -n options to specify a board or other component for the operations. If you do not specify a board or component with these options, the specified operations are performed for all boards.

Option | Use this option to...
--- | ---
-@ host | Perform the operation on resource host host. host is an IP address or machine name. If unspecified, the operation is performed on the host on which the utility was initialized.
-a | Create a record in the NMS OAM database for a board that was automatically detected using the -x option. The board name is specified with the -n option. If the board name is omitted, all detected boards are added. Refer to Automatically detecting and adding boards for more information. When this option is used, all other options (except the -x option) are ignored.
-b brdno | Specify the target board number. If this option and the -g, -l, -m, and -n options are omitted, any specified operations are performed for all boards. Use this option to change the board number. Refer to Changing board ID information.
-c product | Create a record in the NMS OAM database for the board containing basic board ID information. product is the product string for the board type. If product is ?, oamcfg displays a list of all board product types supported by the installed plug-ins, in alphabetical order, and then terminates. If product is" ", oamcfg chooses the first product name in this list.
-d | Delete the records for the boards from the NMS OAM database.
-export filename | Export a snapshot of the contents of the NMS OAM database to filename. The contents of the file can then be imported into another NMS OAM database by invoking oamcfg with the -import option.
-f cfgfile | Add the information from keyword file cfgfile to the database records for the specified components. This option can appear more than once on a command line, to load multiple files. Statements in the board keyword file override information already in the record. Note: oamcfg is designed to parse keyword files, not system configuration files such as those that oamsys takes as input.
-g shelf:slot | Specify the shelf and slot of the board for which to perform the specified operation. If this option and the -b, -l, -m, and -n options are omitted, the specified operation is performed for all boards.
-h or ? | Display oamcfg Help screen and terminate.
-i | Cause oamcfg to return immediately when used with the -p, -s, and -t options. By default, oamcfg does not return until it receives indications that its operations have completed (successfully or not).
-import filename | Import the contents of an NMS OAM database from filename. All current records are destroyed and replaced with those from the file.
-k keyword=value | Set keyword to value in the database record for the specified component. This option can appear more than once on a command line, to set multiple keywords.
-l PCIbus:slot | Specify the target board by PCI bus and slot. If this option and the -b, -g, -m, and -n options are omitted, any specified operation is performed for all boards. Use this option to change the PCI bus and slot location specified in the database for a board. Refer to Changing board ID information.
-m MAC_address | Specify the target board by one of its MAC addresses. If this option and the -b, -g, -l, and -n options are omitted, any specified operation is performed for all boards.
-n name | Specify the target board or component by name. name can be the name of a board or another component (such as, an EMC or the Supervisor). If this option and the -b, -g, -l, and -m options are omitted, the specified operation is performed for all boards.
-p | Stop the specified boards. The board stops immediately, interrupting any ongoing process. To avoid problems, make sure a board is not performing any operations before stopping it.
-q | Query the NMS OAM database for the board ID information for the specified boards.
-r | Cause oamcfg to reset all keywords to their default values (except board ID information) for the specified components. oamcfg then makes the specified changes. Use when configuration data in the NMS OAM database is being changed (that is, the -f or -k option is used or board ID information is changed). If the -r option is omitted, oamcfg adds or replaces keyword values specified in the board keyword file without disturbing any other settings.
-s | Start the specified boards.
-t testopts | Test the specified boards, if supported by the board plug-in. testopts is a numeric value indicating how to perform the test.
-x | Search the chassis for boards and adds information about each board it finds into subkeywords of the DetectedBoards[] Supervisor array. Use the -a option to create records for detected boards in the NMS OAM database. When this option is used, all other options (except the -a option) are ignored.

A single invocation of oamcfg can perform multiple operations by specifying more than one operation on the command line. For example, the following command line creates a record in the NMS OAM database for a CG 6000C board in bus 0, slot 20, displays the board's ID parameters, loads keyword file cgnocc.cfg (replacing all existing information, if any) and attempts to start the board:

oamcfg -l 0:20 -c CG_6000C_QUAD -q -f cgnocc.cfg -r -s