Skip to content

Commit 3e6f028

Browse files
committed
Updated documentation
1 parent 4abec0e commit 3e6f028

33 files changed

Lines changed: 553 additions & 556 deletions

docs/README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
![Logo Process Governor](images/github-banner-readme.png)
1+
![Logo Process Governor](images/headers/github-banner-readme.png)
22

33
---
44

55
**Process Governor** is a Python utility designed to manage Windows processes and services by adjusting their
66
priorities, I/O priorities, and core affinity based on user-defined rules.
77

8-
<details>
9-
<summary>Screenshots</summary>
10-
11-
>![tray_menu_screenshot.png](images/tray_menu_screenshot.png)
12-
>
13-
>![audio_artiacle_rule_configurator_screenshot.png](images/audio_artiacle_rule_configurator_screenshot.png)
14-
>
15-
>![rule_configurator_with_error_screenshot.png](images/rule_configurator_with_error_screenshot.png)
16-
</details>
17-
18-
## Features
8+
### Features
199

2010
- Adjust process and service priorities for better performance.
2111
- Control I/O priorities to optimize resource utilization.
2212
- Define core affinity for processes.
23-
- Fine-tune Windows services and processes based on [user-defined rules](ui_rule_configurator.md).
24-
- Continuous monitoring of the configuration file for rule application.
25-
- Ability to add ProcessGovernor to autorun.
13+
- Fine-tune Windows services and processes based on user-defined rules.
14+
15+
### Screenshots
16+
17+
<details>
18+
<summary>Click to expand</summary>
19+
20+
> ![process_list.png](images/screenshots/process_list.png)
21+
>
22+
> ![process_rules.png](images/screenshots/process_rules.png)
23+
>
24+
> ![tray_menu.png](images/screenshots/tray_menu.png)
25+
</details>
2626
2727
## Getting started
2828

@@ -33,18 +33,19 @@ To get started with **Process Governor**, follow these steps:
3333
2. Run the `Process Governor.exe` executable with **administrative privileges**.
3434
This is important to allow the program to make the necessary adjustments to process and service priorities, I/O
3535
priorities, and core affinity.
36-
3. [Configure the rules](ui_rule_configurator.md) for processes and services.
36+
3. Configure the rules for processes and services.
37+
4. **Optionally**, you can enable auto-start for the program to launch automatically with
38+
the system.
3739

3840
You can close the program by accessing the tray icon.
3941

4042
## Knowledge base
4143

42-
- [Configuring rules](ui_rule_configurator.md)
44+
- [Process Governor UI](ui_process_governor.md)
45+
- [Rule Behavior and Tips](rule_behavior_and_tips.md)
4346
- [Configuration file](configuration_file.md)
4447
- [Running from source and creating a portable build](run_and_build.md)
45-
- **Tips and Tricks**
46-
- [Optimizing Audio](tips'n'tricks/audio.md)
47-
- [Optimizing Games](tips'n'tricks/game_optimization.md)
48+
4849
## License
4950

5051
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](../LICENSE) file for details.

docs/configuration_file.md

Lines changed: 130 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -4,110 +4,181 @@
44

55
---
66

7-
The `config.json` configuration file is used to manage the behavior of the **Process Governor** application. It allows
8-
you to define how the application will regulate the priorities of processes and services, their I/O priorities, and
9-
correspondence to CPU cores.
7+
The `config.json` configuration file manages the behavior of the **Process Governor** application. This file allows
8+
users to define rules for regulating process priorities, I/O priorities, and CPU core affinity, as well as manage
9+
services with similar settings.
1010

11-
The configuration file is regularly checked by the application and applied if there are changes.
11+
The application regularly checks the configuration file for changes and applies the updates accordingly.
1212

13-
### Configuration File Example
13+
---
14+
## Configuration File Example
15+
16+
Below is an example of the configuration file with several rules defined for processes and services:
1417

15-
In this example, two rules are defined: one for a process and one for a service.
18+
<details>
19+
<summary>See an example</summary>
1620

1721
```json
1822
{
1923
"ruleApplyIntervalSeconds": 1,
20-
"logging": {
21-
"enable": true,
22-
"level": "WARN",
23-
"maxBytes": 1024,
24-
"backupCount": 1
25-
},
26-
"rules": [
24+
"processRules": [
25+
{
26+
"selectorBy": "Name",
27+
"selector": "aida_bench64.dll",
28+
"force": "N"
29+
},
30+
{
31+
"selectorBy": "Name",
32+
"selector": "bg3*.exe",
33+
"affinity": "0-15",
34+
"force": "N",
35+
"delay": "30"
36+
},
37+
{
38+
"selectorBy": "Name",
39+
"selector": "logioptionsplus_*.exe",
40+
"priority": "Idle",
41+
"ioPriority": "Low",
42+
"affinity": "0-15",
43+
"force": "N"
44+
},
45+
{
46+
"selectorBy": "Name",
47+
"selector": "discord.exe",
48+
"priority": "Normal",
49+
"affinity": "0-15",
50+
"force": "Y"
51+
},
2752
{
28-
"processSelector": "example.exe",
29-
"priority": "High",
30-
"ioPriority": "Normal",
31-
"affinity": "1;3-5"
53+
"selectorBy": "Name",
54+
"selector": "audiodg.exe",
55+
"priority": "Realtime",
56+
"affinity": "16-23",
57+
"force": "N"
3258
},
3359
{
34-
"serviceSelector": "Audio*",
60+
"selectorBy": "Name",
61+
"selector": "*",
62+
"affinity": "0-15",
63+
"force": "N"
64+
}
65+
],
66+
"serviceRules": [
67+
{
3568
"priority": "Realtime",
36-
"ioPriority": "High",
37-
"affinity": "0;2;4"
69+
"selector": "*audio*",
70+
"force": "N"
3871
}
39-
]
72+
],
73+
"version": 3
4074
}
4175
```
76+
</details>
77+
78+
---
4279

4380
## Structure of the `config.json`
4481

45-
The configuration file consists of several key sections:
82+
The configuration file contains several sections, each serving a specific purpose.
4683

4784
### `ruleApplyIntervalSeconds`
4885

49-
This parameter defines the interval in seconds at which rules will be applied to processes and services. The default
50-
value is `1`, which means that rules are applied every second.
86+
This parameter defines the interval, in seconds, at which the application applies the rules to processes and services.
87+
The default value is `1`, meaning rules are applied every second.
5188

52-
### `logging`
89+
### `processRules`
5390

54-
This section contains logging settings. It allows you to enable or disable logging, set the logging level, the maximum
55-
size of the log file, and the number of backup log files to keep.
91+
This section lists the rules applied to processes. Each rule object specifies how the application should manage a
92+
process based on several key parameters:
5693

5794
#### Possible parameters:
5895

59-
- `enable`: Enables or disables logging.
60-
- `level`: The logging level (`INFO`, `WARN`, etc.).
61-
- `maxBytes`: The maximum size of the log file in bytes.
62-
- `backupCount`: The number of backup log files.
63-
64-
### `rules`
65-
66-
This section defines the list of rules by which **Process Governor** will manage processes and services. Each rule is
67-
defined by an object with a set of parameters.
68-
69-
#### Possible parameters:
96+
- **`selectorBy`** (string): Determines how the `selector` value is interpreted for process matching.
97+
**Valid values:**
98+
- `"Name"`: Match by process name (e.g., `"notepad.exe"`).
99+
- `"Path"`: Match by full executable path (e.g., `"C:/Windows/System32/notepad.exe"`).
100+
- `"Command line"`: Match by command line (e.g., `"App.exe Document.txt"`).
70101

71-
- `processSelector` (string, optional): Specifies the process name or pattern to match.
72-
You can use wildcards, including `*` and `?`, to match multiple processes.
73-
- Example: `"processSelector": "example.exe"`
74-
- Example with wildcards: `"processSelector": "logioptionsplus_*.exe"`
75102

103+
- **`selector`** (string): Specifies the name, pattern, or path to the process.
104+
**Supported wildcards:**
105+
- `*`: Matches any number of characters.
106+
- `?`: Matches a single character.
107+
- `**`: Matches any sequence of directories.
76108

77-
- `serviceSelector` (string, optional): Specifies the service name or pattern to match.
78-
You can use wildcards, including `*` and `?`, to match multiple services.
79-
- Example: `"serviceSelector": "MyService"`
80-
- Example with wildcards: `"serviceSelector": "Audio*"`
109+
**Examples:**
110+
- `"selector": "name.exe"`
111+
- `"selector": "logioptionsplus_*.exe"`
112+
- `"selector": "C:/Program Files/**/app.exe --file Document.txt"`
81113

82114

83-
- `priority` (string, optional): Sets the process or service priority.
84-
Valid values are:
115+
- **`priority`** (string, optional): Sets the priority level of the process.
116+
**Valid values:**
85117
- `"Idle"`
86118
- `"BelowNormal"`
87119
- `"Normal"`
88120
- `"AboveNormal"`
89121
- `"High"`
90122
- `"Realtime"`
91-
- Example: `"priority": "High"`
123+
124+
**Example:** `"priority": "High"`
92125

93126

94-
- `ioPriority` (string, optional): Sets the I/O priority for the process or service.
95-
Valid values are:
127+
- **`ioPriority`** (string, optional): Sets the I/O priority of the process.
128+
**Valid values:**
96129
- `"VeryLow"`
97130
- `"Low"`
98131
- `"Normal"`
99-
- `"High"`: Setting the I/O priority to "High" may result in an AccessDenied error in most cases.
100-
- Example: `"ioPriority": "Normal"`
132+
133+
**Example:** `"ioPriority": "Low"`
101134

102135

103-
- `affinity` (string, optional): Specifies CPU core affinity.
104-
You can define affinity as:
136+
- **`affinity`** (string, optional): Sets the CPU core affinity for the process.
137+
**Formats:**
105138
- Range (inclusive): `"affinity": "0-3"`
106139
- Specific cores: `"affinity": "0;2;4"`
107140
- Combination: `"affinity": "1;3-5"`
108141

109-
### Validation
110142

111-
Built-in validation prevents the simultaneous assignment of `processSelector` and `serviceSelector` within a single
112-
rule. If you attempt to set both parameters, the program will notify you of the error and require you to correct the
113-
rule.
143+
- **`force`** (string, optional): Forces the application of the settings.
144+
**Valid values:**
145+
- `"Y"` for continuous enforcement.
146+
- `"N"` for one-time application.
147+
148+
149+
- **`delay`** (integer, optional): Delay in seconds before applying the settings.
150+
**Examples:**
151+
- If not specified, the settings are applied immediately.
152+
- Positive values set a delay in seconds before applying the settings.
153+
154+
### `serviceRules`
155+
156+
This section contains a list of rules applied to services. Unlike `processRules`, the **Service Rule** does not include
157+
the `selectorBy` field because service rules only match by service name using the `selector` field.
158+
159+
#### Possible parameters:
160+
161+
- **`selector`** (string): Specifies the name or pattern of the service to match.
162+
**Supported wildcards:**
163+
- `*`: Matches any number of characters.
164+
- `?`: Matches a single character.
165+
166+
**Examples:**
167+
- `"selector": "ServiceName"`
168+
- `"selector": "*audio*"`
169+
170+
Other parameters such as `priority`, `ioPriority`, `affinity`, `force`, and `delay` are similar to those
171+
in `processRules`.
172+
173+
### `version`
174+
175+
This field specifies the version of the configuration. It is required for ensuring proper migration and updates when the
176+
program configuration changes over time.
177+
178+
---
179+
180+
## Validation
181+
182+
The configuration file undergoes validation to ensure consistency and correctness. If there are any issues, such as
183+
invalid parameter combinations or missing required fields, the application will notify the user and prevent the
184+
configuration from being applied until the errors are resolved.
-18.2 KB
Binary file not shown.

docs/images/game-theme-header.png

-38.5 KB
Binary file not shown.
-14.9 KB
Binary file not shown.
File renamed without changes.
-22.5 KB
Binary file not shown.
-25.1 KB
Binary file not shown.
2.21 KB
Loading
50.9 KB
Loading

0 commit comments

Comments
 (0)