Dear all:

The codes have been checked in -- thanks for your contributions! :-)

Cheers,

Bernard

On 4/11/07, Bernard Li <[EMAIL PROTECTED]> wrote:
Hi Timothy:

Thanks for your enhancements!  They work great (I'm using them now).
I'll check them into trunk by the end of the week.

Cheers,

Bernard

On 4/11/07, Witham, Timothy D <[EMAIL PROTECTED]> wrote:
> Bernard,
>
> Thank you, I always wanted this too!  It had the side effect of
> corrupting the colors in the grid/cluster icons at the bottom since the
> values changed.
>
> Attached is the patch I now have against 3.0.4 to fix this by copying
> the original load values into another array and using those instead of
> the modified sorted values.  I also tried to keep the parent node at the
> top.
>
> While we are at it, I added an option to sort by hosts up so you can see
> largest clusters/grids first.  I also changed "by hostname" to "by name"
> so that it makes more sense when looking at names of grids, not hosts.
>
> --
> <[EMAIL PROTECTED]>; I don't speak for Intel or anyone.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Bernard Li
> Sent: Monday, April 09, 2007 5:58 PM
> To: Eli Stair
> Cc: ganglia-developers@lists.sourceforge.net;
> [EMAIL PROTECTED]
> Subject: Re: [Ganglia-general] [Ganglia-developers] Sort by host down?
>
> Hi Eli:
>
> Good eye.
>
> I have incorporated your patch and made an additional modification.
> Previously if your meta sort order is "by down host:" and then you
> click on a cluster, it would sort it by ascending order (I guess since
> "ascending" is the first sort order).  Now I catch this and change the
> sort order to descending (which is the default).
>
> Please try this new patch if you have time.
>
> If I do not hear any other comments by the end of the week, I will
> commit this to trunk.
>
> Thanks!
>
> Bernard
>
> On 4/6/07, Eli Stair <[EMAIL PROTECTED]> wrote:
> >
> > Works fine for me, nice thoughtful hack for the grid view.
> >
> > The only suggestion, and initial source of my confusion, would be to
> exclude this
> > from being present in the cluster-view sort menu.  Unless I'm being
> daft again, it
> > seems to have no effect on cluster sorting, and restricting it to
> 'meta' context
> > kicks it out of the spot where it has no effect (and does nothing else
> wrong that I
> > can see).
> >
> > If header.php is modified like this is seems cleaner to me (attached):
> >
> > > --- header.php.PRE-DOWNHOSTPATCH        2007-04-06
> 15:08:24.000000000 -0700
> > > +++ header.php  2007-04-06 15:26:45.000000000 -0700
> > > @@ -285,6 +285,13 @@
> > >        $tpl->assign("metric_menu", $metric_menu );
> > >     }
> > >
> > > +#
> > > +# Show sort order options for meta/grid context only:
> > > +#
> > > +if ($context == "meta" )
> > > +   {
> > > +      $context_sorts[]="by down host";
> > > +   }
> > >
> > >  #
> > >  # Show sort order if there is more than one physical machine
> present.
> >
> >
> > /eli
> >
> >
> >
> >
> > Bernard Li wrote:
> > > Hi Eli:
> > >
> > > It is quite possible that that was the behaviour from a while back,
> > > but as far as I can remember this has been the behaviour (downed
> hosts
> > > are shown up top).
> > >
> > > Anyways, if you have multiple data_sources in your grid, I would
> > > appreciate it if you can help me test it out and give me any
> feedback
> > > :-)
> > >
> > > Thanks,
> > >
> > > Bernard
> > >
> > > On 4/6/07, Eli Stair <[EMAIL PROTECTED]> wrote:
> > >  >
> > >  > 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 <[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=DEVDE
> V
> > >
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
> EV>
> > >  > >
> > >
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
> EV
> > >
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVD
> EV>>
> > >  > >  > >
> > >  > >  > >
> > >  > >  > >
> > >  > >
> > >
> ------------------------------------------------------------------------
> > >  > >  > >
> > >  > >  > > _______________________________________________
> > >  > >  > > Ganglia-developers mailing list
> > >  > >  > > Ganglia-developers@lists.sourceforge.net
> > >  > >  > >
> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
> > >  > >  >
> > >  > >  >
> > >  > >
> > >  >
> > >  >
> > >
> >
> >
> >
>
>


Reply via email to