cache-clean - Administration tool for the A-REX cache.
cache-clean -h | -s | -m NN -M NN [-D debug_level]
[ -c <arex_config_file> | <dir1> [<dir2> [...]] ]
cache-clean is a tool for administrators of ARC server installations to
safely remove data and provide an overview of the contents of the A-REX
cache. It is used by the A-REX to automatically manage cache contents.
There are two modes of operation - printing statistics and deleting
files. If -s is used, then statistics are printed on each cache. If -m
and -M are used then files in each cache are deleted if the free space
on the file system is less than that given by -m, until the free space
is equal to what is specified by -M. Caches directories are given by
dir1, dir2.. or taken from the config file specified by -c or the
ARC_CONFIG environment variable.
-h - print short help
-s - print cache statistics, without deleting anything. The output
displays for each cache the number of deletable (and locked) files, the
total size of these files, the percentage usage of the file system in
which the cache is stored, and a histogram of access times of the files
in the cache.
-m - the minimum free space (as % of the file system) at which to start
-M - the minimum free space (as % of the file system) at which to stop
-D - debug level. Possible values are FATAL, ERROR, WARNING, INFO,
VERBOSE or DEBUG. Default level is INFO.
-c - path to an A-REX config file, xml or ini format
This tool is run periodically by the A-REX to keep the size of each
cache within the limits specified in the configuration file. Therefore
cleaning should not be performed manually, unless the cache size needs
to be reduced temporarily. For performance reasons it may however be
desirable to run cache-clean independently on the machine hosting the
cache file system, if this is different from the A-REX host. The most
useful function for administrators is to give an overview of the
contents of the cache, using the -s option.
Within each cache directory specified in the configuration file, there
is a subdirectory for data (data/) and one for per-job hard links
(joblinks/). See the A-REX Administration Guide for more details.
cache-clean should only operate on the data subdirectory, therefore
when giving dir arguments they should be the top level cache directory.
cache-clean will then automatically only look at files within the data
cache-clean -m20 -M30 -D VERBOSE -c /etc/arc.conf
Cache directories are taken from the configuration file /etc/arc.conf
and if the free space in a cache is below 20%, data is deleted until
the free space reaches 30%. Verbose debug output is enabled so
information is output on each file that is deleted.
APACHE LICENSE Version 2.0
David Cameron <email@example.com>