|
This functionality is a +PxPlus Exclusive |
|||
| Invocation: | RUN "*plus/winutl/service" | ||
| Description | The
"*plus/winutl/service" utility
provides a facility similar to the Unix/Linux 'inittab'
functionality. It allows the application developer to
have a series of processes spawned and monitored in the
background of a Windows system. To install (or uninstall) the service, RUN "*plus/winutl/service". If the service is not already installed, it will ask if you would like it installed and for the configuration settings (starting directory). It will then install into your Windows services registry. You may have to run PxPlus as an administrator in order to have the registry updates take effect. Once installed, you need to go to the Windows Control panel where, in the service section, you should now find the PxPlusInit service. The defaults are set for automatic start on reboot and interactive. You may change these as desired and then start the process or reboot to have the system start it. |
||
| Inittab Entries | The
file *plus/winutl/inittab contains the
information regarding the tasks to be started and/or
monitored by the service. It consists of a text file
containing a list of tasks to run. Each line that starts with a alpha character must describe a task/process to run in the following format: For tasks that will be started only once during service startup:
For tasks that will be started during service startup then monitored and restarted should they terminate:
Task that you don't want started (or terminate if running) can have the option off as in:
In the scenarios above:
If the first word on the command line is "pxplus", the service will replace it with the current pathname to PxPlus and the spawned task will have FID(0) set the taskid.
The initab file is scanned when the service is started and rescanned every 5 seconds to see if it has changed. To add/drop entries from the inittab, simply edit the file and the service will process the changes, generally within 5 seconds. |
||
| *Note* | Should a task marked as 'respawn' have to be relaunched more than 10 times within a 1-minute interval, the system will cease launching it until the inittab is changed. | ||
| Logging | The
service keeps track of its activity in the file "*plus/winutl/inittab.log".
This file will contain the last 1000 events with each
event being recorded with a date/time stamp. No maintenance is required on this file, as it will automatically limit itself to 1000 entries, dropping older entries, as needed. |
||