Re: [Puppet Users] Re: How to randomize a template

2011-01-05 Thread Jeff McCune
On Wed, Jan 5, 2011 at 7:00 AM, Thomas Mueller wrote: > Am Wed, 05 Jan 2011 04:59:29 -0800 schrieb Rune Stensø: > > > For something that's a bit more generic, you can also just use $RANDOM > > with sleep. $RANDOM returns between 0 and 32k as a value, and you can > > use a divider to reduce it. > >

Re: [Puppet Users] Re: How to randomize a template

2011-01-05 Thread Thomas Mueller
Am Wed, 05 Jan 2011 04:59:29 -0800 schrieb Rune Stensø: > For something that's a bit more generic, you can also just use $RANDOM > with sleep. $RANDOM returns between 0 and 32k as a value, and you can > use a divider to reduce it. > For example, I use 'sleep $(($RANDOM/10)) && do_heavy_stuff' to >

Re: [Puppet Users] Re: How to randomize a template

2011-01-05 Thread Cosimo Streppone
On Wed, 05 Jan 2011 13:59:29 +0100, Rune Stensø wrote: For something that's a bit more generic, you can also just use $RANDOM with sleep. $RANDOM returns between 0 and 32k as a value, and you can use a divider to reduce it. For example, I use 'sleep $(($RANDOM/10)) && do_heavy_stuff' to rando

[Puppet Users] Re: How to randomize a template

2011-01-05 Thread Rune Stensø
For something that's a bit more generic, you can also just use $RANDOM with sleep. $RANDOM returns between 0 and 32k as a value, and you can use a divider to reduce it. For example, I use 'sleep $(($RANDOM/10)) && do_heavy_stuff' to randomize the start of a heavy job out across just under a hour.