Overview

Process Supervisor
(c)2003 Bitsum Technologies, http://www.Bitsum.com
Authored by Jeremy Collake

Topic: Overview and Documentation Index

Process Supervisor is a unique new technology intended to allow for automatic management of running proceses in ways not previously available. Some of the many things Process Supervisor can do are:

  • Automatically restrain processes using up too many CPU cycles until their usage drops. This will allow you to maintain system responsiveness when an application is consuming 100% of the CPU, something that has been a problem for the NT process scheduler since its inception.
  • Have applications default to a specific priority each time they are run. Often times it is desired to always run an application at a priority higher or lower than normal, with Process Supervisor this is made easy.
  • Specify which applications are allowed to run or not allowed to run . With wildcard support and an 'allow' list you can even restrict all applications except for those approved. This is particularly useful for network administrators since they can limit what is allowed to execute on client machines.
  • Perform all these operations on client machines in a network environment since the engine is isolated from the GUI. The engine, ProcessGoverneor, can be installed as a system service or run as a normal application. After installing it on client machines, configuration and log files can be loaded and written to and from a remote path.

Complimenting these capabilities is an easy to use and task manager-like graphical user interface that allows for easy configuration and log/status viewing in addition to manual process manipulation.

The latest version can be checked for by using the 'Check for update' menu option in the GUI or can always be found at http://www.bitsum.com .

Documentation Topics:

  1. Process Supervisor Components
  2. Using the Graphical User Interface (GUI)
  3. Using the Process Governor (engine) Installer
  4. Using the INI Configuration File
  5. Command Line Arguments
  6. Installation in a Network Environment
  7. Licensing

For support please visit Bitsum Technologies on the web at http://www.bitsum.com or email support@bitusm.com . We have a variety of other products for software developers, power users, and network administrators that we invite you to try.


Components

Topic: Process Supervisor Components

Process Supervisor consists of several components that the user should familiarize his or her self with so that he or she may take full advantage of all that this application has to offer. The core engine is separated from the GUI so that it may be easily installed on a network where the client machines may not need the GUI or the server may not need the core engine. The primary applications are listed in the following table.

Component Name | Filename | Brief | Description
Process Supervisor GUI | ProcessSupervisor.exe | The user interface and management console. | This the graphical user interface that serves the purposes of configuring the product, manually managing processes, and displaying current activity by Process Supervisor on both the local and remote machines by viewing the log file in real time. It also provides a graph to view current CPU usage and a listview containing parameters of running processes. In addition to being able to configure the Process Supervisor application, actions such as manual adjustment of process priorities and start-at-boot toggles can be performed. A notification icon of a traffic light exists in the system tray and allows for easy invocation. The GUI is optional, it does not need to be installed for proper operation of Process Governor. For usage documentation, click here.
Process Governor | ProcessGovernor.exe | The core engine that monitors running processes and performs appropriate actions based on the configuration. | This is the core engine of Process Supervisor that watches running processes and performs actions based on the configuration loaded from the INI file created manually or with the GUI. It writes events to a log file whose path is specified in the INI file. Process Governor may be run as either a system service or a normal application. Installation of it can be modified by the InstallProcessMonitor application.
Process Governor Installer | InstallProcessGovernor.exe | Installation and uninstallation program for the core engine, Process Governor | This application is responsible for installing or removing the Processs Governor application. It allows for it to be created as a system service or set to start at user login as a normal application. It is run automatically by the Process Supervisor setup application during the install and uninstall to take appropriate actions. It may also be invoked manually be the user at any time to change the installation configuration of Process Governor.

Other files involved in the operation and installation of Process Supervisor are listed in the table below.

Filename | Description
ProcessControl.dll | A COM object Bitsum Technologies authored to provide basic process services. If any third parties wish to license this COM object, please contact us.
ProSuper.ini | INI file supplying configuration for Process Governor and the Process Supervisor GUI. It is automatically modified as the configuration is changed in the Process Supervisor GUI. It may also be modified manually. It is created the first time the Process Supervisor GUI or Process Governor application is run if it does not already exist. This file is loaded from the same folder as the application referencing it, ProcessGovernor.exe or ProcessSupervisor.exe, unless the command line parameter '/ConfigFile=' provides an alternate configuration file pathname.
ProcessSupervisor.chm | This documentation.
MakeService.exe | A small freeware application that installs Process Governor as a system service if it is configured to do so. This framework allows for Process Governor to exist as a normal win32 application but be run as a system service. This application was created specificially for Process Supervisor, but can be used to turn any wn32 application into an NT system service. To download this product free, visit http://www.bitsum.com . Please do not extract it from Process Supervisor to use for your own purposes and instead download the proper freeware package.
srvstub.exe | Part of the MakeService application's framework. This is the actual system service, which launches Process Governor thus running it as a system service.
launchit.exe | A small application that provides some services for the installer. It is not used elsewhere.


Using the INI Configuration File

Topic: Using the INI Configuration File

To allow for either 'automatic' configuration through the GUI or manual configuration, an INI file is used to indicate all process governing rules and the general configuration of Process Supervisor. By default, ProcessSupervisor.exe and ProcessGovernor.exe both look for the PROSUPER.INI file in the same folder as themselves. However, the path and filename may be modified by supplying to them the '/ConfigFile=' command line parameter. Through this parameter, the INI file may exist in any accessible path, including a remote path.

Here is a glimpse of what a complete INI file might look like:
prosuper.ini configuration file
any line not recognized is ignored

[OutOfControlProcessRestraint]
OocOn=True
ProcessorUsageQuota=95
TimeOverQuotaBeforeRestraint=1500
ProcessorUsageQuotaCausingRestore=20
OocExclusions=cpuapp,devenv.exe,superapp.exe

[Logging]
LogAllProcessesExecuted=False
LogProcessesDisallowed=True
LogDefaultPriorityAdjustments=True
LogOutOfControlProcessesRestrained=True
MaximumLogEntries=1000
LogFolder=C:\Program Files\Bitsum Technologies\Process Supervisor

[Performance]
UpdateSpeed=2000

[ProcessAllowances]
AllowedProcesses=*.*
DisallowedProcesses=*game*,kazaa.exe,quake?.exe,trojan.exe

[ProcessDefaults]
DefaultPriorities=*.scr,idle,taskmgr.exe,above normal

Names encapsulated in '[' and ']' we will refer to as sections. Each section has one or more keys that are set to values. Each key is optional, if it does not exist the default value, as given below, are used. Lines that do not contain a recognized key or section name are ignored. This file is not case sensitive.

Sections:
Section Name | Description | Keys
Performance | Configures performance related parameters. | UpdateSpeed
OutOfControlProcessRestraint | Configures parameters related to restraint of out of control processes (those consuming too many system resources). | OocOn ProcessUsageQuota TimeOverQuotaBeforeRestraint ProcessUsageQuotaCausingRestore OocExclusions
ProcessAllowances | Configures processes allowed and disallowed from execution. | AllowedProcesses DisallowedProcesses
ProcessDefaults | Configures default process priorities. | DefaultPriorities
Logging | Configures logging options. | LogAllProcessesExecuted LogProcessesDisallowed LogDefaultPriorityAdjustments LogOutOfControlProcessesRestrained MaximumLogEntries LogFolder

Defined keys and their accepted values are as follows:
Section Name | Key Name | Description | Accepted Values and Format | Default Value
Performance | UpdateSpeed | The interval between enumerations of running processes by ProcessGovernor and ProcessSupervisor, in milliseconds. The lower the interval more responsive the applications are to changes in running processes, but more CPU cycles are used. | Any non-negative number. It is not recommended to exceed 4000ms or go below 500ms. | 2000
OutOfControlProcessRestraint | OocOn | Toggles out-of-control process restraint on or off. | 'True' if this feature is enabled, 'False' if not. | True
OutOfControlProcessRestraint | ProcessorUsageQuota | The percentage of processor(s) in use that is considered excessive and necessary of restraint when TimeOverQuotaBeforeRestraint elapses. | Range: 1-100. It is not recommended to go below 90. | 95
OutOfControlProcessRestraint | TimeOverQuotaBeforeRestraint | Number of milliseconds above ProcessorUsageQuota before the process priority is lowered. | Any non-negative number. | 1500
OutOfControlProcessRestraint | ProcessUsageQuotaCausingRestore | The percentage of processor(s) in use by a process that is considered a safe enough value to restore a preciously restrained process to its original priority. | 1-100. This value must be equal to or lesser than ProcessorUsageQuota. | 20
OutOfControlProcessRestraint OocExclusions Processes excluded from out-of-control restraint. This is a comma delimitered list of process names. Wildcards are allowed.
Format:
process1,process2,process3
Example:
taskmgr.exe, game*.exe 		None.
ProcessAllowances DisallowedProcesses Processes disallowed to execute. If a process is launched matching a specification in this list, it will be terminated. This is a comma delimitered list of process names. Wildcards are allowed.
Format:
process1,process2,process3
Example:
taskmgr.exe, game*.exe
ProcessAllowances AllowedProcesses Processes allowed to execute. These are only applicable if they match a process specification in the DisallowedProcesses key. For example, if notepad*.exe is lised in DisallowedProcesses and notepad1.exe is listed in AllowedProcesses, then notepad1.exe will be allowed to execute, but notrpad2.exe will not. This is a comma delimitered list of process names. Wildcards are allowed.
Format:
process1,process2,process3
Example:
taskmgr.exe, game*.exe 		None.
ProcessDefaults DefaultPriorities A list of default priorities for processes. This is a comma delimitered list of process names and priorities. Wildcards are allowed. Valid priorities are:
  • Real time
  • High
  • Above normal
  • Normal
  • Below normal
  • Idle

Format:
process1,priority1,process2,priority2
Example:
taskmgr.exe, high,*.scr,idle

None.
Logging | LogAllProcessesExecuted | Toggle logging of all processes executed. | 'True' if enabled, 'False' if not. | False
Logging | LogProcessesDisallowed | Toggle logging of processes terminated because they were disallowed. | 'True' if enabled, 'False' if not. | True
Logging | LogDefaultPriorityAdjustments | Toggle logging of processes whose priority was adjusted to a configured default value. | 'True' if enabled, 'False' if not. | True
Logging | LogOutOfControlProcesses | Toggle logging of processes restrained because they were found to be out-of-control. | 'True' if enabled, 'False' if not. | True
Logging | MaximumLogEntries | The maximum number of log entries. When the log file reaches this limit, it is resized to 80% of this value. | Minimum reasonable value is 10. | 1000
Logging | LogFolder | The folder the log file should be placed in. | Any folder without the log filename. This can be a remote UNC path. | app folder


Using the Process Supervisor GUI

Topic: Using the Process Supervisor GUI

The Process Supervisor GUI is an easy to use application that allows the user to configure the rules governing running processes, view actions taken by Process Governor, enumerate and manipulate running processes, and watch CPU usage on a graph. When run, its main window will be displayed and a notification icon that looks like a traffic light will be placed in the system tray area. Closing the main window will minimize it to the system tray. The main window may be re-opened by selecting the "Show main window" option from the right-click menu on the notification icon.

Subtopics:

  1. Main Window
  2. Menu Options
  3. Configuration Dialogs

Main Window

The main window consists of a CPU utilization graph, a listview of running processes, and a listview of actions recently taken (the log file).

Right clicking on a process will reveal a popup menu that allows for manual adjustment of the process priority as well as configuring it to start at boot, or not.

The panes and the main window may all be resized. The 'close' button on the window results in a minimize to the system tray. To exit the application completely, use the exit option in the file menu.

To configure Process Supervisor's automatic management of processes, select the Configuration menu and choose the appropriate option or select the first toolbar button.

Menu Options

The menu options are available by right clicking on the notification icon in the system tray or through the main window. They all should be fairly self-explanatory.

Configuration Dialogs

The primary configuration dialog looks like this:

The dialog for choosing out-of-control exclusions is:

Disallowed and allowed processes are configured through the following dialog:

Default process priorities are set in this dialog:


Using the Process Governor Installer

Topic: Using the Process Governor Installer

The InstallProcessMonitor.exe application allows for installation or removal of the ProcessGovernor.exe engine. It can be installed as a NT system service or as a normal application invoked at login via the registry Run key. The main dialog looks like this:

Options should be fairly self-explanatory. For assistance email support@bitsum.com .


Command Line Arguments

Topic: Command Line Arguments

Command Line Arguments for ProcessSupervisor.exe
Switch | Description | Examples
/Tray | Causes the main window to not be immediately displayed. | ProcessSupervisor.exe /tray
/ConfigFile= | Indicates the configuration file that should be used. | ProcessSupervisor.exe /ConfigFile="c:\program files\processsupervisor\myconfig.ini" ProcessSupervisor.exe /ConfigFile=c:\config\psconfig.ini ProcessSupervisor.exe /ConfigFile=\\server1\configfiles\prosuper.ini
/LogFolder= | Indicates the folder containing the log files. This folder requires read and write access. | ProcessSupervisor.exe /LogFolder=\\server1\logfolder ProcessSupervisor.exe /LogFolder=c:\pslogs

Command Line Arguments for ProcessGovernor.exe
Switch | Description | Examples
/ConfigFile= | Indicates the configuration file that should be used. | ProcessGovernor.exe /ConfigFile="c:\program files\processsupervisor\myconfig.ini" ProcessGovernor.exe /ConfigFile=c:\config\psconfig.ini ProcessGovernor.exe /ConfigFile=\\server1\configfiles\prosuper.ini
/LogFolder= | Indicates the folder containing the log files. This folder requires read and write access. | ProcessGovernor.exe /LogFolder=\\server1\logfolder ProcessGovernor.exe /LogFolder=c:\pslogs

Command Line Arguments for InstallProcessMonitor.exe
Switch | Description | Examples
/Remove | Indicates that the ProcessGovernor.exe application should be deregistered as a service and/or removed from the run at login registry key. ProcessSupervisor.exe is also removed from the run at login registry key. This is invoked automatically by the product uninstaller. | InstallProcessMonitor.exe /remove
/Installs | Invokes the installation procedures normally run by the installer. You should just re-invoke the installer instead of using this option. | It is recommended to re-invoke the setup application instead.


Installing in a Network Environment

Topic: Installing in a Network Environment

This section describes the procedure to install on a network. There are two basic installation methods for a network environment:

1.) Install Process Supervisor with or without the GUI on all client systems via the installer.
2.) Running Process Supervisor with or without the GUI via a login script or other mechanism to execute it from a remote location.

A third topic in this section describes maintaining and configuring a network installation after it is set up:

3.) Maintaining and configuring the network installation.

1.) Install Process Supervisor with or without the GUI on all client systems via the installer

There are two components to Process Supervisor that require hosting on a server in order to manage all the client installations. The first in the configuration file (prosuper.ini) that defines the behavior of client installations. This file should be placed on a server with read or read/write permission given to client machines. Alternatively, each client machine can have its own configuration file, but then changes of the configuration will require editing of each configuration file.

The second component is the log folder. It is in this folder that logs are stored and actions performed on client machines are recorded. Client machines should have read/write access to this folder.

Process Supervisor should be installed on all client machines and the machines that you will use to monitor client installations.

When installing Process Supervisor the following dialog will be displayed:

The lower three radio boxes are options for a network installation. They are described below:

Option | Description
"This computer hosts the configuration file and logs for a network installation." | This option should be selected if you are installing the product on the server that holds the configuration file or log files. The server(s) that hold these files don't actually have to have process supervisor installed on them, but the option is provided.
"This is a client computer on a network installation of Process Supervisor and I *do* want users to be able to use the graphical user interface." | The graphical user interface is the part of Process Supervisor that displays an icon in the notification (tray) area of the computer and shows running processes, CPU usage, and other related information. If you want users to be able to use this, select this option. Note that if the configuration file is hosted in a folder that only allows read operations, the users will not be able to update the configuration themselves.
"This is a client computer on a network installation of Process Supervisor and I do *not* want users to be able to use the graphical user interface." | The graphical user interface is the part of Process Supervisor that displays an icon in the notification (tray) area of the computer and shows running processes, CPU usage, and other related information. If you do NOT want users to be able to use this, select this option. Note that if the configuration file is hosted in a folder that only allows read operations, the users will not be able to update the configuration themselves.

After selecting the appropriate option, the configuration file and log folder may be chosen. If on a client machine, you should browse for and select the network shares that contain each of these. Make sure the log folder has read/write permission and the configuration file does not (unless you want users to be able to change the global configuration).

One last option is to actually invoke remote copies of the process supervisor executables. They may be hosted on a network server and run from it instead of locally. If you desire this, simply check the applicable checkbox and browse for the folder share that contains the executables.

After pressing the 'Next' button, a second dialog is displayed. This one allows you to choose how the core engine, processgovernor.exe, should be installed. It can be installed as either a normal application or as a system service. The advantage of having it installed as a system service is that it is launched before user login and it can be more difficult to terminate by the user if the operating system security is configured correctly.

After you've installed Process Supervisor on all client systems and set up the configuration file hosting and log file hosting, go to the third section "maintaining and configuring Process Supervisor in a network installation".

2.) Running Process Supervisor with or without the GUI via a login script or other mechanism to execute it from a remote location

Process Supervisor does not actually need to be installed on client machines. In fact, it may save the network administrators considerable effort to not have to install it on all client machines.

Process Supervisor can be installed on a server and its executable shared on the network. The shared folder or executables only need read access, and greater access is not recommended.

This document assumes you already have a login script set up or know how to invoke a remote executable when a user logs in. There are two primary executables involved in Process Supervisor:

1.) ProcessSupervisor.exe is the graphical user interface (GUI). It also allows for configuration options.
2.) ProcessGovernor.exe is the core engine that manages running processes.

ProcessGovernor.exe must be executed on client machines. It has no GUI portion and so its execution will not be apparent other than its listing in running processes. You should pass the '/ConfigFile=xxxxx' and '/LogFolder=xxxxx' parameters on the command line to specify the location and name of the configuration file. In example, "\\server1\folder1\processgovernor.exe /configfile=\\server1\psconfig\prosuper.ini /logfolder=\\server1\pslogs".

If you want the GUI to be run also, simply set ProcessSupervisor.exe to be launched in the same way with the '/ConfigFile=' and '/LogFolder=' parameters also supplied.

Examples:

\server1\folder1\processgovernor.exe /configfile=\\server1\psconfig\prosuper.ini /logfolder=\\server1\pslogs
\server1\folder1\processsupervisor.exe /configfile=\\server1\psconfig\prosuper.ini /logfolder=\\server1\pslogs

One may need to use the 'start' command to make sure that execution of a bach file isn't held up by processgovernor.exe not terminating. In example:

start \server1\folder1\processgovernor.exe /configfile=\\server1\psconfig\prosuper.ini /logfolder=\\server1\pslogs
start \server1\folder1\processsupervisor.exe /configfile=\\server1\psconfig\prosuper.ini /logfolder=\\server1\pslogs

After this, proceed to the next section "maintaining and configuring Process Supervisor in a network installation".

3.) Maintaining and configuring Process Supervisor in a network installation

Once you've installed Process Supervisor it may be configured by using the server system or another system with Process Supervisor installed and with write access to the configuration file. You simply configure Process Supervisor via the GUI and it is saved to the shared copy of the configuration file. This sets the configuration for all systems using that configuration file.

The logs are viewed in real time and you will see log events show up the lowest pane of the graphical user interface.

For further assistance, please email support@bitsum.com .


Licensing

Topic: Licensing

In order to keep developing Process Supervisor, we must charge a minimal fee for its use. If you wish to continue using Process Supervisor, please purchase it by visiting http://www.bitsum.com. After placing your order online through a secure server, or automated order processing system will send you an email with a username and password for our user services area. In this area you can always download the latest or previous versions of the software you've purchased. Since our order processing and distribution system is fully automated, you will experience no delays inherent in the involvement of humans.

Process Supervisor is inexpensive, please visit the web page for pricing. It is not placed in this document only because it may change over time.

If using Process Supervisor in a network environment, a license must be purchased for each computer it is installed on. Volume discounts make the price for use in a network very reasonable.

We thank you for your support. Please email support@bitsum.com if you have any questions or comments.

Jeremy Collake
Bitsum Technologies
http://ww.bitsum.com