Changeset 7836 for trunk/MagicSoft/Mars/datacenter/scripts
- Timestamp:
- 08/02/06 14:03:06 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/dowebplots
r7835 r7836 40 40 41 41 datetime=`date +%F-%H-%M-%S` 42 webdir=/www/htdocs/datacenter43 42 44 43 scriptlogpath=$logpath/run/dowebplots/`date +%Y/%m/%d` … … 74 73 75 74 76 #finding all rootfiles in the webdirectory, that were modified in the last 3 days75 #finding all rootfiles in the data directory, that were modified in the last 3 days 77 76 #this are all statusdisplays 78 rootfiles=`find $ webdir/$type/ -maxdepth 10 -name '*.root' -mtime -3 | grep -v '_I_' | grep -v '_Y_' | grep -v 'subsystemdata' | grep -v 'star_lapalma' | grep -v 'summary'`77 rootfiles=`find $datapath/$type/ -maxdepth 10 -name '*.root' -mtime -3 | grep -v '_I_' | grep -v '_Y_' | grep -v 'summary'` 79 78 80 79 #exit if no rootfiles are found … … 105 104 if [ "$datepsfile" = "" ] 106 105 then 107 echo "date of psfile is empty ->the file $psfile doesn't exist" >> $scriptlog 2>&1106 echo "date of psfile is empty, i.e. the file $psfile doesn't exist" >> $scriptlog 2>&1 108 107 echo " -> setting date to 0 and producing psfile..." >> $scriptlog 2>&1 109 108 datepsfile=0 … … 113 112 echo "date of rootfile: $daterootfile" >> $scriptlog 2>&1 114 113 echo "date of psfile: $datepsfile" >> $scriptlog 2>&1 115 116 114 #if the psfile is newer than the rootfile 117 115 #no plots have to be done -> continue 118 116 if [ "$datepsfile" -gt "$daterootfile" ] >> $scriptlog 2>&1 119 117 then 120 echo "psfile is older than rootfile -> continue " >> $scriptlog 2>&1118 echo "psfile is newer than rootfile -> continue " >> $scriptlog 2>&1 121 119 continue 122 120 fi … … 137 135 done 138 136 139 echo "removing old files" >> $scriptlog 2>&1140 #make sure, that old plots of files, that are already removed from disk,141 # are deleted also in the webdirectory142 #this has to be done, as ps and png files are excluded from rsync, and143 #as rsync is done with --delete option (script /home/operator/condor/webupdate)144 145 #find all directories with plots146 dirs=`find $webdir/$type/* -type d | grep -v merpplogs`147 148 for dir in ${dir[@]}149 do150 #find psfiles in directory151 psfiles=`ls $dir/*.ps`152 #continue, if there are no psfiles153 if [ "$psfiles" == "" ]154 then155 continue156 fi157 158 for psfile in ${psfiles[@]}159 do160 #create name of corresponding rootfile161 rootfile=`echo $psfile | sed -e 's/.ps$/.root/g'`162 #delete ps and pngfiles if rootfile is not existing163 if ! ls $rootfile >> $scriptlog 2>&1164 then165 echo "deleting old plots for $rootfile..." >> $scriptlog 2>&1166 path=`dirname $psfile`167 rm -v $psfile >> $scriptlog 2>&1168 rm -v $path/*.png >> $scriptlog 2>&1169 fi170 done171 done172 173 137 rm -v $lockfile >> $scriptlog 2>&1 174 138
Note:
See TracChangeset
for help on using the changeset viewer.