ELMD(1)

NAME
elmd - vendor daemon

SYNOPSIS
elmd [ -D -e path -f -i -l file -m size -n -p # -r file -s # -v # -z # ]

DESCRIPTION
The elmd command starts the vendor daemon. This should usually be executed when the system is booted from your system startup script, usually /etc/rc.local or /etc/inittab on systems or SYS$MANAGER:SYSTARTUP_V5.COM on systems. On , elmd is not run directly but rather is controlled (stopped and started) from a control panel applet. No licensed application will be able to run if elmd is not active.

When running, elmd will process client requests, which include issuing and returning licenses, and interfacing with elmadmin(1) to list the current users of licensed applications.

For each licensed application, there are one or more key files. These files are expected to be found in the a directory. The default key directory is defined by elm_keydir in elm_salt.c. A different key directory or directories may be specified on and with the -e option to elmd, described below. On , the control panel applet has a text entry field in which to specify the key directory. The key directory may also be specified within the client application via elm_init(3) or elm_control(3). Key files may be freely installed or updated while elmd is running. Keys will automatically be reread if elmd detects a modification date change.

The key file itself has the same name as the feature. The file is usually created by elmadmin(1) when the application is first installed. On and this is accomplished via a command of the form:

elmadmin -c alias

If an alternate key location is desired, the command would instead be

elmadmin -c -e keypath alias

On , the ElmAdmin dialog box has a text entry field for the keypath. Any changes made to the keypath through either the control panel applet or ElmAdmin are registered in a central database, so changes made using one GUI will automatically be reflected in the other.

Refer to elmadmin(1) for other options.

Each key file contains the encrypted key which encodes the feature name, the maximum number of licenses available for the feature, and the feature's expiration date. The manager elmd(1) reads this key and will not issue more licenses than indicated or past the expiration date.

WINDOWS USAGE
The primary interface to the daemon is through the control panel. To launch the controller, go to the main program group, double click on "Control Panel", then double click on "ElanLM". A dialog box will pop up with five pushbuttons and three radio buttons.

The radio button group is used to switch between manual and automatic startup. If manual startup is chosen, you must restart the daemon manually each time you restart or reboot . If automatic startup is chosen, then each time the system is restarted the server process will automatically be launched using the most recent settings. You may also choose to "disable" the service on . The "disable" radio button has no effect on .

Three of the five pushbuttons, "Help", "OK", and "Cancel" are self explanatory. Note that the "Cancel" button becomes disabled once an action such as starting or stopping the service has been taken.

The "Settings..." button pops up another dialog box, displaying the current settings of all the initial startup parameters to elmd. If the server is currently running, these are displayed in read-only mode. If the server is not running, then any changes you make in the settings will be recorded and used next time the service is launched. The initial startup parameters are: debug mode (-D), key directory (-e), log file name (-l), log file size limit (-m), resource file name (-r), startup delay (-s), zombie timeout (-z), and verbosity (-v). For more information on each of these parameters, refer to the relevant flag in the "OPTIONS" section below.

The final pushbutton is used to start and stop the elmd service. When the service is already running, this button is labelled "Stop", and when is it not running, it is labelled "Launch". There are two ways to determine whether a service is running or not: 1) by inspection of the control panel applet, and 2) by listing all active servers using ElmQuery. The former method only works on the machine on which the service is running; the latter method must be used to query services on remote machines.

OPTIONS

-D  Debug mode: [1] Cause the log file to be flushed after each message. Normally it is flushed after each packet is processed. (There can be many messages per packet, depending on the verbosity (-v) level.) [2] Allow SIGQUIT to take the default action of creating a core file and exiting. [3] In background mode, do no chdir. Normally, elmd runs with the current working directory set to /.

    The message "DEBUG mode is on" will be printed to the log file if -D is used.

    Please also see the -v flag below for changing the verbosity level of elmd.

-e path
    Optionally specify the key directory, or set of directories, and load all keys found in the directories. If none is specified, the default vendor defined key directory, defined by elm_keydir in elm_salt.c, is used.

    On , directories are specified as a semicolon (;) separated list of directory names. For example:

    elmd -e \local\elan;\local\express;\usr\lib\elm

    will cause elmd to load the key files in the directories \local\elan, \local\express, and then \usr\lib\elm, in that order.

    On systems, directories are specified as a colon (:) separated list of directory names. For example:

    elmd -e /local/elan:/local/express:/usr/lib/elm

    On systems, directories are specified by a comma (,) separated list of directory names. Thus,

    elmd -e DUA1:[ELM],DUA1:[EXPRESS],DUA0:[LOCAL]

    will cause elmd to look for a key file in the directories DUA1:[ELM], DUA1:[EXPRESS], and then DUA0:[LOCAL], in that order.

    A key directory may also be specified within a client with elm_init(3) or the ELMC_SETKEYDIR option of elm_control(3). If so specified, the client's key directory is searched first, followed by those specified with -e, if any.

-f  Normally on , elmd will run in the background (it forks a child process, detaches from the terminal, and the parent exits). The -f option inhibits this, and causes elmd to run in the foreground. One may, for example, wish to run elmd from inittab, instead of /etc/rc.local, with the -f option.

    On systems, elmd always runs in the foreground. To get elmd to run in the background, use a command like

    RUN/DETACHED/PROCESS=ELMD/INPUT=cmdfile -
        /OUTPUT=logfile SYS$SYSTEM:LOGINOUT.EXE

    where cmdfile is the name of a command file containing the elmd command and logfile is the name of a file to which any error messages should be written.

-i  Print the release number, the vendor ID, and exit. The vendor ID provides a way to verify that the same vendor salt is being used among all the commands. The vendor ID should be the same for elmd, elmadmin, elmkey, etc.

    On , this information is displayed in the window title bar of the "Help" screen.

-l file
    Creates a log file named file and writes all relevant information to that file. If the file already exists, elmd will append to the end of the file. Note that file must be a complete path name.

    Use of a log file is highly recommended as it provides a way of tracking problems if they occur. A log file must be enabled for elmrpt(1) to provide reporting information. Note that on , a log file is mandatory.

    Please see -m option also, below.

-m size
    Limit the log file to the size specified. With this option, the log file is "self maintained" by elmd such that elmd limits the size that the log file may grow to. When this size is reached, the log file named file is moved to file.old on systems or file_old on systems and the current log file is truncated.

    The size is an integer or floating point number. The default units are bytes. It may also be specified in kilobytes by suffixing a ``k'' or megabytes by suffixing an ``m'' to the size.

    For efficiency, the log file size is actually checked only every 100 lines, so it might grow a bit beyond the limit before it is backed up and truncated.

-n  Local communication operation for systems without a network. (Not applicable for ). This will force elmd to use DEC Mailboxes on or System V native inter-process communication on . This option is applicable on without DECNET and small systems such as SCO and Interactive UNIX without TCP/IP installed.

    When -n is used with elmd(1), the host argument to elm_init(3) must be set to "LOCAL". This is most easily done by your customers by setting their elm_host variable. (On "NO_DECNET" is a synonym for "LOCAL" for backwards compatibility.)

    Note that on System V, the default inter-process communication queue is quite small; adequate for about two client processes talking to elmd concurrently. Elmd will attempt to increase the queue size, but, since only root can raise the IPC queue size, it must be run as super-user to be effective.

-p #
    Cause elmd to use the port address # instead of the default or one specified by the system service. One might use this option if there was a port address conflict and the user did not have permission to alter the system port services file.

-r file
    Issues licenses to the users according to the specifications in resource file file. See elm_resource(5) for an explanation of this file's format. Note that if this file is changed, elmd will automatically reread it — it is not necessary to restart elmd.

-s #
    Set the startup time to # in seconds. This is the period that elmd waits and listens for client reconnects after a possible crash. The default is 180 seconds (3 minutes.) If you are not on a network, this may be set to zero.

-v #
    Select the verbosity of the messages printed to the log file. When a level is selected, all levels less than or equal to the level are printed. Levels 5 and higher are considered debugging levels. Elmd starts in level 3. The levels are:

    Level | Messages Printed.
    1 | Only error messages.
    2 | License failures.
    3 | License activity.
    4 | Client Connects and disconnects.
    5 | Message for every packet received.
    6 | Message for every packet sent.
    7 | More Client and Zombie information.
    8 | Info about key and resource file.
    9 | Major stuff.

-z #
    Set the zombie to # seconds. If a client is not heard from within this time period, it is declared dead and its licenses are returned. The default and minimum zombie interval is 3 minutes. Note that elmd only cleans up zombies every 60 seconds, so it may take up to 1 minute more for the licenses to be returned.

    An individual client may change its zombie time from this default value via elm_control(3) and ELMC_SETZOMBIE.

UNIX AND VMS EXAMPLES
Here is an example invocation of elmd which might appear in the system startup file /etc/rc.local. It sets the log file to /usr/adm/elm.log and limits the log file size to ¼ megabyte.

if [ -f /etc/elmd ]; then
     echo "`/etc/elmd -i` started." > /dev/console
     /etc/elmd -m 0.25m -l /usr/adm/elm.log > /dev/console fi

Here is an example invocation of elmd which might appear in the system startup file SYS$MANAGER:SYSTARTUP_V5.COM. It sets the log file to DUA1:[ELM]ELM.LOG and limits the log file size to ¼ megabyte.

$ RUN/DETACHED/PROCESS=ELMD/INPUT=SYS$MANAGER:ELMD.COM -
    /OUTPUT=OPA0: SYS$SYSTEM:LOGINOUT.EXE

where the command file SYS$MANAGER:ELMD.COM contains

$ ELMD := $SYS$SYSTEM:ELMD.EXE $ ELMD -M 0.25M -L DUA1:[ELM]ELM.LOG

ADMINISTRATION
If you are using a log file (which is highly recommended) you will need to trim it every so often. On , automatic log file trimming results from setting a limit on the log file size in the control panel applet startup settings. The log file can also be zeroed using ElmCntrl. On and , trimming can be done automatically with the -m option of elmd, or via a nightly daemon spawned from crontab on a system or a nightly batch job on a system and the -z option of elmadmin. The -m variation was illustrated above. Below is an example pair of commands to keep the log file under control with the nightly crontab scheme:

cp /usr/adm/elm.log /usr/adm/elm.log.old
ELMHOST=somehost elmadmin -z

where somehost is the host name where the elmd is running.

Following is a sample batch command file to control the log file size on a system:

$ COPY DUA1:[ELM]ELM.LOG DUA1:[ELM]ELM.LOG_OLD $ ELMHOST = somehost $ ELMADMIN -Z

where somehost is the host name where the elmd is running.

SEE ALSO
elmadmin(1), elmcntrl(1), elmquery(1).