From: Eli S. <es...@il...> - 2007-04-06 19:10:07
|
I swear it used to be necessary to show a host as down, rather than just not displaying it. It doesn't appear to be the case in at least 3.0.3+ anymore, so perhaps I've been perpetuating something needlessly/false onto a public list. D'oh. Weird, suffice it for the moment to say that I can't explain anymore why I'm doing that ;) Apparently the only thing missing is from my brain. /eli Bernard Li wrote: > Hi Eli: > > My patch actually does not change the behaviour of the cluster view, > only for grid (or "meta") view. AFAIK in cluster view, by default > downed hosts always show up at the top of the list. > > Or am I missing something here? ;-) > > Thanks, > > Bernard > > On 4/6/07, Eli Stair <es...@il...> wrote: > > > > Cool, we hackily comment out the if $hosts_down ... return line in > host_view.php, > > so they pop to the top of any host-view of a cluster. > > > > /eli > > > > > # No reason to go on if this node is down. > > > if ($hosts_down) > > > { > > > $tpl->printToScreen(); > > > return; > > > } > > > */ > > > > > > Bernard Li wrote: > > > Dear all: > > > > > > The attached patch adds a new option for the grid "Sorted" menu called > > > "by down host" which will sort the list of data_sources/cluster by the > > > number of hosts down (sources with most downed hosts are on top). > > > > > > I will check this into SVN trunk after folks had a chance to review. > > > > > > Comments are welcome. > > > > > > Thanks, > > > > > > Bernard > > > > > > On 3/16/07, Bernard Li <be...@va...> wrote: > > > > Hi guys: > > > > > > > > Currently if you have a grid with many different sources, it is not > > > > immediately obvious which data_source has hosts that are down (the > > > > summary section tells you there are n nodes down, but you have to > > > > scroll through the entire page to find which data_source has nodes > > > > that are down). > > > > > > > > Would it be helpful to have a new sort order that lets you sort by > > > > host down (obviously the data_source that has downed nodes will show > > > > up first?) > > > > > > > > Cheers, > > > > > > > > Bernard > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > Index: web/meta_view.php > > > =================================================================== > > > --- web/meta_view.php (revision 756) > > > +++ web/meta_view.php (working copy) > > > @@ -43,11 +43,16 @@ > > > } > > > else if ($sort == "by hostname") { > > > ksort($sorted_sources); > > > -} > > > -else { > > > +} else if ($sort == "by down host") { > > > + foreach ($sorted_sources as $source => $val) { > > > + $sorted_sources[$source] = > intval($grid[$source]['HOSTS_DOWN']); > > > + } > > > + arsort($sorted_sources); > > > +} else { > > > asort($sorted_sources); > > > } > > > > > > + > > > # Display the sources. The first is ourself, the rest are our > children. > > > foreach ( $sorted_sources as $source => $val ) > > > { > > > Index: web/header.php > > > =================================================================== > > > --- web/header.php (revision 756) > > > +++ web/header.php (working copy) > > > @@ -294,6 +294,7 @@ > > > $context_sorts[]="ascending"; > > > $context_sorts[]="descending"; > > > $context_sorts[]="by hostname"; > > > + $context_sorts[]="by down host"; > > > > > > $sort_menu = "<B>Sorted</B> " > > > ."<SELECT NAME=\"s\" OnChange=\"ganglia_form.submit();\">\n"; > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > ------------------------------------------------------------------------- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > > > opinions on IT & business topics through brief surveys-and earn cash > > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > Ganglia-developers mailing list > > > Gan...@li... > > > https://lists.sourceforge.net/lists/listinfo/ganglia-developers > > > > > |