Hi Dominique,


Thanks for your help.



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

________________________________________
From: Dominique Martinet [[email protected]]
Sent: Friday, October 07, 2016 6:50 PM
To: Chen, Bruce
Cc: [email protected]; [email protected]
Subject: Re: [robinhood-support] It takes long time to run the policy - 
2016/10/06

[email protected] wrote on Fri, Oct 07, 2016 at 09:13:50AM +0000:
> We have tried kill the rh-find processes, but they spawn again.
> As last mail I replied:
>
> After modified default_action from cmd("/bin/rbh-find /work1/ -mtime
> +30 > /tmp/NAo30D.lst") to cmd("echo {path} >> /tmp/NAo30D.lst") and
> ran robinhood --run="check_idle" --once again, those processes
> rbh-find terminated.

Ah, ok. I misunderstood the problem and thought the commands persisted,
but it's just that they're being restarted as part of the new policy
run if I understood that correctly.

I'm not aware of any way to "stop" the policy on its own when robinhood
is running, but if you stop the robinhood service then the rbh-find
processes will be killed after 1m30 if they haven't had time to finish.
The systemctl stop command should only return when everything has had
time to shutdown or has been killed.


It's possible to change the systemd service unit to shutdown everything
right away, but that will basically tell robinhood the policy run for
the active entries failed and might store incorrect information in the
database - giving some time for short commands to finish seemed better
to me.
If we hit the timeout, everything is killed so robinhood won't have the
chance to store the failures either.


You can change the timeout with TimeoutStopSec= in a systemd drop-in if
you'd rather not wait. Running systemctl edit robinhood will open your
editor in a new file where you can add these two lines for example:

 [Service]
 TimeoutStopSec=30s


At any time you can list subprocesses running for a given service with
systemd-cgls, either with no argument or like this:
 $ systemd-cgls /system.slice/robinhood.service
 Control group /system.slice/robinhood.service:
 ├─21166 /opt/robinhood/sbin/robinhood --run=sha1_check --scan
 ├─404 /bin/bash /usr/sbin/rbh_cksum.sh /mnt/data/a/qemu/foo.img
 ├─434 /bin/bash /usr/sbin/rbh_cksum.sh /mnt/data/a/qemu/foo.img
 ├─436 /bin/bash /usr/sbin/rbh_cksum.sh /mnt/data/a/qemu/foo.img
 └─437 sha1sum /mnt/data/a/qemu/foo.img

(also listed in "systemctl status robinhood")

Hope this helps,
--
Dominique Martinet

==---------------------------------------------------------------
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.
---------------------------------------------------------------==

[http://www.acer.com/_logo_/acer_logo.jpg]

------------------------------------------------------------------------------
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