Hi Michael: I don't think the current frontend code supports what you want without some major hacking. The frontend expects the user to view the "grid" as multiple clusters and the "cluster" as multiple hosts.
A common feature request is to have hosts arbitrarily cluster/group based on different criteria (eg. function, geographical location, etc.) Perhaps Vladimir can incorporate some of these ideas in his frontend re-write. But some fundamental changes may need to be made in the gmond level... Hope this helps. Cheers, Bernard On Tue, Nov 16, 2010 at 11:21 AM, Michael Perzl <mich...@perzl.org> wrote: > I have a question regarding the PHP web code of Ganglia: > > My setup looks like that: > > I have one Grid and several Clusters. > Each Cluster has between 10-250 nodes, all running on AIX LPARs (but the > question is independent of the OS). > I have clustered on a logical level, i.e., not according to the different > hardware systems but for instance, all SAP systems, all TSM systems etc. > I have lots of additional metrics, provided via a C-DSO. > One of the additional metrics is a system-identifier, i.e., a hardware > identifier that I want to use to identify the hardware that each LPAR is > running on. > > Now in addition to the logical view I want to introduce a "physical view", > i.e., a view of all LPARs running on a specific system with a certain > hardware identifier. This is were my illiteracy regarding PHP comes into > play. > > Basically, I want to have a list of ALL Ganglia nodes so that I can loop > over and group them according to their hardware identifier. > > I was able to accomplish someting in cluster_view.php with the following > code snippet but have failed miserably so far in meta_view.php. > > ---------------------------------------------------------------- > > $sysids = array(); > $sysid_count = 0; > foreach ($metrics as $host => $val) > { > if (isset( $val["serial_num"]['VAL'] )) > { > $id = $val["serial_num"]['VAL']; > if (! in_array( $id, $sysids )) > { > $sysids[$sysid_count] = $id; > $sysid_count++; > } > } > } > sort( $sysids ); > > $cv = @fopen("/tmp/cv.txt","w"); > foreach ($hosts_up as $host => $val) > { > fputs($cv,"$host\n"); > } > > fputs($cv,"=================================================\n"); > fputs($cv,"sysid_count = $sysid_count\n"); > fputs($cv,"=================================================\n"); > > foreach ($sysids as $id) > { > fputs($cv,"$id\n"); > } > fputs($cv,"=================================================\n"); > > foreach ($sysids as $id) > { > fputs($cv,"-------> $id\n"); > foreach ($hosts_up as $host => $h) > { > if ( $metrics[$host]["serial_num"]['VAL'] == $id ) > { > fputs($cv,"$host\n"); > } > } > } > > fclose($cv); > > ---------------------------------------------------------------- > > Any help/hints regarding how a loop over all Ganglia nodes can be > accomplished in metaview.php would be highly welcome. Thanks. > > Regards, > Michael > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today > http://p.sf.net/sfu/msIE9-sfdev2dev > _______________________________________________ > Ganglia-developers mailing list > Ganglia-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ganglia-developers > > ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers