[collectd] Double output in plugin-cvs
sh at tokkee.org
Mon Sep 14 16:45:35 CEST 2009
On Mon, Sep 14, 2009 at 09:30:13AM -0500, Bill Harris wrote:
> It¹s working great, except for one issue, the output of the doubles lacks
> enough precision to be of use.
> I¹m sure it¹s a printf precision, I need to increase, but I need a
> suggestion where to look?
Have a look at the function value_list_to_string() in src/cvs.c. The
output is formatted in the if-cascade that checks 'ds->ds[i].type'.
Currently, it uses the default precision.
Currently, this is not configurable at runtime but it's hard-coded in
the plugin. However, I think it might make sense to let the user specify
the format string that is to be used for printing floating-point values
(it should be noted, though, that this let's the user introduce rather
nasty mis-configurations). Do you want to give that a try?
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/
Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090914/ca21324d/attachment.pgp
More information about the collectd