You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing `pmon3` for the first time, both installation methods provided above should automatically enable and start the service. if the `pmond` service does not start automatically, you need to manually start the service.
Parameter arguments need to use the absolute path.
143
145
144
-
####View List [ list/ls ]
146
+
### View List [ list/ls ]
145
147
146
-
```
148
+
```bash
147
149
pmon3 ls
148
150
```
149
151
150
-
####Top Native [ topn ]
152
+
### Top Native [ topn ]
151
153
152
154
This will output the resource utilization of all processes using the native `top` command that is pre-installed on most unix-based operating systems. It will only show those processes managed by (and including) the `pmond` process. The output is updated every few seconds until the process is terminated using Ctrl+C.
All configuration changes are effective when the next command is issued - restarting pmond is unnecessary.
274
+
252
275
The configuration values can be overridden using environment variables:
253
276
254
277
@@ -258,6 +281,7 @@ The configuration values can be overridden using environment variables:
258
281
*`CONFIGOR_HANDLEINTERRUPTS`
259
282
*`CONFIGOR_CMDEXECRESPONSEWAIT`
260
283
*`CONFIGOR_IPCCONNECTIONWAIT`
284
+
*`CONFIGOR_DEPENDENTPROCESSENQUEUEDWAIT`
261
285
*`CONFIGOR_ONPROCESSRESTARTEXEC`
262
286
*`CONFIGOR_ONPROCESSFAILUREEXEC`
263
287
*`CONFIGOR_POSIXMESSAGEQUEUEDIR`
@@ -270,15 +294,9 @@ The configuration values can be overridden using environment variables:
270
294
## Application(s) Config
271
295
272
296
By default, when `pmond` is restarted from a previously stopped state, it will load all processes in the database that were previously running, have been marked as stopped as a result of pmond closing and have `--no-autorestart` set to false (default value).
297
+
If applications are specified in the Apps Config, they will overwrite matching processes which already exist in the database.
273
298
274
-
#### Criteria
275
-
When an application config is provided `pmond` will instead refer to the `apps` array specified based on the following criteria:
276
-
1. When `pmond` is starting from a fresh install
277
-
2. When `pmon3` successfully executes a [drop](#pmon3_drop) command followed by running an [init](#pmon3_init) command.
278
-
279
-
If [init](#pmon3_init) is ran while there are still stopped process in the database (resulting from `pmond` daemon restart or [kill](#pmon3_kill), the Application config will *NOT* be used, and instead the previously-stopped process will be restarted.
Depenencies can be provided as a json array and determine the order in which the processes are booted. They are sorted using a directed acyclic graph meaning that there cannot be cyclical dependencies between processes (for obvious reasons). Dependecy resolution can be debugged using the [dgraph](#pmon3_dgraph) command. Parent processes can wait [n] amount of seconds between spawning dependent processes by utilziing the `dependent_process_enqueued_wait` configuration variable which currently defaults to 2 seconds.
347
+
348
+
349
+
### Flags
350
+
325
351
All possible `flags` values matching those specified in the [exec](#exec_flags) command:
326
352
327
353
* user
@@ -331,6 +357,7 @@ All possible `flags` values matching those specified in the [exec](#exec_flags)
331
357
* args
332
358
* env_vars
333
359
* name
360
+
* dependencies
334
361
335
362
<aname="section_events"></a>
336
363
## Event Handling With Custom Scripts
@@ -342,13 +369,13 @@ on_process_restart_exec: ""
342
369
on_process_failure_exec: ""
343
370
```
344
371
345
-
#### 1. Specify the executable script to run for the `on_process_restart_exec` value. `pmond` will pass a json-escaped string of the process details as the first argument.
372
+
### 1. Specify the executable script to run for the `on_process_restart_exec` value. `pmond` will pass a json-escaped string of the process details as the first argument.
@@ -468,12 +495,12 @@ If there is a path in the parameters you pass, please use the absolute path. The
468
495
469
496
`pmon3` provides Bash automation. If you find that the command cannot be automatically provided, please install `bash-completion` and exit the terminal to re-enter:
470
497
471
-
```shell
498
+
```bash
472
499
sudo yum install -y bash-completion
473
500
```
474
501
475
502
#### Using ZSH instead of Bash
476
-
```shell
503
+
```bash
477
504
autoload -U +X compinit && compinit
478
505
autoload -U +X bashcompinit && bashcompinit
479
506
sudo sh -c "pmon3 completion zsh > /etc/profile.d/pmon3.sh"
If you encounter the error above, make sure the `pmond` service has started successfully.
486
513
487
-
```shell
514
+
```bash
488
515
sudo systemctl start pmond
489
516
```
490
517
@@ -493,13 +520,13 @@ sudo systemctl start pmond
493
520
You should only use `sudo` to start the `pmond` process which requires superuser privileges due to the required process forking commands. However, the `pmon3` cli should be used *without* `sudo` to ensure that the spawned processes are attached to the correct parent pid. When using `sudo`, the processes will be attached to ppid 1 and as a result, will become orphaned if the `pmond` process exits prematurely. Using `sudo` also prevents non-root users from being able to access the log files. The following Makefile command applies the adequate non-root permissions to the log files.
494
521
495
522
#### Applying permissions
496
-
```shell
523
+
```bash
497
524
#This is automatically called by make systemd_install
498
525
make systemd_permissions
499
526
```
500
527
501
528
#### Spawn a new process as the root user without using `sudo`
0 commit comments