[Pacemaker] Listing resources running on node

Dennis Jacobfeuerborn dennisml at conversis.de
Wed Jun 25 13:32:38 CEST 2014


On 23.06.2014 01:14, Andrew Beekhof wrote:
> 
> On 23 Jun 2014, at 8:35 am, Dennis Jacobfeuerborn <dennisml at conversis.de> wrote:
> 
>> Hi,
>> what is the best way to list the resources running on the local node?
>> I'm trying to create a simple monitoring script and basically want to be
>> able to simply list all the resources started on the local node.
>>
>> crm_resource has -l which lists all resources but not where they are
>> running and --locate can give me the location but only for a single
>> resource so the best I can come up with is listing all resources,
>> finding the location for each and then filtering using the local
>> hostname. This sounds rather inefficient and roundabout so I wonder if
>> there is a way to either list only the locally running resources or at
>> least list the resources with the unames they are running on?
> 
> crm_mon (with or wtihout the --as-xml) might provide a starting point
> 

I now call "crm_mon -n -1 --as-xml" and then list the resources and
their role only for the node which matches the local uname.
Thanks for the pointer!

Regards,
  Dennis



More information about the Pacemaker mailing list