btw I have a suggestion for gmond's debugging output. When I was testing my collectl interface and used my option to only send changes to gmond I naturally turned on debugging to see what gmond was getting. I found the output very difficult to follow since every received packet generated 3 lines of output. Maybe some people need that but how about a different format that just shows a single line/packet with all the columns of data nicely lined up? Even toss in some timestamps? Would make it a lot easier to see if anything was missing or exactly what was received. Just a sugguestion. As an example, here's the output I generate went I send something to gmond:
14:12:06.004 Name: cputotals.steal Units: percent Val: 0 TTL: 60 sent 14:12:06.004 Name: cputotals.idle Units: percent Val: 99 TTL: 60 sent 14:12:06.004 Name: ctxint.ctx Units: switches/sec Val: 166 TTL: 60 sent 14:12:06.004 Name: ctxint.int Units: intrpts/sec Val: 1039 TTL: 60 sent 14:12:06.004 Name: ctxint.proc Units: pcreates/sec Val: 0 TTL: 60 sent 14:12:06.004 Name: ctxint.runq Units: runqSize Val: 236 TTL: 60 sent 14:12:06.004 Name: disktotals.reads Units: reads/sec Val: 0 TTL: 60 sent 14:12:06.004 Name: disktotals.readkbs Units: readkbs/sec Val: 0 TTL: 60 sent 14:12:06.005 Name: disktotals.writes Units: writes/sec Val: 0 TTL: 60 sent 14:12:06.005 Name: disktotals.writekbs Units: writekbs/sec Val: 0 TTL: 60 sent 14:12:06.005 Name: nettotals.kbin Units: kb/sec Val: 1 TTL: 60 sent 14:12:06.005 Name: nettotals.pktin Units: kb/sec Val: 9 TTL: 60 sent 14:12:06.005 Name: nettotals.kbout Units: kb/sec Val: 8 TTL: 60 sent It even tells me how long the data has to live (TTL) before I have to resend a non-changed variable... -mark |-----Original Message----- |From: Brad Nicholes [mailto:bnicho...@novell.com] |Sent: Tuesday, March 31, 2009 1:13 PM |To: Seger, Mark; ganglia-developers@lists.sourceforge.net |Cc: Evan J Felix |Subject: Re: [Ganglia-developers] Building a ganglia interface into |collectl | |>>> On 3/31/2009 at 9:56 AM, in message <49d23d46.2090...@hp.com>, Mark |Seger |<mark.se...@hp.com> wrote: |> |> This then leads to my question, which is what is the best way to send |> data to ganglia. I want to keep my messages very dense and so we |chose |> to simply send out binary data in the same format gmond expects. In |the |> case of pnnl, where they have a monitoring hierarchy, we've completely |> replaced all the monitoring gmonds with a dozen that act only as |> aggregators. There are about 190 nodes running collectl sending UPD |> messages to each aggregator gmonds and it seems to run just fine. |Does |> this make sense? Is there anything to watch out for? |> |> If anyone else is interested in trying this out while we're shaking |out |> the code, I'd be happy to share some pre-release code with a few |people. |> | |Which version of Ganglia are you targeting (3.0.x or 3.1.x). Ganglia |uses XDR to pack and unpack the metric packets. However the actual |format changed significantly between 3.0.x and 3.1.x. You can see the |XDR packet layout in the file lib/protocol.x for 3.0.x or |lib/gm_protocol.x for 3.1.x. The 3.1.x version is a bit more complex |than the 3.0.x version. The 3.0.x version is a very simple XDR packet |that basically contains a metric ID and a value. Gmond 3.0.x can get |away with just sending an ID in the packet because every 3.0.x gmond |hardcodes the metric metadata. Gmond 3.1.x made this more flexible by |splitting the packets in to metadata and value packets. Probably the |easiest way to communicate directly with gmond is to use the message |creation and sending APIs that are part of the ganglia library. Take a |look at the gmetric utility code for an example of how to use these |APIs. Gmetric is basically doing what you want to do but as a |standalone utility. For Ganglia 3.0.x you will have to include |lib/ganglia.h, for Ganglia 3.1.x you will include include/ganglia.h. |The libraries for Ganglia 3.1.x version have been made a little more |developer friendly by putting the public headers in the include/ |directory and converting the library to be a .so rather than static. | |Brad | ------------------------------------------------------------------------------ _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers