[Pacemaker] emulate crm_mon output by xsltproc'essing cibadmin -Ql

Tim Serong tserong at novell.com
Wed Mar 9 09:06:11 UTC 2011


 >>> On 3/9/2011 at 07:51 PM, Lars Ellenberg <lars.ellenberg at linbit.com> wrote: 
> On Wed, Mar 09, 2011 at 09:42:49AM +0100, Andrew Beekhof wrote: 
> > I had http://hg.clusterlabs.org/pacemaker/1.1/raw-file/tip/xml/crm.xsl 
> > doing something similar. 
> > Agree its an interesting capability, haven't found much practical use 
> > for it yet though. 
> >  
> > Happy to put it in the extras directory though :-) 
>  
> Fine with me. 
> Then at least it does not get lost. 
>  
> How to figure out from the cib 
> pacemakers idea of the current status (and location) of a resource? 
> Look at the most-recent lrm_rsc_op, and it's result? 
 
Pretty much.  For all the gory details, read unpack_rsc_op() in
pacemaker/lib/pengine/unpack.c.  But it (more or less) comes down
to:

  - For each node, sort the ops in order of descending call ID.
  - The most recent op and rc on each node (highest call ID) tells
    you the state of the resource on that node.

Regards,

Tim


-- 
Tim Serong <tserong at novell.com>
Senior Clustering Engineer, OPS Engineering, Novell Inc.







More information about the Pacemaker mailing list