That looks great . thanks
Will try this on our cluster monday 

On Fri, 2007-10-26 at 10:53 -0500, [EMAIL PROTECTED] wrote:

> > Hi,
> > New to Linux-HA and would like to know if its possible to display 
> > the total node scores for a given resource. So you can understand at
> > the time of the snapshot what scores the engine is using in its 
> decisions.
> 
> > Thanks
> > Kevin Tomlinson
> 
> > Version: 2.1.2
> 
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> 
> I found the script below when searching the archives:
> 
> #!/bin/bash
> echo -e Resource\\tNode\\tScore\\t[target_role]
> 2>&1 ptest -LVVVVVVV|grep -E "assign_node|rsc_location"|grep -w -E "\ 
> [-]{0,1}[0-9]*$"|while read line
> do
>         node=`echo $line|cut -d ' ' -f 8|cut -d ':' -f 1`
>         res=`echo $line|cut -d ' ' -f 6|tr -d ","`
>         score=`echo $line|cut -d ' ' -f 9`
>         targetrole=`cibadmin -Q|grep $res|grep target_role|grep -o -E 
> 'value=".*"'|cut -d '"' -f 2|grep -i stopped`
>         if [ "$targetrole" = "stopped" ]
>         then
>                 echo zScore of -1000000 is intentional when 
> target_role=\"stopped\"
>         fi
>         echo -e a$res\\t$node\\t$score\\t$targetrole
> done|sort -k 1|uniq|cut -b 2-
> 
> 
> Hope this helps,
> Justin
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to