Using `crm_simulate` To Plot or Graph Pacemaker Resource Constraints
This article will help you make DOT plots (graphs) to visualize Pacemaker configurations and validate constraints.
From a machine with crm_simulate
installed (part of Pacemaker), and the
cib.xml
from the cluster that you want to plot, enter the following command:
$ crm_simulate --xml-file=cib.xml -VVVVV \
--save-graph tmp.graph \
--save-dotfile tmp.dot \
--node-up host-a \
--node-up host-b \
--node-up host-c \
--node-up host-d
Then, by using the resulting DOT file as input, you can create a graph of the data and output it to a PDF file.
$ dot -Tpdf tmp.dot -o tmp.pdf
To render the graph from left to right rather than top to bottom, add
rankdir=LR
to the DOT file:
digraph g {
rankdir=LR;
p_redis:1_post_notify_start_0 host-a (586) [ style=bold color=green fontcolor=black]
p_redis:0_post_notify_start_0 host-b (585) [ style=bold color=green fontcolor=black]
[...]
Reviewed 2020/12/07 - DGT