Absolutely. If you take a look at the code for multicpu, you will see that it is just a matter of detecting the resources in the init() function and then creating the array that describes each metric that your module will support. Then when your module handler is called, you just need to call the corresponding metric function that gathers the individual resource's metric. Other than the network metric gathering function itself, the rest should be fairly similar to the multicpu module.
Brad >>> On 5/8/2007 at 6:01 AM, in message <[EMAIL PROTECTED]>, Ramon Bastiaans <[EMAIL PROTECTED]> wrote: > Would it be easier now to implement network metrics for each NIC/subnet? > > Has been on my wishlist for a while, but would probably require web > frontend changes too to the reports and how they are displayed. > > - Ramon. > > Brad Nicholes wrote: >>>>> On 5/4/2007 at 4:26 PM, in message >> <[EMAIL PROTECTED]>, >> <[EMAIL PROTECTED]> wrote: >>> Revision: 776 >>> http://svn.sourceforge.net/ganglia/?rev=776&view=rev >>> Author: bnicholes >>> Date: 2007-05-04 15:26:12 -0700 (Fri, 04 May 2007) >>> >>> Log Message: >>> ----------- >>> Add a multi cpu module that will dynamically create metric gathering >>> function depending on the number of cpus found in the system >>> >>> Modified Paths: >>> -------------- >>> trunk/monitor-core/gmond/modules/Makefile.am >>> >>> Added Paths: >>> ----------- >>> trunk/monitor-core/gmond/modules/conf.d/multicpu.conf >>> trunk/monitor-core/gmond/modules/cpu/ >>> trunk/monitor-core/gmond/modules/cpu/Makefile.am >>> trunk/monitor-core/gmond/modules/cpu/mod_multicpu.c >>> >> >> I just checked in a new multi cpu module that will detect the number of cpus > in the system and then dynamically create several cpu related metric > gathering functions for each cpu found. The easiest way to use this module > is to load it through the .conf file just like any other metric module. Then > use the -m parameter of the gmond daemon to display all of the metrics that > are currently available. Depending on how many cpus are on the system, > available metrics such as multicpu_user0, multicpu_user1, multicpu_userX will > show up in the list. These metrics can be added to the .conf file just like > any other metric to allow them to start gathering data on a per cpu basis. I > am thinking that the same type of module could be implemented for disks as > well. Anybody want to take a crack at it? >> >> Brad >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Ganglia-developers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/ganglia-developers ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
