Newer
Older
# Supervisor-vms: A Process Control System for OpenVMS
Supervisor-vms is a tools that allows to monitor and control a number of processes on OpenVMS systems.
Use process termination mailbox and AST. No CPU usage if no event occurs.
- [Supervisor-vms: A Process Control System for OpenVMS](#supervisor-vms-a-process-control-system-for-openvms)
- [Requirements](#requirements)
- [Components](#components)
- [Running supervisord](#running-supervisord)
- [supervisord Command-Line Options](#supervisord-command-line-options)
- [Running supervisorctl](#running-supervisorctl)
- [supervisorctl Command-Line Options](#supervisorctl-command-line-options)
- [Configuration file](#configuration-file)
- [File Format](#file-format)
- [**\[supervisord\]** Section Settings](#supervisord-section-settings)
- [**\[supervisord\]** Section Values](#supervisord-section-values)
- [**\[program:x\]** Section Settings](#programx-section-settings)
- [**\[program:x\]** Section Values](#programx-section-values)
Read the supervisor documentation is probably a good idea. Many of configuration parameters are the same.
Probably better to use the LD image which contains all the necessary modules.
The server piece of supervisor is named supervisord.<br>
It is responsible for starting processes (programs) at its own invocation, responding to commands from clients, restarting crashed or exited processeses
The server process uses a configuration file.
**supervisorctl.py**
The command-line client piece of the supervisor is named supervisorctl.
It provides a shell-like interface to the features provided by supervisord.
From **supervisorctl**, a user can connect to the **supervisord** process, get status on the processes controlled by, stop and start processes of, and get lists of running processes (programs).
The command-line client talks to the server across a mailbox (SUPERVISORD_CMD logical)
Required privileges: **ALTPRI, SYSNAM, PRMMBX, IMPERSONATE, SETPRV, WORLD**
First create a **supervisord.conf**, you can use the template **supervisord.conf_template** as an example.
Then start **supervisord**, probably in **nodaemon** mode initially.
Finally, if all seem correct, shutdown it and restart it on daemon mode.
Running processes doesn't need to be stopped.<br>
When restarting **supervisord** find the necessary informations for running processes using the logical name table **SUPERVISORD_TABLE**.
<dl>
<dt><strong>-c FILE, --configuration=FILE</strong></dt>
<dd>The path to a **supervisord** configuration file. Unix syntax should be used</dd>
<dt><strong>-n, --nodaemon</strong></dt>
<dd>Run supervisord in the foreground</dd>
<dt><strong>-p pwd, --password=pwd</strong></dt>
<dd>Optional password, used with <strong>supervisorctl</strong></dd>
<dt><strong>-h, --help</strong></dt>
<dd>Show supervisord command help</dd>
</dl>
## Running supervisorctl
Required privilege: **PRMMBX, SYSNAM**
### supervisorctl Command-Line Options
<dl>
<dt><strong>-c FILE, --configuration=FILE</strong></dt>
<dd>The path to a <strong>supervisord</strong> configuration file. Unix syntax should be used</dd>
<dt><strong>-p pwd, --password=pwd</strong></dt>
<dd>Optional password, used with <strong>supervisord</strong></dd>
<dt><strong>-h, --help</strong></dt>
<dd>Show supervisord command help</dd>
</dl>
<dl>
<dt><strong>help</strong></dt>
<dd>Print a list of available actions</dd>
<dt><strong>help <action></strong></dt>
<dd>Print help for <action></dd>
<dt><strong>start <name></strong></dt>
<dd>Start a process</dd>
<dt><strong>start <name> <name></strong></dt>
<dd>Start multiple processes</dd>
<dt><strong>start all</strong></dt>
<dd>Start all processes</dd>
<dt><strong>status</strong></dt>
<dd>Get all process status info.</dd>
<dt><strong>status <name></strong></dt>
<dd>Get status on a single process by name</dd>
<dt><strong>status <name> <name></strong></dt>
<dd>Get status on multiple named processes</dd>
<dt><strong>stop <name></strong></dt>
<dd>Stop a process</dd>
<dt><strong>stop <name> <name></strong></dt>
<dd>Stop multiple processes</dd>
<dt><strong>stop all</strong></dt>
<dd>Stop all processes</dd>
<dd>Stop <strong>supervisord</strong>, don't stop processes</dd>
## Configuration file
The Supervisor configuration file is conventionally named supervisord.conf. <br>
It is used by both **supervisord** and **supervisorctl**.
### File Format
**supervisord.conf** is a Windows-INI-style (Python ConfigParser) file.<br>
It has sections (each denoted by a **[header]**) and key / value pairs within the sections.<br>
The sections and their allowable values are described below.
<dl>
<dt><strong>nodaemon</strong></dt>
<dd>If true, supervisord will start in the foreground instead of daemonizing<br>Default: false</dd>
<dt><strong>user</strong></dt>
<dd>OpenVMS account to run <strong>supervisord</strong> as a detach process (daemon mode).<br> Default: system</dd>
<dt><strong>command</strong></dt>
<dd>Command procedure which run supervisord.<br>Default: None, should be specified, can be build from the template
supervisord.com_template</dd>
<dt><strong>stdout_file</strong></dt>
<dd>stdout of supervisord process.<br>Default: NLA0:</dd>
<dt><strong>logfile</strong></dt>
<dd>The path to the activity log of the supervisord process<br>Default: supervisord.log</dd>
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
</dl>
### **[program:x]** Section Settings
The configuration file must contain one or more program sections in order for supervisord to know which programs it should start and control.<br>
The header value is composite value.
<br>It is the word “program”, followed directly by a colon, then the program name.<br>
Read the *[$creprc](https://docs.vmssoftware.com/vsi-openvms-system-services-reference-manual-a-getuai/#JUN_147)* documentation may be useful.
#### **[program:x]** Section Values
<dl>
<dt><strong>image</strong></dt>
<dd>Name of the image to be activated in the newly created process<br>
Default: <strong>SYS$SYSTEM:LOGINOUT.EXE</strong></dd>
<dt><strong>command</strong></dt>
<dd>Equivalence name to be associated with the logical name SYS$INPUT in the logical name table of the created process<br>
Default: NLA0:</dd>
<dt><strong>process_name</strong></dt>
<dd>Process name to be assigned to the created process.<br>
Default: %(program_name)s</dd>
<dt><strong>user</strong></dt>
<dd>Instruct supervisord to use this OpenVMS user account as the account which runs the program.<br>
Default: None, mandatory</dd>
<dt><strong>autostart</strong></dt>
<dd></dd>
<dt><strong>stdout_file</strong></dt>
<dd></dd>
<dt><strong>stderr_file</strong></dt>
<dd></dd>
<dt><strong>startsecs</strong></dt>
<dd></dd>
<dt><strong>startretries</strong></dt>
<dd></dd>
<dt><strong>stopwaitsecs</strong></dt>
<dd></dd>
<dt><strong>kt_limit</strong></dt>
<dd></dd>
<dt><strong>baspri</strong></dt>
<dd></dd>
<dt><strong>nouaf</strong></dt>
<dd></dd>
<dt><strong>quotas</strong></dt>
<dd></dd>
<dt><strong>privileges</strong></dt>
<dd></dd>
<dt><strong>autorestart</strong></dt>
<dd></dd>
<dt><strong>exitcodes</strong></dt>
<dd></dd>
</dl>