
CPU Limiter/2.

DISCLAIMER
==========
I allow you to use all software in this package freely under the condition
that I am in no way responsible for any damage or loss you may suffer.

INTRODUCTION
============
This program works as a daemon, and it's only purpose is to kill processes
which eats too much CPU for a specified period of time. CPU load for each
process is calculated as an average value between current CPU load and 
previous average value of CPU load. (CPUav=(oldCPUav+CPU)/2 -- in mathematical 
notation).

INSTALLATION
============
Create a directory, where you want to install this software, and unzip all
the files into it. (Actually you will need only limiter.exe and limiter.cfg 
files). Here is the list of file in the distribution package:

===Cut===
file_id.diz      --- BBS description file
limiter.cfg      --- Configuration file
limiter.exe      --- Main program
hkilldd.sys      --- Hard kill (kill -9) support driver
doc\readme.txt   --- This file
doc\readme.rus   --- Russian version of this file
doc\HISTORY      --- Project history
doc\TODO         --- TODO list
sample\limiter.cfg - My working config file, as example
===Cut===

Limiter.Cfg can be placed in the main program directory, or in %ETC%, or
its location can be specified as a command line parametr.

Please edit limiter.cfg, as described below.

CONFIGURATION
=============
The daemon understands the folowing key-words in the configuration file 
(semicolon is used as a beggining of the comment string):

===Cut===
; Log file name.
; Default value = none, work without logging.
;LogFile = d:\LOGS\limiter.log

; Make noises when killing somebody ;)
; Default value = Off
;Sound = On

; Debug mode On|Off.
; Default value = Off.
;Debug = On

; CPU load scanning period, in seconds.
; Default value = 5.
;Period = 1

; Enable/Disable hard kill method.
; Default value = On.
;Kill-9 = Off

; Limit & Ignore rulesets.
; May be defined any number of Limit and Ignore keywords.

; Limit = processmask prio CPU[%] seconds
; processmask - case independed, may be NAME, NAME*, *NAME, or *
; prio - may be * or 0 - for any, 1 = idle, 2 = normal, 3 = time-crit, 4 = fs
; CPU - maximum average CPU load for this process(es)
; seconds - maximum time overload CPU for this process(es)
; Examples:
;Limit = vdm * 95% 5
; Limit any VDM session to use 95% CPU and up, not longer than 5 seconds.
;Limit = * 3 95% 5
; Limit any process at real-time priority to use 95% CPU and up, not longer than 5 seconds.
;Limit = * 4 95% 5
; Tha same, but for foreground-server processes.

; Ignore = processmask prio
; processmask - case independed, may be NAME, NAME*, *NAME, or *
; prio - may be * or 0 - for any, 1 = idle, 2 = normal, 3 = time-crit, 4 = fs
; Examples:
;Ignore = * *
; Ignore all other processes.
===Cut===

The daemon scans configuration rules for the first match. Then processing of 
all rules is stopped.

EXECUTION
=========
The folowing command line parametrs can be passed to limiter.exe:
1) cfg_file  --- Location and name of daemon configuration file
	Ex: C:\Limiter\Limiter.exe C:\CONF\limiter.cfg

KILL -9 (HARD KILL) SUPPORT
===========================
Hard kill support found in Warp3 Fixpack >= 17, in Warp4 and WSeB (Aurora).
For using this killing method you need to install special driver in your system,
there are hkilldd.sys by Yura Kaminskiy or xf86sup.sys by Holger Veit.
Do not use both drivers in one time!
For installing, simple add DEVICE=X:\PATH\hkilldd.sys string into your
\CONFIG.SYS file and reboot.

CONTACTS
========
Author  ---  Stepan Kazakov, madded@vao.udmnet.ru, 2:5050/13.29@fidonet.

THANKS
======
Daemon idea by Stalker  ---  stalker@os2.ru
hkilldd.sys author      ---  Yura Kaminskiy, 2:5020/517.21@fidonet
