crm_simulate - Man Page

Part of the Pacemaker cluster resource manager


crm_simulate <data source> <operation> [options]


crm_simulate - simulate a Pacemaker cluster's response to events


Help Options

-h, --help

Show help options


Show all help options


Show operations options


Show synthetic cluster event options


Show output options


Show data source options


-R, --run

Determine cluster's response to the given configuration and status

-S, --simulate

Simulate transition's execution and display resulting cluster status

-X, --in-place

Simulate transition's execution and store result back to input file

-s, --show-scores

Show allocation scores

-U, --show-utilization

Show utilization information

-P, --profile

Run all tests in the named directory to create profiling data

-N, --repeat=N

With --profile, repeat each test N times and print timings

-j, --pending

Display pending state if 'record-pending' is enabled

Synthetic Cluster Events

-u, --node-up=NODE

Bring a node online

-d, --node-down=NODE

Take a node offline

-f, --node-fail=NODE

Mark a node as failed

-i, --op-inject=OPSPEC

Generate a failure for the cluster to react to in the simulation. See `Operation Specification` help for more information.

-F, --op-fail=OPSPEC

If the specified task occurs during the simulation, have it fail with return code ${rc}. The transition will normally stop at the failed action. Save the result with --save-output and re-run with --xml-file. See `Operation Specification` help for more information.

-t, --set-datetime=DATETIME

Set date/time (ISO 8601 format, see

-q, --quorum=QUORUM

Specify a value for quorum

-w, --watchdog=DEVICE

Assume a watchdog device is active

-g, --ticket-grant=TICKET

Grant a ticket

-r, --ticket-revoke=TICKET

Revoke a ticket

-b, --ticket-standby=TICKET

Make a ticket standby

-e, --ticket-activate=TICKET

Activate a ticket

Output Options

-I, --save-input=FILE

Save the input configuration to the named file

-O, --save-output=FILE

Save the output configuration to the named file

-G, --save-graph=FILE

Save the transition graph (XML format) to the named file

-D, --save-dotfile=FILE

Save the transition graph (DOT format) to the named file

-a, --all-actions

Display all possible actions in DOT graph (even if not part of transition)

Data Source

-L, --live-check

Connect to CIB mamager and use the current CIB contents as input

-x, --xml-file=FILE

Retrieve XML from the named file

-p, --xml-pipe

Retrieve XML from stdin

Application Options

-$, --version

Display software version and exit

-V, --verbose

Increase debug output (may be specified multiple times)

-Q, --quiet

Display only essential output

Operation Specification

The OPSPEC in any command line option is of the form ${resource}_${task}_${interval_in_ms}@${node}=${rc}, for example).  ${rc} is an OCF return code.  For more information on these return codes, refer to


Pretend a recurring monitor action found memcached stopped on node and, during recovery, that the memcached stop action failed:

crm_simulate -LS --op-inject --op-fail --save-output /tmp/memcached-test.xml

Now see what the reaction to the stop failed would be:

crm_simulate -S --xml-file /tmp/memcached-test.xml


Written by Andrew Beekhof

Referenced By


July 2020 Pacemaker 2.0.4-1.fc33.1 System Administration Utilities