Skip to content

Instantly share code, notes, and snippets.

@e-minguez
Created September 14, 2015 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-minguez/57b21bb9193d6ffccc0e to your computer and use it in GitHub Desktop.
Save e-minguez/57b21bb9193d6ffccc0e to your computer and use it in GitHub Desktop.
one liner to get the node running a specific service in pacemaker
echo "cat /crm_mon/resources/resource[@id='RESOURCENAME']/node/@name" | xmllint --nocdata --shell <(pcs status xml) | awk -F= '/name/ { print $2 }' | tr -d '"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment