Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-07 Thread Brad Nicholes
On 5/6/2010 at 5:57 PM, in message l2qd4c731da1005061657xf03acf27x1f1b19b4a7909...@mail.gmail.com, Bernard Li bern...@vanhpc.org wrote: Hi David: On Thu, May 6, 2010 at 3:39 PM, David Birdsong david.birds...@gmail.com wrote: i've since just convereted 1.xx seconds to milliseconds and now

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-07 Thread Bernard Li
Hi Brad: On Fri, May 7, 2010 at 7:37 AM, Brad Nicholes bnicho...@novell.com wrote: The primary place in the code where the value type and format come together is at the point where the value is converted to a string and formatted into the XML tag.  In this case, allowing the module to

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-07 Thread Brad Nicholes
On 5/7/2010 at 12:48 PM, in message r2wd4c731da1005071148t4107614fj661b0e3b5a27a...@mail.gmail.com, Bernard Li bern...@vanhpc.org wrote: Hi Brad: On Fri, May 7, 2010 at 7:37 AM, Brad Nicholes bnicho...@novell.com wrote: The primary place in the code where the value type and format come

[Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-06 Thread David Birdsong
Anybody have some tips as to why gmond is converting my float metric that starts out looking like this: fe_nginx.http_req_time 1.133985 which was collected by adding this to my get_metric callback and running gmond in debug mode: print sys.stderr, 'fe_nginx.http_req_time %00f' % v

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-06 Thread Bernard Li
Hi David: On Thu, May 6, 2010 at 2:24 PM, David Birdsong david.birds...@gmail.com wrote: here's the relevant descriptor info: desc_template = {        'call_back': self.get_metric,        'time_max': self.collect_interval,        'value_type': 'uint',        'units': 'ticks',        

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-06 Thread David Birdsong
On Thu, May 6, 2010 at 3:24 PM, Bernard Li bern...@vanhpc.org wrote: Hi David: On Thu, May 6, 2010 at 2:24 PM, David Birdsong david.birds...@gmail.com wrote: here's the relevant descriptor info: desc_template = {        'call_back': self.get_metric,        'time_max':

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-06 Thread Bernard Li
Hi David: On Thu, May 6, 2010 at 3:39 PM, David Birdsong david.birds...@gmail.com wrote: i've since just convereted 1.xx seconds to milliseconds and now i'm pretty happy with int as a precise enough data type. this doesn't explain why the values increment endlessly though when represented as

Re: [Ganglia-general] sending float from python module ends up as integer (and very large)

2010-05-06 Thread Bernard Li
On Thu, May 6, 2010 at 4:57 PM, Bernard Li bern...@vanhpc.org wrote: However, I'm not sure why if there is a mismatch between 'value_type' and 'format' it would generate an ambigious value -- any ides Brad? I was able to trace this back to a apr_snprintf() call in gmond/gmond.c... Cheers,