>>> 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 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 define the format also > allows it to specify the precision that will ultimately show up in the XML > output from gmond. I don't know if that is really a valuable feature or a > good enough reason to not hardcode the format string for a given value type, > but that is how it works now. >> >> Another place in the code where value type is very important is when the > value is pushed through XDR. This is the process which packages a metric > into a very small packet which can be passed between systems safely. In > order for XDR to create the packet correctly, it has to know exactly what > type of data it is dealing with. Otherwise the data will be packaged and > unpackaged by XDR using the wrong types and who knows what you will end up > with after that. > > I have updated the Wiki page with additional information regarding the > format string for the metric. Currently I am referencing the Python > format string format, however, it looks like I should be referencing > apr_snprintf()'s...? > > http://sourceforge.net/apps/trac/ganglia/wiki/ganglia_gmond_python_modules >
Right, apr_snprintf() is used to format the string that is used in the XML tag. Basically if the format string is following the printf() guidelines, it is good. Brad ------------------------------------------------------------------------------ _______________________________________________ Ganglia-general mailing list Ganglia-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-general