[smokeping-users] _order

Ali ISIK ali at esertelekom.com
Wed Jan 28 15:33:46 MET 2004


Hi, all -- our users were complaining about targets not being
in alphabetical order.  As we have hundreds of targets, it becomes
more and more difficult over time to make sure that the targets
are in alphabetical order in the config file.  I checked out the
source and saw the

    { $tree->{$a}{_order} <=> $tree->{$b}{_order}}

comparison block.  This _order seems to be left with its default
value of 1, which of course is the same for all our targets.  I put
in the following hack as a quick fix:

#    foreach my $prop (sort { $tree->{$a}{_order} <=> $tree->{$b}{_order}}
    foreach my $prop (sort { $tree->{$a}{menu} cmp $tree->{$b}{menu}}

_order seems to be an internal variable.  Is there a way for the
user to choose the sort mechanism?  I ran a search for _order and
came up empty.  Please ignore me if I am raising an rtfm sense.

(I also worked out a few dirty fixes for mod_perl errors that I would
like to share if there is interest.)

best,

--ali

--
Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/smokeping-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the smokeping-users mailing list