On 10/07/16 03:59, [email protected] wrote:
Hi Thomas,
Thanks for your explanation.
We ran the command several times to test policy:
robinhood --run="check_idle" --once
Original setting is that running policy per hour, we modified it to 30
days then.
However, we found that there are several processes still running on
system.
-bash-4.2# ps -ef | grep rbh-find
root 38536 10473 9 09:40 ? 00:00:09 /bin/rbh-find /work1
-mtime +30 > /tmp/NAo30D.lst
root 38537 10473 9 09:40 ? 00:00:09 /bin/rbh-find /work1
-mtime +30 > /tmp/NAo30D.lst
root 38538 10473 10 09:40 ? 00:00:09 /bin/rbh-find /work1
-mtime +30 > /tmp/NAo30D.lst
root 38539 10473 9 09:40 ? 00:00:09 /bin/rbh-find /work1
-mtime +30 > /tmp/NAo30D.lst
Tried to stop then start robinhood daemon, but daemon always startup
those processes.
Is there any method that we can stop those processes?
I think there is something to do with the systemd configuration.
@Dominique, can you give him an hint?
BTW, thinking about your policy rules, this should be more efficient and
make it possible for robinhood to optimize its DB query:
check_idle_rules {
ignore { last_mod < 30d }
rule default {
condition { last_access > 30d }
}
}
This way robinhood will only select entry with last_mod > 30d from the DB
and then stat the entry to check its atime, and then do the policy action.
Thomas.
Regards
******************************************************
Bruce Chen
System Planning Dept.
System Technology & Management Div.
Acer Cybercenter Service Inc.
******************************************************
------------------------------------------------------------------------
*From:* Thomas LEIBOVICI (mail perso) [[email protected]]
*Sent:* Friday, October 07, 2016 2:23 AM
*To:* Chen, Bruce; [email protected]
*Subject:* Re: [robinhood-support] It takes long time to run the
policy - 2016/10/06
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