[ProgClub programming] top: st : time stolen from this vm by the hypervisor

John Elliot V | ProgClub jj5 at progclub.org
Mon Jun 3 12:27:36 AEST 2019

On 3/6/19 11:48 am, John Elliot V | ProgClub wrote:
> The little humps on the chart are rsync backups being processed, two
> every four hours and one every eighteen hours...

I noticed when reviewing this chart that my two four-hourly backups are
happening kinda close to each other in time, and it's probably more
prudent to space them out over time, so I have reviewed my "wait"
process and changed it from just waiting for 4 hours to running two
hours apart:

   note 'Chilling out for a bit, Ctrl+C to cancel...';

    local wait='1';

    if [ "$HOSTNAME" == 'diligence-test' ]; then



    while true; do

      local hour="$( date +%H )";
      local mod="$(( hour % 4 ))";

      if [ "$mod" == "$wait" ]; then



      sleep 1h;


This code runs on two hosts, "diligence" and "diligence-test". The wait
times are staggered across them. I hope I got my logic right! :)

May the Force be with you,
John Elliot V

|_|O|_| ProgClub
|_|_|O| Because every programmer needs a good club!
|O|O|O| https://www.progclub.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jj5.vcf
Type: text/x-vcard
Size: 231 bytes
Desc: not available
URL: <http://www.progclub.org/pipermail/programming/attachments/20190603/01279672/attachment.vcf>

More information about the programming mailing list