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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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>&nbsp;&nbsp;"
>           ."<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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ganglia-developers mailing list
> Ganglia-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ganglia-developers



Reply via email to