[rrd-users] Re: what's the best way to poll data at a highfrequency

Kimball, Conrad conrad.kimball at boeing.com
Thu Jul 28 17:31:40 MEST 2005


The sampler program or script will need to manage its own timing to
capture samples more frequently than 1 minute.  And once you get that
working, you may want to let the sampler handle its own timing for a
longer interval, to minimize start-up overhead and latency of the
sampler.  The downside being that if the sampler dies for any reason you
need some mechanism to restart it for the next sample.  So a compromise
might be to have a scheduled job every 5 or 10 minutes and the sampler
does timing within that interval.

You are correct that because the sampling process itself takes some time
then the internal timing logic can't simply be of the form:
For number of sample internals
   take sample
   pause 10 seconds
End-for

Instead you'll want some pause logic that calculates when the sampler
should next wake up (a time on a 10-second interval boundary), what the
current time is, calculate the difference, and pause for that period
(depending on your situation you may want do the calcuation down to the
millisecond level; integer number of seconds may be too coarse-grained).

Conrad Kimball
Associate Technical Fellow
IT - CNO, Shared Services Group
conrad.kimball at boeing.com
P.O.Box 24346, MS 7M-HC
Seattle, WA  98124-0346
Bellevue 33-12 bldg, office 32C1
Phone: (425) 865-6410
Pager:  (206) 797-3112
Cell:      (425) 591-7802

-----Original Message-----
From: John Barber [mailto:jbarber at ingham.org] 
Sent: Thursday, July 28, 2005 7:55 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Re: what's the best way to poll data at a
highfrequency

My suspicion was correct, the highest frequency you can run something
with windows task schedule is 1 minute.
How can I schedule something to run more often in a windows environment.
I would consider using a Linux box to poll the data, but I would prefer
to keep everything on the same server.

I guess I could write the script to check it 6 times and just put a 10
second pause between each check but that doesn't seem right either.

John





>>> "John Barber" <jbarber at ingham.org> 7/28/2005 8:12:04 AM >>>
I'm not a programer, but I play one on TV.  Sorry, couldn't help myself
there.

Really though, I am far from being a great coder but I know enough to
get me by when I need something done, and I'm pretty good at figuring
things out if I have an example to work with.

That being said, I was wondering what is a good way to collect data to
update an rrd if you want to update often, say every 10 seconds or so.

I have never needed to collect data at the rate before, currently my
most frequent update is every 5 minutes.
The way I currently do it is with a VBScript I wrote. I just use a
scheduled task on the server (Windows2003) and have it fire off every
5
minutes.  I seems like it would not be a very good option to have a
VBSCRIPT that lunches every 10 seconds, I'm not even sure if in Windows
you can create a task that launches that often.

I don't know if it matters but I am collecting the data using SNMP.
That brings up another question. One of the things I am collecting data
from is an environmental sensor that you can poll using SNMP, but it
also has a web server that you can poll. It has one page on the web
server that has 1 single comma delimited line that contains all the
data.  I seems polling this might be a better way to go, but I have no
idea how to get that string from the web server.

Thanks for any help,

John

--
Unsubscribe
mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe 
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help 
Archive     http://lists.ee.ethz.ch/rrd-users 
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi 

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list