Hi Bruce,

Le 06/10/2016 à 10:13, [email protected] wrote:

Hi,

I define policy as following:

-bash-4.2# cat /etc/robinhood.d/includes/check_idle_30d.inc
define_policy check_idle {
    status_manager = basic;
    scope { type == file and status == ""}


    # only for policy matching, not to display in reports

(cosmetic. you can remove this comment. It should be about a line you deleted).


default_action = cmd("/bin/rbh-find /work1/ -mtime +30 > /tmp/NAo30D.lst");

You have to know that this action is run for every entry that matches your policy rule!
So in this case, you run the same find command for many entries!

If I correctly understand what you want to do, your policy rule condition should be:
     {last_access > 30d and last_mod> 30d}
and the action should be something like:
    echo {fullpath} >> /tmp/your_list

(not sure how robinhood commands manages redirections like > or >> in commands,
but you can still write a script process_entry.sh that does this).

Hope this helps,
Thomas

    default_lru_sort_attr = none;
}

check_idle_trigger {
    trigger_on = scheduled;
    check_interval = 1h;
}

rule in /etc/robinhood.d/<filesystem>.conf

check_idle_rules {
    rule default {
        condition { last_access > 30d }
    }
}

What the policy is testing to produce an list which files have not been access over 30 days.

We found that it took long time that just run job directory with command line "/bin/rbh-find /work1/ -mtime +30 > /tmp/NAo30D.lst".

Could you please give a clue about the issue?

Regards
******************************************************
Bruce Chen
System Planning Dept.
System Technology & Management Div.
Acer Cybercenter Service Inc.
******************************************************

==---------------------------------------------------------------
This email contains information that is for sole use of the intended recipient and may be confidential or privileged.If you are not the intended recipient, any further review, disclosure, copying, distribution, or use of this email, or the contents of this email is prohibited. Please notify the sender by reply this email and destroy the original email if your receipt of this email is in error.
---------------------------------------------------------------==




------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support




---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support

Reply via email to