On Thu, 6 Dec 2007, Brad Nicholes wrote:
> >>> On Wed, Dec 5, 2007 at 3:48 PM, in message > <[EMAIL PROTECTED]>, Matthias > Blankenhaus <[EMAIL PROTECTED]> wrote: > > Hi Brad ! > > > > Nice meeting you yesterday :-) > > > > I took a closer look at PCP to see what it uses for the meta level > > description for every metric. I thought this might be interesting for > > you. Here you go: > > > > > > - Data type: union of all C types, plus blob > > - Semantics: counter, instant, descrete > > - Units and scale: dimension and scale for space, time, count > > > > > > Here are some examples: > > > > > > kernel.all.load [1, 5 and 15 minute load average] > > Data Type: float InDom: 60.2 0xf000002 > > Semantics: instant Units: none > > > > kernel.percpu.cpu.user [percpu user CPU time metric from /proc/stat] > > Data Type: 64-bit unsigned int InDom: 60.0 0xf000000 > > Semantics: counter Units: millisec > > > > > > For detailed info you can check out "man PMAPI" on any SLES box. > > > > > > Matthias > > If I am understanding this correctly, this is actually similar in concept to > the XDR restructuring that I did for gmond. However the metadata and the > value message are split into two different structures. The metadata is a > struct that contains the basic metric description elements plus a blob > (basically. It is really an array of additional elements). The value message > is a union of all of the supported data types. Both message types (metadata, > value) carry a metric ID header struct that defines the host, metric name and > spoof indicator. Since this structure is basically the header for every XDR > message, even before the XDR message type is determined, the host and metric > can be identified. Take a look at lib/protocol.h. Among other thinks I saw this: enum Ganglia_value_types { GANGLIA_VALUE_UNKNOWN = 0, GANGLIA_VALUE_STRING = 1, GANGLIA_VALUE_UNSIGNED_SHORT = 2, GANGLIA_VALUE_SHORT = 3, GANGLIA_VALUE_UNSIGNED_INT = 4, GANGLIA_VALUE_INT = 5, GANGLIA_VALUE_FLOAT = 6, GANGLIA_VALUE_DOUBLE = 7, }; What does int, short amount to for various platforms ? I think to make this portable you might want to make it explicit to avoid any integral promotion problem, e.g. have INT32, UINT32, INT64, UINT64 types. But maybe, I misunderstood the concept. > > You asked about spoofing or IP proxying the other night. Creating a proxied > metric metadata or value message is really no different than any other metric > message. The difference is in the additional metadata that is added to the > message. The following API will convert a regular metric message to a > proxied message: > > Ganglia_metadata_add (ganglia_metric, SPOOF_HOST, host_name); > > Basically all this is doing is adding a proxied host name or IP as extra > metadata to a metric message (metadata or value). Gmond looks at the > SPOOF_HOST and alters the XDR packet with the appropriate host name. This is > actually how gmetric now deals with actual metrics vs. spoofed metrics. > Thanx, this should work. Matthias > Brad > ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers