Re: Shell Scripting Random Delay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, May 15, 2013 at 1:38 PM, Thomas Johansson <thomasj@xxxxxxxxxx> wrote:
> On 2013-05-15 17:44, Matt wrote:

>> When I run them all at once they bog the system and cause some of
>> latency graphs on equipment being monitored to look poor.
>
> Wait randomized interval of 60 seconds and start
>
>    perl -e "sleep(int(rand(60)))" && (perl /scripts/my_script.pl)

Also you can add a
wait
to the script after starting some number of background commands to
wait until they have all completed before you start another batch.
But, rather than using so many home-grown scripts, maybe you should
look at OpenNMS, cacti, etc. for monitoring frameworks to manage it
all for you.

--
  Les Mikesell
    lesmikesell@xxxxxxxxx
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux