Hi all: I'm trying to get the backport proposal for adding group, description and title metadata tags to gmetric approved and am in the process of fixing the auto-generated files that were patched in the changesets outlined below:
http://sourceforge.net/apps/trac/ganglia/browser/branches/monitor-core-3.1/STATUS#L209 In the process, I found that additional auto-generated files have been patched: http://sourceforge.net/apps/trac/ganglia/changeset/2021/ In order to fix that, I'll need to modify cmdline.sh and add " SYSCONFDIR " inside the default clause. Try as I may, it doesn't appear that I could include double quotes, and escaping with \ has the generated cmdline.c showing up as \" SYSCONFDIR \" which doesn't get work. To get around the problem, I propose that we delete cmdline.c and cmdline.h from gmond, gmetric, gmetad sub directories, move cmdline.sh -> cmdline.sh.in, and update the Makefile.am targets such that fixconfig is called on cmdline.sh.in to generate cmdline.sh. cmdline.c and cmdline.h will need to be generated on the fly (so gengetopt will be an additional build dependency). The patch will look something like this: Index: gmetric/Makefile.am =================================================================== --- gmetric/Makefile.am (revision 2322) +++ gmetric/Makefile.am (working copy) @@ -1,3 +1,5 @@ +include $(top_srcdir)/ganglia.inc + if STATIC_BUILD GCFLAGS = GLDADD = @@ -8,9 +10,16 @@ GLDFLAGS = endif -AM_CFLAGS = -I../lib -I../include $(GCFLAGS) -DSYSCONFDIR='"$(sysconfdir)"' +AM_CFLAGS = -I../lib -I../include $(GCFLAGS) bin_PROGRAMS = gmetric + +cmdline.sh: cmdline.sh.in $(FIXCONFIG) + $(FIXCONFIG) cmdline.sh.in + +cmdline.c cmdline.h: cmdline.sh + gengetopt --input ./cmdline.sh + gmetric_SOURCES = gmetric.c cmdline.c cmdline.h gmetric_LDADD = $(top_builddir)/lib/libganglia.la \ $(top_builddir)/lib/libgetopthelper.a \ Index: gmetric/cmdline.sh.in =================================================================== --- gmetric/cmdline.sh.in (revision 2322) +++ gmetric/cmdline.sh.in (working copy) @@ -5,7 +5,7 @@ purpose "The Ganglia Metric Client (gmetric) announces a metric on the list of defined send channels defined in a configuration file" -option "conf" c "The configuration file to use for finding send channels" string default="/etc/ganglia/gmond.conf" no +option "conf" c "The configuration file to use for finding send channels" string default="@sysconfdir@/gmond.conf" no option "name" n "Name of the metric" string no option "value" v "Value of the metric" string no option "type" t "Either string|int8|uint8|int16|uint16|int32|uint32|float|double" string no @@ -13,6 +13,9 @@ option "slope" s "Either zero|positive|negative|both" string default="both" no option "tmax" x "The maximum time in seconds between gmetric calls" int default="60" no option "dmax" d "The lifetime in seconds of this metric" int default="0" no +option "group" g "Group of the metric" string default="" no +option "desc" D "Description of the metric" string default="" no +option "title" T "Title of the metric" string default="" no option "spoof" S "IP address and name of host/device (colon separated) we are spoofing" string default="" no option "heartbeat" H "spoof a heartbeat message (use with spoof option)" no Property changes on: gmetric/cmdline.sh.in ___________________________________________________________________ Deleted: svn:executable - * Thoughts? Cheers, Bernard ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers