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:
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:
all programs sharing code
compile dates of those programs
code sizes of those programs
number of users of each shared program
summary of the total number of shared programs
total amount of memory the programs occupy
approximate total memory savings
number of (UNIX) shared memory ID requests satisfied
total number of (UNIX) shared memory ID requests
number of failures attaching shared memory
For network license management:
product name (ACUCOBOL-GT or AcuServer) and serial number
maximum number of runtime users allowed
current number of active runtime users
current number of active runtime processes
username and process count, for each active runtime user