# Hot Swap manager: hsmgr

#### Name

hsmgr

#### Purpose

Runs the Hot Swap manager.

#### Usage

hsmgr [ options ]

where options are:

Option | Description
--- | ---
-c | (Windows only) Starts the Hot Swap manager as a console application.
-d | (UNIX only) Starts the Hot Swap manager as a daemon.
-h, -? | Displays the hsmgr Help screen and terminates.
-k | (UNIX only) Kills previous instance of the daemon.
-n | Disables display of messages and states.
-o log_file | Specifies an output log file for messages instead of writing to standard output.

#### Description

hsmgr must be running to use Hot Swap. When Natural Access is installed, hsmgr is installed as a service and is configured to be started manually.

To run on a remote host, the utility must be physically resident on the remote host. Use a separate third-party utility such as telnet, rsh, or rexec to invoke the utility.

When debugging Hot Swap applications, run hsmgr in console mode to see Hot Swap manager messages.

#### Procedure

To run hsmgr in console mode:

Step | Action
1 | To stop any previous instance of hsmgr: Under Windows: Open the Administrative Tools applet in the Control Panel. The Administrative Tools window appears. Open the Services applet within this window. The Services window appears. Double-click on NMS HotSwap Manager. The Properties window appears. Click Stop. Click OK. Close the Services window. Close the Administrative Tools window. Under UNIX: Run the Hot Swap manager with the -k option to stop any previous instance of the manager: hsmgr -k
2 | Start the Hot Swap manager in console mode by entering: hsmgr -c

In Solaris, if you are running the Hot Swap manager in console mode, ensure that the Hot Swap driver (hssrv) is running, otherwise startup fails. Refer to Hot Swap driver: hssrv for more information.

In Linux, ensure that the Hot Swap kernel driver is loaded. Refer to Starting Hot Swap under Linux for more information.

If the print option is on (default), messages display as boards are inserted and extracted. Each message displays in the following format:

direction destination pci_bus, pci_slot hsmessage

where:

Field | Description
--- | ---
direction | Direction of message: > indicates an output message < indicates an input message.
destination | Label given to an application (for example, hsmon) or the label for querying a board (for example, QSlotI).
pci_bus, pci_slot | CompactPCI bus and slot location.
hsmessage | Hot Swap manager message indicating the Hot Swap state or message.

For example:

>QSlotI 0,9 HSM_REPLY_SLOT_BY_IDENT_DATA
<QSlotI 0,0 HSM_OPEN_CONNECTION
<QSlotI 0,0 HSM_QUERY_SLOT_BY_IDENT_DATA
>QSlotI 0,9 HSM_REPLY_SLOT_BY_IDENT_DATA
<QSlotI 0,0 HSM_CLOSE_CONNECTION
<QState 0,0 HSM_OPEN_CONNECTION
<QState 0,9 HSM_QUERY_HSM_STATE
>QState 0,9 HSM_REPLY_HSM_STATE status HSMS_P0
<QState 0,0 HSM_CLOSE_CONNECTION
<OAM 0,0 HSM_OPEN_CONNECTION
<OAM 0,0 HSM_CLOSE_CONNECTION
<HSMON 0,0 HSM_OPEN_CONNECTION
<HSMON 0,0 HSM_OPEN_CONNECTION
<HSMON 0,9 HSM_QUERY_HSM_STATE
>HSMON 0,9 HSM_REPLY_HSM_STATE status HSMS_P0
<HSMON 0,0 HSM_CLOSE_CONNECTION
<HSMON 0,0 HSM_OPEN_CONNECTION
<HSMON 0,9 HSM_QUERY_SLOT_INFO
>HSMON 0,9 HSM_REPLY_SLOT_INFO
<HSMON 0,0 HSM_CLOSE_CONNECTION

Error messages

hsmgr displays the following error messages:

Error message | Description
--- | ---
Error: Can't create 'hsmgr_hsd' event object | Hot Swap manager cannot create the hsmgr_hsd event object. Check system resources.
Error: Can't create 'hsmgr_hsf' event object | Hot Swap manager cannot create the hsmgr_hsf event object. Check system resources.
HSMgr: initialization error | This message usually follows other error messages. Check to see if another copy of the Hot Swap manager is running.
pci bus, slot HSMgr internal error: Wrong transition from old state to new state | Hot Swap manager encountered an error transitioning between states.
pci bus, slot Skipped HSM_BOARD_CONFIGURED message | A board preparation application sent an unexpected message.

Informational messages

hsmgr displays the following informational messages:

Informational message | Description
--- | ---
Use statediagram diagram | On startup, the Hot Swap manager displays the state diagram it is using.
Changed from oldstatediagram to newstatediagram diagram | If the state diagram changes, the Hot Swap manager displays the new diagram information.