ProcessControl Quick Start
- Create a new folder called “ProcessControl” under “C:\Program Files (x86)\”
- Download the entire zipped repository from GitHub (or clone it if you want)
- Open the zip file and copy all the contents from “ProcessControl\bin\Release\” into “C:\Program Files (x86)\ProcessControl\”
- Navigate to “C:\Program Files (x86)\ProcessControl\” and double-click “ProcessControl.exe”
- This will not actually launch the service, but trying to execute the application will ensure you have the needed .Net framework
- Use the provided tool “srvinstw” to register ProcessControl.exe as a Windows service
- Run as default, so it has access to the processes.
- Choose Auto or Manual based on your needs.
- Adjust the XML config file “ProcessControlParams.xml” as desired, refer to configuration details below
- Start the server
There are two configuration files:
ProcessControl.xml is the main application configuration. This has settings for the location of the ProcessControlParams.xml (if you want to host the service and associated files in another location outside of Program Files). As well a setting for the interval to recheck process attributes, by default this is every 15 minutes.
The second XML file, ProcessControlParams.xml, is the meat of the application. The first configuration line with the process name ‘Default’ will adjust the affinity of ALL processes. This is a baseline reset which allows you to clear off a core. The priority control does NOT work for Default. The next line, copied and pasted as many times as you need; adjusts the process of your choosing. You can adjust the priority and/or affinity of (almost) any process (there are a few system processes you cannot control). Here is a quick look at the XML:
Priority – these are the standard options:
Affinity – this is a little more tricky and controlled by a number to represent all the different configuration options. Below are documented the common options I’ve used in up to an 8 core environment. The options are also documented in the ProcessControlParams.xml file when you download. If you want a combination that is not documented and don’t want to do the math; simply manually set a process to the desired state before starting the service. Step one in launching it to log the status of all existing processes. On the off change you discover more, please update the file on GitHub?
All 8 = 255
4-7 = 240
2,3 = 12
0,1 = 3
4,5 = 48
6,7 = 192
1,2 = 3
ProcessControl will log into the Windows Application event log. Successful process changes, as well as errors and full exception catch output will all be put into event entries. If you’re having problems with the service, it’s a good bet the information will be in the application log.