File indexing completed on 2024-04-06 12:06:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 set verb=0
0016
0017 set AREA=/afs/cern.ch/cms/CAF/CMSCOMM/COMM_GLOBAL/EventDisplay/RootFileTempStorageArea
0018
0019
0020
0021
0022
0023 set retention_time=1
0024
0025
0026
0027
0028
0029
0030 set dquota=10000000
0031
0032
0033
0034
0035
0036
0037 set minfree=1000000
0038
0039 @ maxdisk= $dquota - $minfree
0040
0041 if ($verb) then
0042 echo Setting maxdisk to $maxdisk
0043 endif
0044
0045
0046
0047 cd $AREA
0048 set used=`du -s |awk '{print $1}'`
0049
0050 if ($verb) then
0051 echo Used disk is $used
0052 endif
0053
0054
0055 if ($used < $maxdisk) then
0056
0057
0058
0059 if ($verb) then
0060 echo Exit with code 0
0061 endif
0062
0063 exit 0
0064 endif
0065
0066
0067 if ($used > $maxdisk) then
0068 if ($verb) then
0069 echo Running tmpwatch
0070 endif
0071 echo tmpwatch --verbose --atime $retention_time .
0072 endif
0073
0074
0075
0076 set newused=`du -s |awk '{print $1}'`
0077
0078 if ($verb) then
0079 echo Now used is $newused
0080 endif
0081
0082 if ($newused < $maxdisk) then
0083
0084
0085
0086 exit 2
0087 endif
0088
0089
0090
0091
0092 while ($newused > $maxdisk)
0093
0094
0095 set file=`ls -t1|tail -1`
0096
0097
0098 echo rm -f $file
0099
0100 set newused=`du -s |awk '{print $1}'`
0101
0102 end
0103
0104
0105 exit 3
0106
0107