1CACHE-CLEAN(1)              NorduGrid Users Manual              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] [-S] [-m NN -M NN] [-E N] [-D debug_level]
11         [-f space_command] [ -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 space  used
22       by  the  cache on the file system is more than that given by -M, in the
23       order of least recently accessed, until the space used by the cache  is
24       equal  to  what  is specified by -m.  If -E is used, then all files ac‐
25       cessed less recently than the given time are deleted.  -E can  be  used
26       in  combination  with  -m and -M but deleting files using -E is carried
27       out first. If after this the cache used space is still more  than  that
28       given by -M then cleaning according to those options is performed.
29
30       If  the cache is on a file system shared with other data then -S should
31       be specified so that the space used by the cache is calculated.  Other‐
32       wise  all  the  used  space on the file system is assumed to be for the
33       cache. Using -S is slower so should only be  used  when  the  cache  is
34       shared.
35
36       By  default  the  "df" command is used to determine total and (if -S is
37       not specified) used space. If this command  is  not  supported  on  the
38       cache  file system then -f can be used to specify an alternate command.
39       The output of this command must be "total_bytes used_bytes", and so the
40       command  would  normally be a small script around the file system space
41       information tool. The cache directory is passed as the last argument to
42       this command.
43
44       Cache  directories  are given by dir1, dir2..  or taken from the config
45       file specified by -c or the ARC_CONFIG environment variable.
46
47       -h - print short help
48
49       -s - print cache statistics, without deleting anything. The output dis‐
50       plays  for  each  cache the number of deletable (and locked) files, the
51       total size of these files, the percentage usage of the file  system  in
52       which the cache is stored, and a histogram of access times of the files
53       in the cache.
54
55       -S - Calculate the size of the cache instead of taking  used  space  on
56       the file system. This should only be used when the cache file system is
57       shared with other data.
58
59       -M - the maximum used space (as % of the file system) at which to start
60       cleaning
61
62       -m  - the minimum used space (as % of the file system) at which to stop
63       cleaning
64
65       -E - files accessed less recently than the given time  period  will  be
66       deleted. Example values of this option are 1800, 90s, 24h, 30d. The de‐
67       fault when no suffix is given is seconds.
68
69       -f - alternative command to "df" for obtaining the  file  system  total
70       and  used  space.  The  output  of  this  command  must be "total_bytes
71       used_bytes". The cache directory is passed as the last argument to this
72       command.
73
74       -D - debug level. Possible values are FATAL, ERROR, WARNING, INFO, VER‐
75       BOSE or DEBUG. Default level is INFO.
76
77       -c - path to an A-REX config file, xml or ini format
78
79       This tool is run periodically by the A-REX to keep  the  size  of  each
80       cache  within the limits specified in the configuration file. Therefore
81       cleaning should not be performed manually, unless the cache size  needs
82       to  be  reduced  temporarily. For performance reasons it may however be
83       desirable to run cache-clean independently on the machine  hosting  the
84       cache  file  system, if this is different from the A-REX host. The most
85       useful function for administrators is to give an overview of  the  con‐
86       tents of the cache, using the -s option.
87
88       Within  each cache directory specified in the configuration file, there
89       is a subdirectory for data (data/)  and  one  for  per-job  hard  links
90       (joblinks/).   See  the  A-REX  Administration  Guide for more details.
91       cache-clean should only operate on  the  data  subdirectory,  therefore
92       when giving dir arguments they should be the top level cache directory.
93       cache-clean will then automatically only look at files within the  data
94       directory.
95
96
97

EXAMPLE

99       cache-clean -m20 -M30 -E30d -D VERBOSE -c /etc/arc.conf
100
101       Cache  directories  are taken from the configuration file /etc/arc.conf
102       and all cache files accessed more than 30 days ago are deleted. Then if
103       the  used space in a cache is above 30%, data is deleted until the used
104       space reaches 20%. Verbose debug output is enabled  so  information  is
105       output on each file that is deleted.
106
107
109       APACHE LICENSE Version 2.0
110
111

AUTHOR

113       ARC    software   is   developed   by   the   NorduGrid   Collaboration
114       (http://www.nordugrid.org), please consult the AUTHORS file distributed
115       with    ARC.    Please    report   bugs   and   feature   requests   to
116       http://bugzilla.nordugrid.org
117
118
119
120
121NorduGrid ARC 6.11.0              2021-04-24                    CACHE-CLEAN(1)
Impressum