Skip to content
Snippets Groups Projects

Feat parsable file names

Merged John-Paul Robinson requested to merge feat-parsable-file-names into main
3 files
+ 51
0
Compare changes
  • Side-by-side
  • Inline
Files
3
  • The policy file has both a LIST generation rule and a EXTERNAL LIST
    consumer rule.  It uses the ESCAPE term to URL encode the ouput
    generated by the LIST.
    The external target script simply concats LIST files sent to it.
    The mmapplypolicy command adds an additonal variable JOBID to
    allow that to be passed as an OPT to the external script.
    This let's us distinguish the ouput of one job from the next.
+ 27
0
/* 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 '/data/rc/gpfs-policy/gather-info.sh' 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
Loading