If you do want to do fast polling on the Linux or cygwin gmond, I found
some hardwired code in there which effectively limits the polling rate
for
some metrics no matter what you put in the config files. (Sorry martin,
have not raised a bug report yet). Anyway:
> the code below is in the cygwin and linux metric.c files.
>
> --------------------------------------------------------
> typedef struct {
> uint32_t last_read;
> uint32_t thresh;
> char *name;
> char buffer[BUFFSIZE];
> } timely_file;
>
> timely_file proc_stat = { 0, 15, "/proc/stat" };
> timely_file proc_loadavg = { 0, 15, "/proc/loadavg" }; timely_file
> proc_meminfo = { 0, 30, "/proc/meminfo" }; timely_file proc_net_dev =
> { 0, 30, "/proc/net/dev" };
>
> char *update_file(timely_file *tf)
> {
> int now,rval;
> now = time(0);
> if(now - tf->last_read > tf->thresh) {
> rval = slurpfile(tf->name, tf->buffer, BUFFSIZE);
> if(rval == SYNAPSE_FAILURE) {
> err_msg("update_file() got an error from slurpfile() reading
> %s",
> tf->name);
> return (char *)SYNAPSE_FAILURE;
> }
> else tf->last_read = now;
> }
> return tf->buffer;
> }
> --------------------------------------------------------
I have set those timeout values zero, which works well and gives
me nice spiky furry graphs.
- richard
------------------------------------------------------------------------
For more information about Barclays Capital, please visit our web site at
http://www.barcap.com.
Internet communications are not secure and therefore the Barclays Group does
not accept legal responsibility for the contents of this message. Although the
Barclays Group operates anti-virus programmes, it does not accept
responsibility for any damage whatsoever that is caused by viruses being
passed. Any views or opinions presented are solely those of the author and do
not necessarily represent those of the Barclays Group. Replies to this email
may be monitored by the Barclays Group for operational or business reasons.
------------------------------------------------------------------------