diff --git a/gather-info.sh b/gather-info.sh new file mode 100755 index 0000000000000000000000000000000000000000..d5b5d6198c66132e12ef12d15b597a2a598f95ed --- /dev/null +++ b/gather-info.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# debug the calling convetion of the script +echo $@ >> data/call.log + +case $1 in + + LIST) + # just concat all file list files into a single file + # use opt parameter $3 as a tag to label the files + cat $2 >> data/listfile-${3}.log + rc=0 + ;; + + TEST) # Respond with success + rc=0 + ;; + + *) # Command not supported by this script + rc=1 + ;; +esac +exit $rc diff --git a/policy/list-path-external b/policy/list-path-external new file mode 100644 index 0000000000000000000000000000000000000000..b6a8c6cf002b9bd4f767debf20ac425bd5a40311 --- /dev/null +++ b/policy/list-path-external @@ -0,0 +1,27 @@ +/* list of files to include */ +define( include_list, + (PATH_NAME LIKE 'FILEPATH%') +) + +/* define access_age */ +define(access_age, + (DAYS(CURRENT_TIMESTAMP) - DAYS(ACCESS_TIME)) +) + +RULE 'gather-exec' EXTERNAL LIST 'gather-info' EXEC '' OPTS 'JOBID' ESCAPE '%' +RULE 'list-path' LIST 'gather-info' + SHOW ('|size=' || varchar(FILE_SIZE) || + '|kballoc='|| varchar(KB_ALLOCATED) || + '|access=' || varchar(ACCESS_TIME) || + '|create=' || varchar(CREATION_TIME) || + '|modify=' || varchar(MODIFICATION_TIME) || + '|uid=' || varchar(USER_ID) || + '|gid=' || varchar(GROUP_ID) || + '|heat=' || varchar(FILE_HEAT) || + '|pool=' || varchar(POOL_NAME) || + '|mode=' || varchar(MODE) || + '|misc=' || varchar(MISC_ATTRIBUTES) || + '|' + ) + WHERE include_list + diff --git a/run-mmpol.sh b/run-mmpol.sh index 1f1dfeee6fb091adb693ec260a3b8c2679e028cf..3bfa26d0da0e7784303158a8a12d981f0d361f29 100755 --- a/run-mmpol.sh +++ b/run-mmpol.sh @@ -19,12 +19,15 @@ DATESTR=`date +'%Y-%m-%d-%H:%M:%S'` policy=`basename $policyfile` filetag="${policy}_slurm-${SLURM_JOBID}_${DATESTR}" -cmd="mmapplypolicy ${filesystem} -I prepare \ +cmd="mmapplypolicy ${filesystem} -I defer \ -P $policyfile \ -g $tmpglobal \ -s $tmpscratch \ + -f ${DIR}/list-${SLURM_JOBID} \ -M FILEPATH=${filesystem} \ - -N ${nodes} -n ${cores}" + -M JOBID=${SLURM_JOBID} \ + -M LIST_OUTPUT_FILE=${OUTFILE:-/tmp/gpfs-list-policy} + -N ${nodes} -n ${cores} -m ${cores}" # report final command in job log echo $cmd diff --git a/submit-pol-job b/submit-pol-job index c6d241671277beeab42970e09e7d2d5f8aeb176d..4af941f218dd2be4241efc001fcfcd69cf4856ff 100755 --- a/submit-pol-job +++ b/submit-pol-job @@ -10,9 +10,10 @@ ram=$5 partition=$6 filesystem=${7:-scratch} time=${8:-60} +outfile=${9} -DIR=$outdir POLICYFILE=$policy FILESYSTEM=${filesystem} && \ -DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} \ +DIR=$outdir POLICYFILE=$policy FILESYSTEM=${filesystem} OUTFILE=${outfile} && \ +DIR=$DIR POLICYFILE=$POLICYFILE FILESYSTEM=${FILESYSTEM} OUTFILE=${OUTFILE} \ sbatch \ -N $nodes \ -c $cores \