[gpfsug-discuss] Re Auditing - timestamps
Marc A Kaplan
makaplan at us.ibm.com
Mon Jul 31 19:26:52 BST 2017
The "ILM" chapter in the Admin Guide has some tips, among which:
18. You can convert a time interval value to a number of seconds with the
SQL cast syntax, as in the
following example:
define([toSeconds],[(($1) SECONDS(12,6))])
define([toUnixSeconds],[toSeconds($1 - ’1970-1-1 at 0:00’)])
RULE external list b
RULE list b SHOW(’sinceNow=’
toSeconds(current_timestamp-modification_time) )
RULE external list c
RULE list c SHOW(’sinceUnixEpoch=’ toUnixSeconds(modification_time) )
The following method is also supported:
define(access_age_in_days,( INTEGER(( (CURRENT_TIMESTAMP - ACCESS_TIME)
SECONDS)) /(24*3600.0) ) )
RULE external list w exec ’’
RULE list w weight(access_age_in_days) show(access_age_in_days)
--marc of GPFS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gpfsug.org/pipermail/gpfsug-discuss_gpfsug.org/attachments/20170731/04856369/attachment.htm>
More information about the gpfsug-discuss
mailing list