[collectd] [PATCH] -T option

Doug MacEachern Doug.MacEachern at hyperic.com
Sat Jan 17 16:03:23 CET 2009


> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: Saturday, January 17, 2009 2:14 AM
> To: Doug MacEachern
> Cc: collectd at verplant.org
> Subject: Re: [collectd] [PATCH] -T option
> 
> Hi Doug,
> 
> On Fri, Jan 02, 2009 at 05:21:45PM -0500, Doug MacEachern wrote:
> > The -T switch:
> > - implies -f
> > - does not start any read threads
> > - invokes callback() foreach list_read and will exit 1 on failure, 0
> > otherwise
> 
> I've just applied your changes for the -T command line argument. It
> looks good, but I've sone two small changes:
> 
>  - Have the `read all once' function try *all* read-functions, even if
>    one of them fails. That way you should get the information such as
>    ``foo, bar, AND qux don't work'' instead of ``foo doesn't work.
> *next
>    try* bar doesn't work. *next try* qux doesn't work. …''
>  - If `read all once' returns non-zero, don't just quit but call the
>    shutdown functions first. This is important if your test-setup loads
>    the unixsock plugin, for example.

Much better, I'd ran into both hassles myself after using the switch more.

> > The csv patch allows DataDir to be configured to "stdout" or "stderr"
> > and just prints what would have been the filename (minus date stamp)
> =
> > values.  For example:
> > thresher/load/load=1230934282,0.000000,0.010000,0.000000
> 
> Not that it makes much real sense, but wouldn't it be so much cooler to
> produce strings that would be accepted by the exec and unixsock
> plugins?
> I. e. something like:
>   PUTVAL thresher/load/load interval=10
> 1230934282:0.000000:0.010000:0.000000
> 
> That's not exactly in the CSV format anymore, but we could always add
> another plugin for that ;) What do you think?

Sounds good to me!

Thanks,
-Doug
 
> Regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/


More information about the collectd mailing list