The following proposed patch for stable 3.1, removes all references to C/C++
as a supported language for building DSO metrics as it was meaningless and
only relevant when used with scripted metric modules.

It simplifies the code by making "language" an optional parameter and includes
feedback from Brad into the documentation.

Contains changes from r1490 and r1500

Carlo
---
Index: gmond/gmond.c
===================================================================
--- gmond/gmond.c       (revision 1500)
+++ gmond/gmond.c       (working copy)
@@ -1632,12 +1632,12 @@
 
         cfg_t *module = cfg_getnsec(tmp, "module", j);
 
-        /* Check the module language to make sure that
-           the module is loaded correctly or should be
-           delegated to an alternate module interface
+        /* Check the module language to see if were are
+           meant to handle it or delegate it to an
+           alternate module scripting interface
         */
         modLanguage = cfg_getstr(module, "language");
-        if (modLanguage && strcasecmp(modLanguage, "C/C++")) 
+        if (modLanguage) 
             continue;
 
         modPath = cfg_getstr(module, "path");
Index: gmond/conf.pod
===================================================================
--- gmond/conf.pod      (revision 1500)
+++ gmond/conf.pod      (working copy)
@@ -357,19 +357,20 @@
 extends the available metrics that gmond is able to collect. Each B<modules>
 section contains at least one B<module> section.  Within a B<module> section
 are the directives B<name>, B<language>, B<path> and B<params>.  The module 
-B<name> is the name of the module as determined by the module structure if
-the module was developed in C/C++.  Alternatively, the B<name> can be 
-the name of the source file if the module has been implemented in a 
-interpreted language such as python.  A B<language> designation must be 
-specified as a string value for each module.  The B<language> directive 
-must correspond to the source code language in which the module was 
-implemented (ex. language = "python").  If a B<language> directive does 
-not exist for the module, the assumed language will be "C/C++". The B<path> 
-is the path from which gmond is expected to load the module (C/C++ compiled 
-dynamically loadable module only).  The B<params> directive can be used 
-to pass a single string parameter directly to the module initialization 
-function (C/C++ module only). Multiple parameters can be passed to the 
-module's initialization function by including one or more B<param> sections. 
+B<name> is the internal name of the module as determined by the name of
+the module structure (defined by the C interface).  Alternatively, the
+B<name> can be the name of the source file if the module has been implemented
+in an interpreted language such as python.  A B<language> designation must be 
+specified as a string value for each module that is not a compiled DSO.  The
+B<language> directive must correspond to the source code language in which the
+module was implemented (ex. language = "python").  If a B<language> directive
+does not exist then the module is expected to be a compiled DSO. The B<path> 
+is the path from which gmond is expected to load the module (only valid
+for compiled DSO modules).  The B<params> directive can be used to pass
+a single string parameter directly to the module initialization function
+(only valid for compiled DSO modules). Multiple parameters can be passed
+to the module's initialization function by including one or more B<param>
+sections. 
 Each B<param> section must be named and contain a B<value> directive. Once 
 a module has been loaded, the additional metrics can be discovered by 
 invoking B<gmond -m>.
@@ -377,7 +378,6 @@
    modules {
      module {
        name = "example_module"
-       language = "C/C++"
        path = "/usr/lib/ganglia/modules/modexample.so"
        params = "An extra raw parameter"
        param RandomMax {
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to