contents.gifindex.gifprev1.gifnext1.gif

2.12.3 Starting and using acushare

The program acushare manages both the network license agreement and any shared code segments used by the ACUCOBOL-GT runtime system. On UNIX systems, acushare runs as a background server process that responds to requests from various client runtimes (a "daemon" in UNIX terminology).

Acushare has several command line formats. These are as follows:

acushare -start [ -e errorfile ]
acushare -kill
acushare -version
acushare

These command-line formats are described below.

-start

Use the "-start" option to run the shared memory and license manager. A successful start creates a background process to manage network usage (license management) and to manage shared code.

Typically, you will want to have acushare automatically start each time you boot your system. Most UNIX machines have a file that contains instructions to execute each time you start your machine. The name of this file varies from UNIX system to UNIX system. Typical names are "/etc/rc.local", "/etc/brc" or "/etc/rc". Identify the proper startup file and add lines similar to the following:

if [ -f /usr/etc/acushare ]; then
echo Starting ACUCOBOL-GT shared-code and license daemon > \ /dev/console
/usr/etc/acushare -start > /dev/console
fi

This assumes that you have placed acushare in "/usr/etc". You may need to adjust these sample lines to match the conventions used by your machine.

While acushare is running, error output is appended to the file specified by the "-e" command line option. If you do not use "-e", then acushare will attempt to direct error output to "/dev/console". If that fails, it will attempt to append to a file named "acushare.err" in the current directory. If that also fails, then acushare will print the message "acushare: can't open error output file" on the standard output and acushare will quit.

Error messages from acushare consist of "acushare: ", the date and time of the error, and a one line description, such as:

Timeout waiting for reply from acushare

-kill

In order to protect itself, acushare ignores all signals sent to it, except the uncatchable signal #9. Therefore, it is dangerous to kill acushare with conventional methods.

You may halt acushare only with its own "-kill" option or with "kill -9". The "-kill" option is highly recommended because it causes acushare to perform an orderly shutdown, so you avoid manual cleanup. The only time "kill -9" can be used safely is during system shutdown.

If you kill acushare with "kill -9", then you have a disorderly shutdown, and you will need to manually clean up shared memory and the message queues. You can do this with the UNIX utility "ipcrm". Use "ipcs" and acushare's key, "0x01DCF4C9", to determine acushare's id number (id#) in the message queue and in the shared memory queue. Then type the command "ipcrm -q id#" to clear the message queue, and then "ipcrm -m id#" to clear the memory queue.

-version

This option causes acushare to print its version number.

no options

If you type the acushare command without any options, and acushare is not already running, you receive a message showing the available options.

If you type the acushare command without any options, and acushare is already running, you receive a report on standard output that includes the following information:

gt490000.gif acushare version number and copyright (the version is that of the acushare daemon that is running, not the acushare program that is displaying the report)


For shared memory:

gt490000.gif all programs sharing code

gt490000.gif compile dates of those programs

gt490000.gif code sizes of those programs

gt490000.gif number of users of each shared program

gt490000.gif summary of the total number of shared programs

gt490000.gif total amount of memory the programs occupy

gt490000.gif approximate total memory savings

gt490000.gif number of (UNIX) shared memory ID requests satisfied

gt490000.gif total number of (UNIX) shared memory ID requests

gt490000.gif number of failures attaching shared memory


For network license management:

gt490000.gif product name (ACUCOBOL-GT or AcuServer) and serial number

gt490000.gif maximum number of runtime users allowed

gt490000.gif current number of active runtime users

gt490000.gif current number of active runtime processes

gt490000.gif username and process count, for each active runtime user