Starting and stopping the BMC Event Adapters
You can use the following methods to start the various BMC Event Adapters:
- The adapters that use the engine manager (LogFile Adapter, SNMP Adapter, and Perl Event log Adapter for Windows) can be started as follows:
- On Microsoft Windows computers, you start the engine manager (mxca process) from the command line or from the Services window.
- On UNIX computers, you start the engine manager (mxca) process from the command line.
For instructions, see Starting the engine manager process from the command line and Starting the adapter processes as services.
- The IP Adapters (on Windows and UNIX) can be started and stopped individually after the primary engine manager process has started running. For more information, see Using instance control to start and stop adapters . When running on Microsoft Windows computers, all adapters that use the engine manager can be started from the command line or from the Services window.
Starting the engine manager process from the command line
At a command prompt, run the mcxa.cmd
(Windows) or mcxa.sh
(UNIX) executable to start the engine manager (mcxa) process.
On Windows, the mcxa.cmd
command starts the appropriate services. The services were created during product installation.
The following table lists the command options:
mcxa command options
Option | Description |
---|---|
-c | Alternative configuration file Default: installationDirectory\pw\server\etc\mcxa.conf |
-d | Debug (prevents daemonization), available only on UNIX platforms |
-h | Help |
-n | Send all events to a specific cell. Use this option to specify the cell to which you want to connect. Use one of the following option formats:
The variable host represents either a host name or an IP address value; port represents the port number value, and key represents the encryption key value. This format uses the specified host, port, and encryption key to connect to the cell without looking up information in the mcell.dir file. |
-t | Specifies trace file, level, or both such as 1-6 Use
Example:
Example: |
-z | Displays the adapter version |
Note
Command-line interface options take priority over options in the mcxa.conf file.
Starting the adapter processes as services
- Choose Start > Settings > Control Panel > Administrative Tools > Services.
- From the list of services, select BMC Event Adapters.
- From the menu bar, choose Action > Start.
The adapters are running when the Status column of the Services window displays Started for the adapters.
Restriction for BMC Event Adapters on Microsoft Windows
On Microsoft Windows, you can start the Logfile Adapter as a service only if all the enabled Logfile Adapters are pointing to files on local drives. If any LogFile Adapter is pointing to a file on a remote system or on a mapped drive, then you must run the mxca.cmd
command from the command line to start the mcxa process. This restriction also applies to uniform naming convention (UNC) paths such as \\acomputer101\fileshare\file because you cannot provide login credentials to access the path from the service.
Stopping the BMC Event Adapters
You can stop the adapters by using one of the following methods:
- On Windows, stop the BMC Event Adapters service from the Services window.
This method sends an MC_ADAPTER_STOP event before the adapters stop. On UNIX, stop the adapters by using either the
kill
command or a shell script, such as the mcxa script located in etc/init.d.
This method sends an MC_ADAPTER_STOPevent before the adapters stop.Note
Do not use the
kill -9
command to stop the adapters unless they are in an infinite loop. Use the regularkill
command, instead.
On UNIX or Windows, create a file called mcxa.stop and add it to the _installationDirectory/pw/server/etc/ directory
When this file is added to the installationDirectory/pw/server/etc/ directory, the adapters stop.
The contents of the mcxa.stop file are not important. When the adapter detects the presence of the file, it normally deletes the file and then stops. This method sends an MC_ADAPTER_STOP event before the adapters stop.
If you used the -c
option with the mcxa.sh
command or the mcxa.cmd
command to specify a configuration file other than mcxa.conf, the stop file must have the same primary name as that of configuration file, using the .stop extension. For example, if your adapters configuration file is adap.conf, name the stop file adap.stop.
Note
If you stop and start the BMC Event Adapters service in quick succession, or use the restart option in the service manager, you might see the following error messages in the operator console: Couldn't be an UDP server on port 16 mcxactrl.pl [ -debug ] [ --mgr <managername> ] --port <number> [-help | -h | --list | --start <name> | --stop <name> | --stopmgr ]
MA: EngineMgr: Couldn't be an UDP server on port 162
If you see these messages, wait until the expected stop messages appear before restarting the adapters. For example, with an SNMP Adapter enabled, wait until the messages BMC Impact Event Adapter stopped
and Adapter Snmp (Engine: 'MA:ESnmpTrap') stopped by 'mcxa'
appear before restarting the BMC Event Adapters service.
Using instance control to start and stop adapters
The mcxactrl.pl
instance control command enables you to perform various operations on adapter instances, including starting and stopping specific adapter instances. The mcxactrl.pl
command communicates with the engine manager by using a control port opened by the engine manager. The port accepts only local host connections.
Warning
Use the CtrlPort Adapter with caution. It is safe to use only on computers where log-ins are restricted to personnel who are authorized to control mcxa. CtrlPort refuses connections from any address other than 127.0.0.1 (localhost), but this is not adequate security for computers that allow people who are not authorized to control the mcxa process to log on.
The following figure shows the syntax of the mcxactrl.pl
command:
mcxactrl.pl command syntax
mcxactrl.pl [ --debug ] [ --mgr <managername>] --port <number>
[--help | -h | --list | --start <name> | --stop <name> | --stopmgr ]
The following table lists the options that you can use with the mcxactrl.pl
command. You can specify only one option each time the command is run.
Note
Double hyphens must precede the options of the mcxactrl.pl
command.
mcxactrl.pl command options
Parameter | Description |
---|---|
--debug | Activates debugging of the procedure that is specified (starting, stopping, listing, and so on) Optional For more information, contact BMC Software support. |
--mgr | Engine manager affected by the command Optional |
--port | Control port on which the engine manager listens Required if the port number has been changed from 1998 (in mcxa.conf) |
--help | Prints usage information and exits Optional. |
--list | Lists all adapters and their current status Optional |
--start instancename | Starts the specified adapter instance. For more information, seeStarting and stopping an adapter without stopping the engine manager. Optional |
--stop instancename | Stops the specified adapter instance. For more information, seeStarting and stopping an adapter without stopping the engine manager. |
--stopmgr | Stops the engine manager specified with --mgr |
Starting and stopping an adapter without stopping the engine manager
You can use the mcxactrl.pl
command to start or stop an individual enabled adapter without stopping the engine manager on which it is running or other adapters running on that engine manager.
If you want to stop an adapter, the adapter must be enabled and the engine manager must be running.
The mcxactrl.pl
command can be performed only locally.
To start or stop an adapter by using the mcxactrl.pl command
- Using a text editor, open the mcxa.conf file.
- Navigate to the CtrlPort Adapter definition and perform the following tasks:
- (Optional) If you intend to use a non-default port value in the
mcxactrl.pl
command, replace the default LocalPort value with the required port number.
When the mcxactrl.pl command is running as in step 4, the port number you specify must match the LocalPort value recorded in the CtrlPort Adapter definition in the mcxa.conf file. The default port number recorded in the CtrlPort Adapter definition in the mcxa.conf file is 1998. Enable the CtrlPort Adapter by removing or commenting out the word DISABLEfrom its definition.
Note
After the CtrlPort Adapter is enabled, you can run the
mcxactrl.pl
command without reenabling the CtrlPort Adapter.
- (Optional) If you intend to use a non-default port value in the
- Save and close the mcxa.conf file.
On the command line, enter the following
mcxactrl.pl
instance control command:mcxactrl.pl
--mgr
<managername>
--port
<number> { --start | --stop } <AdapterName>
Note
Double hyphens, not single hyphens, must precede the arguments in the
mcxactrl.pl
start and stop commands. For information about additional command-line options, see the following table.
Restarting an adapter after modifying the MAP file
If you modify the contents of a map file, for the changes to take effect, you must stop and restart adapters that are using that map file.
Comments
Log in or register to comment.