On Mon, Sep 20, 2004 at 06:14:39PM -0700, Matt Massie wrote: > guys- > > when you get a chance can you please download > http://matt-massie.com/ganglia/libmetrics-0.1.0.tar.gz > and try it on your favorite operating system?? > > i've tested this library on linux and solaris and i _think_ i made the > necessary changes to get it to work on all our other platforms. > > libmetrics is a convenience library which allows us to collect > our ganglia 2.5.x metrics from any application (ganglia 3.0.0 in this > case) just as we have in the past. > > libmetrics will form the basis of mod_ganglia25 (or something like > that). > > all you need to do is > > % gunzip < libmetrics-0.1.0.tar.gz | tar -xvf - > % cd libmetrics-0.1.0 > % ./configure > ... > % make > % make check > > there is a test program (./tests/test-metrics) which will run and loop > through collecting metric 5 times (sleeping 5 secs between collections). > > if you can't get it compile or a "make check" fails, please let me know > what happened. > > if you can get libmetrics working on your platform, then that platform > will continue to be supported by ganglia 3.0.0.
get_ifi_info is failing on FreeBSD 6-CURRENT. I've added a TODO list item and should hopefully get to it tomarrow. One note about the code, the model of finding the correct size for SIOCGIFCONF by adding 10 struct ifreqs at a time is really bogus. I know other code does it (including FreeBSD's ifconfig), but it's a really bad idea. On most modern UNIX like systems, memory you allocate and don't use is basicly free so it's much better to choose a fairly largish initial value (say 20*sizeof(ifr)) and then realloc twice that each time. Most of the time the result will be the same, but on systems with lots of interfaces the difference is O(1) vs O(n) iocts where n is the number of addresses (plus address less interfaces). Since each call to the ioctl is also O(n) you get O(n^2) which sucks. I found this out the hardway while testing a fix in FreeBSD where I loaded 12000 addresses on to an interface. Each ifconfig call did that it was O(n^3)! :-( -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
pgp14d3TFzG2t.pgp
Description: PGP signature