Service to control freespace on disk, mantain free space in a configurable level. Works with three thresholds:
Threshold unit can be:
Can work with a config file or wih command line parameters. Command line parameters overwrites config file values. Does not implements loop. Therefore you must use cron os similar. Download Stocs v1.2 View files Installation example
Syntax IMPORTANT NOTE: Stocs deletes files! Testing parameters with the DUMMY (or -t) flag is safety. More safety is run with a user whose rights are the minumum possible. Usage : stocs [OPTION] CONFIGFILE -V, --version print version -h, --help print this help -v, --verbose print what is going to do -p, --path CONTROLPATH path to control, must be a directory -u, --unitused B|K|M|P|F|D|N|m|h|d|y unit used for limits B,K,M=dimension in Byte,Kbytes,MBytes; P=% used space on device; F,D,N=number of files,dirs,both; m,h,d,y=age in min,hours,days,years -d, --device DEVICE device to control, mandatory only if unitused is P -w, --warnlevel WARNLEVEL warning level -f, --fdellevel FDELLEVEL deletion level -l, --lowllevel LOWLLEVEL low level to reach when delete -a, --warnaction WARNACTION configurable action for warn level -e, --fdelaction FDELACTION configurable action for file deletion level -t, --test don't touch filesistem, dummy test only if there is no configuration file command ends with a - Dependecies Stocs is a shell script. Uses BASH builtins and du, df, date, awk, rm. |