1cache-clean(1)                   NorduGrid ARC                  cache-clean(1)
2
3
4

NAME

6       cache-clean - Administration tool for the A-REX cache.
7
8

SYNOPSIS

10       cache-clean [-h] [-s] [-m NN -M NN] [-E N] [-D debug_level]
11         [ -c <arex_config_file> | <dir1> [<dir2> [...]] ]
12

DESCRIPTION

14       cache-clean is a tool for administrators of ARC server installations to
15       safely remove A-REX cache data and to provide an overview of  the  con‐
16       tents  of  the  cache.  It is used by the A-REX to automatically manage
17       cache contents.
18
19       There are two modes of operation -  printing  statistics  and  deleting
20       files.  If -s is used, then statistics are printed on each cache. If -m
21       and -M are used then files in each cache are deleted if the free  space
22       on the file system is less than that given by -m, in the order of least
23       recently accessed, until the free space is equal to what  is  specified
24       by  -M.   If -E is used, then all files accessed less recently than the
25       given time are deleted.  -E can be used in combination with -m  and  -M
26       but  deleting  files  using  -E is carried out first. If after this the
27       cache free space is still less than that  given  by  -m  then  cleaning
28       according to those options is performed. Cache directories are given by
29       dir1, dir2..  or taken from the config file  specified  by  -c  or  the
30       ARC_CONFIG environment variable.
31
32       -h - print short help
33
34       -s - print cache statistics, without deleting anything. The output dis‐
35       plays for each cache the number of deletable (and  locked)  files,  the
36       total  size  of these files, the percentage usage of the file system in
37       which the cache is stored, and a histogram of access times of the files
38       in the cache.
39
40       -m - the minimum free space (as % of the file system) at which to start
41       cleaning
42
43       -M - the minimum free space (as % of the file system) at which to  stop
44       cleaning
45
46       -E  -  files  accessed less recently than the given time period will be
47       deleted. Example values of this option are 1800,  90s,  24h,  30d.  The
48       default when no suffix is given is seconds.
49
50       -D - debug level. Possible values are FATAL, ERROR, WARNING, INFO, VER‐
51       BOSE or DEBUG. Default level is INFO.
52
53       -c - path to an A-REX config file, xml or ini format
54
55       This tool is run periodically by the A-REX to keep  the  size  of  each
56       cache  within the limits specified in the configuration file. Therefore
57       cleaning should not be performed manually, unless the cache size  needs
58       to  be  reduced  temporarily. For performance reasons it may however be
59       desirable to run cache-clean independently on the machine  hosting  the
60       cache  file  system, if this is different from the A-REX host. The most
61       useful function for administrators is to give an overview of  the  con‐
62       tents of the cache, using the -s option.
63
64       Within  each cache directory specified in the configuration file, there
65       is a subdirectory for data (data/)  and  one  for  per-job  hard  links
66       (joblinks/).   See  the  A-REX  Administration  Guide for more details.
67       cache-clean should only operate on  the  data  subdirectory,  therefore
68       when giving dir arguments they should be the top level cache directory.
69       cache-clean will then automatically only look at files within the  data
70       directory.
71
72
73

EXAMPLE

75       cache-clean -m20 -M30 -E30d -D VERBOSE -c /etc/arc.conf
76
77       Cache  directories  are taken from the configuration file /etc/arc.conf
78       and all cache files accessed more than 30 days ago are deleted. Then if
79       the  free space in a cache is below 20%, data is deleted until the free
80       space reaches 30%. Verbose debug output is enabled  so  information  is
81       output on each file that is deleted.
82
83
85       APACHE LICENSE Version 2.0
86
87

AUTHOR

89       David Cameron <cameron@ndgf.org>
90
91
92
93NorduGrid ARC 1.1.0               2011-10-24                    cache-clean(1)
Impressum