StoCS is a script to control free space on disk and to maintain free space at a configurable level.
Version: 1.2StoCS is a service to control freespace on disk, mantain free space in a configurable level.
Operating System: Linux
Works with three thresholds:
WARN: do a configurable action (dialog, message, alarm, ecc)
FDEL: deletion limit
LOWL: dimension to reach after deletion
If define must be LOWL < WARN < FDEL
Threshold unit can be:
Total number of file and/or subdiectory
Total dimension of controlle folder (Byte,Kbyte,Mbyte,ecc)
% of fre space on unit
Max age of files and/or subdirs (in this case LOWL is not used because all that exeeds is deleted)
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.
Copy stocs in /usr/local/bin
Copy stocs.conf in /usr/local/etc
Add to a cron.hourly (or a crontab):
/bin/su user -c "/usr/local/bin/stocs
In this case stocs runs every hour, using the configuration in stocs.conf, the output is written to log file /var/log/stocs.log