Hi,
Fileclass are expected to be quite static, while time conditions may
change every second...
I know the kind of report you mention has already been done with robinhood
For example the "filesystem temprature" graph shown in this presentation
slide 14, is based on such report:
https://www.eofs.eu/_media/events/lad13/04_kilian_cavalotti_lustre.usage.monitoring.pdf
It shows the "modification age" and the "access age" of the data.
This is the request to build such graph for access times. Just replace
'last_access' with 'last_mod' to get the same for last modification time :
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; START
TRANSACTION; SELECT age, SUM(c) AS cnt, SUM(v) AS vol FROM ( SELECT c,
v, CASE
WHEN log_age < ROUND(LOG(10,900),5) THEN 'r_0'
WHEN log_age < ROUND(LOG(10,3600),5) THEN 'r_1'
WHEN log_age < ROUND(LOG(10,21600),5) THEN 'r_2'
WHEN log_age < ROUND(LOG(10,86400),5) THEN 'r_3'
WHEN log_age < ROUND(LOG(10,604800),5) THEN 'r_4'
WHEN log_age < ROUND(LOG(10,2592000),5) THEN 'r_5'
WHEN log_age < ROUND(LOG(10,5184000),5) THEN 'r_6'
WHEN log_age < ROUND(LOG(10,7776000),5) THEN 'r_7'
ELSE 'r_8' END AS age FROM ( SELECT
IF(UNIX_TIMESTAMP(NOW())>=last_access,ROUND(LOG(10,UNIX_TIMESTAMP(NOW())-last_access),5),NULL)
AS log_age, COUNT(*) AS c, IFNULL(SUM(size),0) AS v FROM ENTRIES GROUP
BY log_age ) AS ps ) AS stats GROUP BY age; COMMIT;
For duplicate name-size couples, a crafty sql request should do it...
You can first create a temporary table with id, size and name:
CREATE TABLE FIND_DUP AS (SELECT E.id, E.size, N.parent_id, N.name,
this_path(N.parent_id, N.name) as path from ENTRIES E,NAMES N WHERE
E.id=N.id and E.type='file');
Then you can list name-size duplicates using:
SELECT A.path, B.path, A.size FROM FIND_DUP A, FIND_DUP B WHERE
A.size=B.size and A.name=B.name and A.id <> B.id;
HTH
Thomas
On 11/09/17 19:28, HERTRICH Olivier wrote:
Discovering Robinhood, I search to have a report based last_access
time to identify the size of data older than some dates.
It seems that time criteria are not allowed in Fileclass definition.
How can I have this reports?
I also search to find duplicate files (same name/ same size, for now).
IS this possible ?
Thank you for your help.
*Olivier HERTRICH*
EXPERT ITS
DIRECTION OPÉRATIONS TECHNOLOGIES / INTEGRATION CENTER
DIRECTION DES SYSTÈMES D’INFORMATION
T +33 562417338
M +33 608020775
o.hertr...@daher.com <mailto:o.hertr...@daher.com>
TARBES - FRANCE
*www.daher.com* <http://www.daher.com> *- **www.tbm.aero*
<http://www.tbm.aero> *
*
This e-mail and any files transmitted with it (the «message ») are
confidential and intended solely for the use of the addressees. If you
receive this message in error, please delete it and immediately notify
the sender. Any use not in accord with its purpose, any dissemination
or disclosure, either whole or partial, is strictly prohibited except
formal approval. Any views or opinions presented are solely those of
its author and do not necessarily represent those of Daher or any of
its subsidiary companies. The internet cannot guarantee the integrity
of this message. Neither Daher nor any of its subsidiaries or
affiliates shall be liable for the message if altered, changed or
falsified. While we take all reasonable precautions to ensure that
viruses are not transmitted via emails, we recommend that you take
your own measures to prevent viruses from entering your computer system.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
robinhood-support mailing list
robinhood-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/robinhood-support