# Appendix B. Environment Variables

Under certain conditions, you may need to change some of Log Central's environment variables. This appendix describes these modifiable Log Central environment variables, and the conditions under which you need to modify them:

- BEA_LC_IPCKEY

- BEA_LC_CONF_SERVICE

- BEA_SM_BEAMGR_CONF

## BEA_LC_IPCKEY

The BEA_LC_IPCKEY environment variable defines the interprocess communication (IPC) key used by Log Central, as well as acting as an identifier for Log Central.

If you are using only one instance of Log Central and have no need of changing its default IPC key, you do not need to modify this variable. You must set it for multiple Log Central systems because each needs a different value for its IPC key. The default value of ``BEA_LC_IPCKEY is `0xeeee0000`. You can use the default for the first instance of Log Central, but you must change the variable in any succeeding invocations of Log Central. The value you set must be the same as that in the `IPCKEY` keyword of the `LC_GLOBAL` entry in the `messaging.conf` configuration file.

BEA_LC_IPCKEY is used by the following Log Central processes:

- `stop_messaging`

- `show_config`

- `log_monitor`

- `msg_test`

- `start_messaging`

The `start_messaging` process on the central host reads the value of its IPC key from the `messaging.conf` configuration file (from the `IPCKEY` keyword). The value is then passed to all processes started by `start_messaging` (`ipc_config`,`proc_monitor`, `msg_sender`, `msg_receiver`, `msg_processor`). All other Log Central programs not started by `start_messaging` (such as `log_monitor`, `msg_test`) read the value of this variable from the environment. The `start_messaging` process on a managed node also reads the value from the environment.

You should set this value on the central host as well as all managed nodes before starting any Log Central processes.

### Using a New IPCKEY Value

The following steps show how to assign a different value from the default to the IPCKEY.

1. Set the value of the `IPCKEY` keyword of the `LC_GLOBAL` entry in the `messaging.conf` configuration file on the central host. (IPCKEY can take any numeric value. Use 0x to indicate a hexadecimal value.) For example, to use `0xe1e1e1e1`, you might have an `LC_GLOBAL` entry like the following:

    LC_GLOBAL
        {
        CENTRAL_HOST       = "quahog"
        LOGPREFIX          = "/usr/lclog"
        BACKUP_HOST        = "orca"
        BACKUP_LOGPREFIX   = "/usr/backuplog"
        IPCKEY             = 0xe1e1e1e1
        }

2. Set the BEA_LC_IPCKEY environment variable to the new value before starting the `stop_messaging`, `show_config`, `log_monitor`, or `msg_test` commands. Use the following command on UNIX with C-shell:

    setenv BEA_LC_IPCKEY 0xe1e1e1e1

Use the following command on Windows NT, at a DOS prompt:

    SET BEA_LC_IPCKEY 0xe1e1e1e1

## BEA_LC_CONF_SERVICE

The BEA_LC_CONF_SERVICE environment variable defines the name of the User Datagram Protocol (UDP) service used for communication between the `start_messaging` process on a managed node to the `start_messaging` process on the central host. The default value is `lc_conf`. This value is defined during installation. That value, whether `lc_conf` or some other name, must be added to the services database (`/etc/services` on UNIX) by the system administrator. If the administrator adds some value other than `lc_conf`, then you make that specification in the BEA_LC_CONF_SERVICE environment variable.

You should set this value on the central host as well as all managed nodes before starting the `start_messaging` process.

### Using a Different UDP Communication Service

The following steps show how to assign a different value from the default to the communication service. These steps change from the default of `lc_conf` to `lc_conf_tux`.

1. Add `lc_conf_tux` as a UDP service in the services database (`/etc/services` on UNIX). For example:

    lc_conf_tux      7011/udp

You may need the help of your systems administrator to make this change.

2. Set the BEA_LC_CONF_SERVICE environment variable to the new value. Use the following command on UNIX with C-shell:

    setenv BEA_LC_CONF_SERVICE lc_conf_tux

Use the following command on Windows NT, at a DOS prompt:

    SET BEA_LC_CONF_SERVICE lc_conf_tux

## BEA_SM_BEAMGR_CONF

The BEA_SM_BEAMGR_CONF environment variable specifies the location of the BEA Manager configuration file that contains the `TRAP_HOST` entry. `TRAP_HOST` entries define the location of SNMP management stations that are configured to receive SNMP traps from Log Central.

On UNIX, the default location is `/etc/beamgr.conf`; on NT, the default location is `C:\etc\beamgr.conf`. If you wish to use a file location other than the default, you should set the BEA_SM_BEAMGR_CONF environment variable to point to the other location.

You should set this value on the central host as well as all managed nodes before starting the `start_messaging` process.

### Setting a New Location for the BEA Manager Configuration File

The following steps show how to assign a different value from the default for the location of the BEA Manager configuration file. The BEA_SM_BEAMGR_CONF environment variable must contain the absolute path of the file, including the name of the file.

- Use the following command on UNIX with C-shell:

    setenv BEA_SM_BEAMGR_CONF /usr/home/myconfig.conf

- Use the following command on NT, at a DOS prompt:

    SET BEA_SM_BEAMGR_CONF C:\usr\homemyconfig.conf