# $Id: README,v 1.3 2008/12/09 15:51:48 ksb Exp $ The script (perl or shell) that feeds the unix.rrd file for a host. There is one for each HOSTTYPE distrib knows about (at least). We are feeding a slot that's 5 minutes wide. We could update at rates from 5minutes (300 seconds) to 3 seconds. Sampling at 3 minutes gets us an over sample rate of 167% (300/180); we could do a little better at e (2.718, ln's base) times which would be 110 seconds. At FedeX we over sample the disks more than the unix stats. The sample _rate_ should not be confused with the _time_. We need to avoid having every computer wake up to send the data at the same time. So we scatter the updates around the clock this way: 1) Each host updates on a three minute cycle (at FedEx) the three minute cycles are staggered (1/3 to each) starting at 0, 1, and 2 minutes after the hour in monitor's crontab. 2) Each host sleeps for a random number of seconds (< 59) to smooth the updates out a little more. The random sleep is done by HOSTTYPE: Solaris 2 + $RANDOM % 20 (from 2 to 21 seconds) FreeBSD4 22 + $RANDOM % 16 (from 22 to 37 seconds) Linux 38 + $RANDOM % 10 (from 38 to 47 seconds) HPUX9 48 + $RANDOM % 8 (from 48 to 55 seconds) FREEBSD3 55 + $RANDOM % 4 (from 55 to 58 seconds) That leaves the top of the minute for the next task. We try to pick up switches and other stuff with a little skew, but not as long a delay. This keeps us from flooding the RRDD host right at the top of a minute. The rrdisk code wants to sleep for some period which is NOT a multiple of 60 seconds so it floats along without a beating against the fixed polls. One might adjust the sleep tunes based on how many of which type of hosts you are monitoring. One could deduce from the tunes we provide the we have more Solaris hosts than others. N.B. - We could overlap the update ranges without any damange to the system. - FreeBSD3 is poorly named, anything below 4.3 is "3" (viz. 3.0 to 4.2). -- ksb