
			      EXPIRECTL README

    (0) Copyright, availability, etc...
	
	This software package has been placed in the public domain.  You 
	can do whatever you want with it.

	The software can be retrieved from: 

		http://www.backplane.com/

	And you can email me:

		dillon@backplane.com (Matthew Dillon)

    (1) compilation, written for *BSD systems.

	EDIT expirectl.c and modify EXPIRE_CTL_DIR as appropriate for your
	system.  For example, if your news home is /usr/local/lib/news,
	then EXPIRE_CTL_DIR must be set to "/usr/local/lib/news".

	cc -Wall expirectl.c -o ex -lm

	SUN USERS NOTE:  statfs() is probably broken, try using statvfs()
	instead.  You may have to munge the source code a bit.

	NOTE: the program is provided as-is and should only be used by
	experienced news admins.

    (2) Installation

	make a backup of your current expire.ctl file. 

	Note that all programs and files should be owned by the 'news'
	user, NOT root.

	Look at the example expire program called 'example-cron' for usage

	Look at the example expire.ctl.ctl file for how to use, then
	create your own expire.ctl.ctl.

	Try running expirectl manually to make sure it works.  You may want
	to manually run it and also use the '-f' flag to make sure it does
	not make a mess of your expire.ctl file.  Make sure you also use
	the -v flag and make sure expirectl reports the CORRECT amount of
	free space in the spool, or it will be useless.  You will have
	to tune the expire.days file and run expirectl as shown in the
	example, plus the -f option, to get a close match with your original 
	expire.ctl file before the system can safely become operational.

	Automatic running:  The program should be run as shown in the example
	prior to every expire run.  It will check the free space in the spool
	and adjust the baseline expiration up or down based on that, then
	will regenerate the expire.ctl file from the expire.ctl.ctl template.

	FILES AND LOCATIONS:  All files are relative to EXPIRE_CTL_DIR:

	    expire.ctl.ctl

		template file

	    expire.ctl

		file generated from template, should be the same file that
		INN uses in its expiration run.

		ALWAYS BACKUP YOUR ORIGINAL EXPIRE.CTL FILE BEFORE MESSING
		AROUND WITH THE EXPIRECTL PROGRAM!

	    expire.days

		see example.  Contains the baseline expiration which is 
		multiplied against the fractional values in expire.ctl.ctl
		to produce expire.ctl.  This file is updated by the expirectl
		program dynamically based on the free space in the spool.

	    example-cron

		see example.  Contains an example of how to use this system
		properly.

    (3) Notes and warnings.

	WARNING WARNING WARNING!  INN will not be happy if you set the 
	expiration to less then 1 day.  This is why the dynamic elements
	in the sample expire.ctl.ctl are of the form: [x.x/1], where '1'
	indicates a minimum expiration.  Please look at my example
	expire.ctl.ctl file carefully.

	Make sure expirectl is properly determining the size of your spool
	or you will not be a happy camper.

	The example-cron file assumes that you run four expires every day.
	You will need to increase the -I value if you run them less often.
	expirectl will decrease the baseline days by 2xI (0.4 days) every
	time it is run when the free space in the spool is less then the
	target, nad increase it by 1xI no more then ONCE A DAY when the
	free space in the spool is greater then the target.

	The idea is to decrease the expire time quickly to prevent the spool
	from filing up, and to slowly increase expire times when too much space
	is consistantly available in the spool.

	TARGET FREE SPACE:  If taking a full feed, I suggest between 1500m
	and 2000m to guarentee that the spool will not fill up.  It also
	depends on how often you run expire.  The above numbers assume expire
	is run four times a day and a full feed is being taken.  

						-Matt

